coderaanalytics / econdatar

R package for uploading and downloading data to/from www.econdata.co.za
MIT License
6 stars 2 forks source link

Setting key="all" #4

Closed Rossouwvj closed 1 year ago

Rossouwvj commented 2 years ago

If you select key as "all" the retrieval fails. Example: read_econdata(agencyid = "ECONDATA", id = "EXTERNAL_SECTOR", version = "1.0", key = "all", provideragencyid = "ECONDATA", providerid = "SARB", releasedescription = "2022-07-01")

Will return the error:

`Fetching dataset(s) - EXTERNAL_SECTOR

Data set(s) successfully retrieved from EconData.

Data structure successfully retrieved for data flow: ECONDATA,EXTERNAL_SECTOR,1.0

Error in FUN(X[[i]], ...) : (spec-tools.core/spec {:spec (clojure.spec.alpha/keys :opt-un [:econdata.utilities.spec/key :econdata.utilities.spec/startPeriod :econdata.utilities.spec/endPeriod :econdata.utilities.spec/firstNObservations :econdata.utilities.spec/lastNObservations :econdata.utilities.spec/releaseDescription :econdata.utilities.spec/validate]), :type :map, :leaf? false})list(list(path = list("key"), pred = "(clojure.core/fn [%] (clojure.core/re-matches econdata.utilities.spec/key-type %))", val = "all", via = list("econdata.utilities.spec/datasets-query-params-2", "econdata.utilities.spec/key"), in = list("key")))reitit.coercion/request-coercionspeclist(key = "all", releaseDescription = "2022-07-01")list("request", "query-params")`

byrongibby commented 2 years ago

This is a bug in the current version of EconData, it will be patched in the next release.