In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Converting multiple .csv files with JSON text into usable data

psanchez
5 - Atom

I was hoping for some help for an activity that I am working on, specifically the Escaping the Digital Dungeon activity created by E&Y. I currently have 53 .csv files on excel that I managed to pull into Alteryx using the directory tool. These files all contain JSON text, and I need to sort through the data contained on them. I can view this data if I open the files individually with notepad, but aren't sure how to put all of them into alteryx so I can use the data cleaning tool. Any help would be really appreciated!

6 REPLIES 6
psanchez
5 - Atom

I've realized that perhaps the directory tool may not be the right tool to use there either, as I need to input the data, not just view its location, help there would be appreciated as well!

apathetichell
20 - Arcturus

directory tool is correct to get the fullpath of your 53 files. You will need to feed the paths into a batch macro. Are they .json? are they text? if they are .json you'll use a text input tool in your batch macro set up for \0 (no delimiter). You will then need to concatenate the json in a single field (via summarize tool) - and then use a json parse tool. You will attach this to a macro output. Place your batch macro on your canvas.

 

 

psanchez
5 - Atom

I'll attach one of the 53 files with this post so you can see. I'll try what you said for now, but let me know if you can help at all with the Summarize tool and Concanating. I tried to do this with one file earlier and could not figure out how to get all the text to enter a single cell. Thanks again!

Qiu
21 - Polaris
21 - Polaris

@psanchez 

I import the file as CSV with \t (Tab) as delimter then a JSON Parse tool can parse it without any issue.

0405-psanchez-A.png0405-psanchez-B.png

jdminton
13 - Pulsar

@Qiu is correct. I added a couple of extra tools to make the data more like how you probably want it. I also added the requirement of multiple file input you were needing. You will need to point the directory to your dataset location.

 

Snag_a4d887f.png

Snag_a4da34a.png

apathetichell
20 - Arcturus

@psanchez follow these instructions - and post if you are having more issues. Sounds like a fun project. I personally never use dynamic input (as used by @jdminton ) - but if it works - it works.

Labels
Top Solution Authors