Hi All,
I am attempting to input the data from all the files in a particular folder into my Alteryx workflow, which should be pretty simple, however, the number of files in this folder will change from day-to-day, the only constant is that I want the data from all the files in the folder into my workflow.
I then plan to union all this data together and conduct some further analysis.
Is there a way to input all files from a folder rather than just specifying particular files in Alteryx?
Solved! Go to Solution.
Hi @Banim
Within this article it shows how to use the Directory tool to read all files from a folder and then depending upon your file format, you can use a dynamic input tool to read all the files in if they have the same field schema or use a batch macro to read in all files with differing field schema's.
Workflow examples are available for download at the bottom of that article.
Best,
Jordan Barker
Solutions Consultant
If you are bringing in files of a format where it is not necessary to specify different sheets (e.g. csv, xls, txt,xlsx with same sheetname across files etc) then you can also use a wildcard input within the input tool. Rather than specifying your exact file, replace the filename with *.
For example: C:\User\Directory\*.xls
This will bring in all xls files within the specified directory, unioned together (assuming same schema).
Jordan's solution is more extensive as it will allow you to bring in files of different filetypes and specify specific sheets (with some additional plumbing), but the above is a quick way of bringing in multiple files when the structure is simple.
Hi DataBlender,
Many thanks for this soultion, it was exactly what I was after as all of the files are in an .xls format with the same schema (should have sepcified in my initial post!)
Banim
Thanks Jordan,
I took the time to test both of your proposals and both are completely viable solututions and work for the requirement I had.
Thank you for your response.
Banim