
Alteryx Union Macro
Yet another example of how Alteryx can make life easier!
If you need to create a dataset from a folder of files an Alteryx union macro will make life a lot easier for you.
If you are certain that the files contain the same structure throughout the folder you could simply use a Directory input, however you will not get the desired results if there are file(s) which have the columns in a different order, or are missing or have additional columns.
This is where the Union Macro comes into play – it is a Batch Macro which will iterate through however many files are contained in the folder in question and union the files together in the output. This will ensure that the columns in your data are matched up correctly in the final output. The video uses a directory of XML files but will work with most file types.
I hope you find the video useful, enjoy!
Thanks for the post, Luke! This was exactly what I needed to aggregate 60 CSV files containing over 23 million rows of data.