Alteryx Designer Desktop Discussions

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

Load multiple .json into alteryx (1 file per row)

Pingu
10 - Fireball

Hi all,

 

I have been searching the community, but could not get workflow to work the way i wanted.

 

I want to load multiple local .json files into alteryx as text, and each file should be in one cell. I did the same for .xml, but when the files are in .json format Alteryx keeps delimiting the files into separate rows.

 

Field 1 should contain the whole content of the .json file so each row is one filename. Instead of multiple lines per file.

Pingu_0-1619771289320.png

 

Currently multiple rows per file, but I would like to have the whole content per file in 1 cell/row.

Pingu_3-1619771471044.png

 

 

Pingu_2-1619771417022.png

 

4 REPLIES 4
danilang
19 - Altair
19 - Altair

Hi @Pingu 

 

I can think of 2 ways to do this.

 

1. Add a summary tool after the Input and concatenate the json rows with filename as key and \n as the delimiter

2. Use a folder browser tool and pass the file names to a Blob Input tool that's configure to output the files as strings

 

Dan

Pingu
10 - Fireball

Thanks Danilang,

 

1. Seems to work perfectly with removing the , separator! It does the job.

Pingu_0-1619783911537.png

 

2. Curious for this solution. I am not really familiar with the blob tool, what would be the next step after everything is read in as a blob?

 

Pingu_2-1619784120388.png

 

 

danilang
19 - Altair
19 - Altair

Hi @Pingu 

 

Add a Blob Convert tool after the Blob Input to convert the blob to a string and set the config as follows

 

danilang_0-1619786330155.png

 

"Unicode UTF-8"  will probably be the correct code page to use for most json, but you may have to experiment based on your input files

 

Dan

Pingu
10 - Fireball

Thanks Dan!

Labels