Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Convert ndjson to json or csv format

mtwilliamson
7 - Meteor

I'm looking for a workflow or tool that converts ndjson files to json or csv files.  Any suggestions would be appreciated.

5 REPLIES 5
fmvizcaino
17 - Castor
17 - Castor

Hi @mtwilliamson ,

 

You can use the regular json parse tool to accomplish what you need.

Take a look at the attached example and let me know what you think.

(The ndjson file is inside a zip file so I could upload to this post, please extract it and place in the same folder as the workflow)

 

I'm using a file used in a weekly challenge created by @JoeM 

https://community.alteryx.com/t5/Weekly-Challenge/Challenge-95-Draw-1000-Apples-in-Under-60-Seconds/...

 

Best,

Fernando V.

mtwilliamson
7 - Meteor

Thanks fmvizcaino for the quick response.  I'm in the process testing out the workflow now. 

mtwilliamson
7 - Meteor

Hi fmvizcaino,

Using the apple data in your workflow, is there a way to "pivot" the first column (JSON_Name) into a single column header and create rows for the remaining values in JSON_ValueString?  It looks like there are 83 columns per row.  I tried using the Cross Tab and Transpose tools but I'm struggling to get the data into rows.

fmvizcaino
17 - Castor
17 - Castor

Hi @mtwilliamson ,

 

Attached is an example showing how to get that done. I'm using a recordID before everything to be able to separate everything into different rows.

For the example ndjson, the columns doesn't make much sense but you can try with your own data.

 

Best,

Fernando Vizcaino

mtwilliamson
7 - Meteor

Hi Fernando,

That works great!  Thank you for the help.

Labels