On Wed, 26 Jun 2019, Allin Cottrell wrote:
On Wed, 26 Jun 2019, Sven Schreiber wrote:
> I got this error when trying to fetch something from the Belgian central
> bank via the dbnomics add-on:
>
> Datentypen nicht passend bei Operation [datatypes not matched]
> *** error within loop in function fix_dimensions_bundle
>> b.value_label = dvl[key][value]
> called by function process_series_bundle
> *** error in function process_series_bundle, line 38
>> fix_dimensions_bundle(json, &b)
> called by function dbnomics_get_series
>
> This is gretl 2019b and dbnomics add-on 0.33.
I've just committed a work-around to git (updating the version to dbnomics
0.34). This involves replacing unreadable "value labels" with "<unknown
value-label>".
The problem arose from the fact that in dbnomics JSON certain aspects of
series "dimensions" are represented as nested arrays, and gretl doesn't
have
nested arrays. That sounds like a limitation of gretl -- but IMO the
problematic things should not be arrays in JSON: they should be
objects [...]
Ah, on closer inspection the "dimension_value_labels" that are given
in array form in dbnomics JSON for the National Bank of Belgium
(NBB) are usually given (for other data providers, e.g. the IMF) as
JSON "objects" (which convert nicely into gretl bundles).
So our trip-up with NBB data was actually due to an inconsistency at
dbnomics; I've posted a report on their forum.
Allin