This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
I need a workflow to merge 1000s of CSV files from 100 db tables into 100 files.
The files have been named as "TableName [SPACE] FILENUMBER" (Table1 01, Table1 02... Table3 04)
I have written a simple batch macro that unions CSV files. (Unioniser.yxmc)
I need to write another batch macro that can run the Unioniser macro 100 times and output 100 CSVs, 1 for each table.
My macros this far
For the second macro that can run the above once for each Table, I can generate a listing of table names and filepaths using the directory and formula tools and further get a unique list of table names using the Unique tools as below.
1st Unique tool - FilePath & FileName and Table Name
2nd Unique tool (Upper) - Table Name Alone
How do I proceed further with calling the Unioniser macro one for each TableName ?
If you wrap what you have built into another batch macro with a list of 100 rows (could be really anything). You could also do a iterative macro (while value < 100) but not as straightforward in my point of view. Let me know if you'd like an example.
Not using text input I would like the workflow to have no manual input.
All the files to be merged are in a single directory and the directory tool provides the required inputs - file names and file paths. The files are to be consolidated based on filenames. Hence the inputs are dynamically calculated from a single directory reference. An example would be great. Thank you very much.