Alteryx Designer Desktop Discussions

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

Join multiple CSV files in a folder

Saravanakumar
7 - Meteor

I have over 30 individual files. Each file has different fields except the column "Key".  How can I join all the files easily.

 

I also need only some of the fields from each file, I have the list of fields needed.

 

I tried *.csv in the input tool and Dynamic input they try to union the files but not join by "Key" column.

 

Could anyone advise please?

5 REPLIES 5
ChrisTX
15 - Aurora

With each file having a different layout (schema), you'll likely need a batch macro.

 

Check out this knowledge base article.

 

The Ultimate Input Data Flowchart
Community > Designer > Designer Knowledge > The Ultimate Input Data Flowchart
https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/The-Ultimate-Input-Data-Flowchart/t...

 

Chris

Qiu
20 - Arcturus
20 - Arcturus

@Saravanakumar 
I always use this macro to read multiple files/Worksheets and it works fine.

 

AndrewDMerrill
13 - Pulsar

Not sure if other workflows do the joining you mentioned, but this one does! Just make sure that the key column is labeled properly in the Dynamic Input Tool, by associating template file (unless the name is Key). Also, all desired columns must be included in the Column Names input.

Main Workflow:

Screenshot 1.png

Macro 1 (Standard):

Screenshot 2.png

Macro 2 (Batch):

Screenshot 3.png

rohit782192
11 - Bolide

Batch Macro is the Only Solution

SrikanthSoma
5 - Atom

Thanks Chris. Very helpful.

Labels