0

I have a workbench which takes a JSON file and uses the following transformers to parse the data: JSONFragmenter, JSON Extractor and a vertex creator.

I am getting warning errors in my translation log when writing to a postgis database. The errors are as follows:

"JSONExtractor (JSONQueryFactory): The JSON query 'json["data"][geomaster_name][*]' contains an invalid index at column 14. An index must be a non-negative integer, a quoted string, or a * (wildcard) character"

The source data is coming from a url here: https://data2.unhcr.org/population/get/sublocation/root?widget_id=211460&sv_id=39&population_group=5081&forcesublocation=0&fromDate=1900-01-01

I'm not sure if this is the correct avenue, but I inspected my output from the json extractor and referenced line 14. Line 14 is as follows:

{"geomaster_name":"Paraguay","geomaster_id":7513,"geo_sv_id":"7513","admin_level":"Country","centroid_lon":"-57.5244140625","centroid_lat":"-25.20494115356912","lat_max":-18.242430491113,"lon_max":-51.88671875,"lat_min":-30.965801735895,"lon_min":-65.88671875,"source":"Government","date":"2020-12-31","month":"4","year":"2018","published":false,"sv_published":"0","individuals":"2531","name":"Paraguay","numChildren":"0","color":"#3c8dbc"}
0

Figured it out - PostGIS needs to be written to lower case field names. I had my writer set to upper and lower case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.