Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

JSON Output with Inconsistent Values

toral
6 - Meteoroid

I have json response that contains inconsistent name/value pairs. For eg, sometimes, city will be a part of the response and sometime it won't. I am transforming this output to csv and the csv is also inconsistent as sometimes it will have 5 columns and sometimes 4.

How to handle this kind of inconsistent json response within Alteryx so that the csv output has same # of fields always, with null or static values for the fields missing in the json response. 

2 REPLIES 2
gawa
16 - Nebula
16 - Nebula

hi @toral In order to fix output schema, you can append "0 row" data having all possible fields to the output from JSON parse.

By doing so, all of fields can maintain.
Please note that this approach works only when you already know what fields can be available in JSON response. 

 

image.png

toral
6 - Meteoroid

Thanks @gawa. That was a smooth approach and works well for me. 

Labels
Top Solution Authors