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?
Solved! Go to Solution.
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
@Saravanakumar
I always use this macro to read multiple files/Worksheets and it works fine.
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:
Macro 1 (Standard):
Macro 2 (Batch):
Batch Macro is the Only Solution
Thanks Chris. Very helpful.
@Qiu any way to add filename as extra column with every record while reading multiple files via this batch macro?