Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Output JSON to CSV adds unwanted quotes

fpinchon
8 - Asteroid

That one really baffles me...

Is that a bug or a feature of the CSV Output tool?

I managed to generate a properly formatted JSON file, that I am exporting to CSV to be used outside of Alteryx, and for some reason I cannto comrehend, the OUtput process is adding quotes to my already quoted fileds?

Alteryx is showing in the display window data as it should be:

Screenshot.PNG 

 

Yet, opening the actual CSV output, every field has been double double quoted!!

Capture.PNG

And same thing happens if I remove option 3 in the output: Delimiters set to blank...

I don't understand why Alteryx displays it correctly and outputs it wrong? Workflow v11.4 is attached...

 

Thanks in advance !

Frederic

11 REPLIES 11
danilang
19 - Altair
19 - Altair

hi @fpinchon 

 

Indeed you can't win.  Like I mentioned in the last line of my post, you can't do it directly.  You have to build the line as a single field, including the comma and output just that one field

 

Something like this will output the format you're looking for.  Of course, since it doesn't conform to the CSV standard, you'll need a custom routine to parse it.

 

WF.png

 

Dan

cmcclellan
13 - Pulsar

Awesome effort @danilang I actually thought of this overnight, just wrote the workflow in Alteryx, got it working perfectly and you've posted almost the identical workflow 7hrs earlier :)

 

I think the BIG warning is - this is NOT a proper CSV file, most CSV readers will NOT read it properly so I'd very VERY cautious in using this in a production environment.

 

But it does answer the question posed ;) 

Labels