Api Response with Array of objects not mapped properly

189
1
03-21-2024 03:49 AM
jauhari_mani
Occasional Contributor

Hi Community,

I want to map an Api Json response to a defined definition to add it as a feature to a layer.

Definition of Input source is auto generated which is correct on validation but when checking the values on sampler it sets all the objects of objects and array of Json to null resulting in data loss and incorrect mapping.

I have attached response from API and Geo Event Definition.

Please let me know how I can fix this.

Input Connector's input on sampler before adding any processor:

jauhari_mani_0-1711017704363.png

 

Auto Generated Definition:

jauhari_mani_1-1711017943427.png

 

 

 

0 Kudos
1 Reply
RJSunderman
Esri Regular Contributor

Hello @jauhari_mani --

Please see my reply  to @RipaliBatra in the thread: GeoEvent-Poll an External Website for JSON.

Given the rich hierarchical structure of the JSON from the https://waqi.info web service you really should not rely on the GeoEvent Sampler for a good representation of the data. The sampler struggles when given complex hierarchical JSON.

A better approach is to create one or more Write to a JSON File outputs and use them to log the event records emitted from different processors along your configured event processing workflow.

-- RJ

0 Kudos