combining daily files into one aggregate monthly file
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi-
I have files saved to the same folder each day.
Folder path:my documents
file name: each starts with ABC - yyyy-mm-dd
how can i create a workflow to combine all the files for a month into one aggregate file?
- Labels:
- Developer Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hi - Ihave created the below workflow, the export just shows the file data how to i get an export of the data within each of these files in 1 file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Ksisterhen batch macro is an option for your usecase
https://knowledge.alteryx.com/index/s/article/The-Ultimate-Input-Data-Flowchart-1583459854309
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If the file format remains same you can use directory tool as well
Example is attached with tool in Alteryx for reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If the schema is the same, then you will need the Dynamic Input Tool to import/combine all the data into one large table. The Dynamic Input Tool takes as input the full path that you can get from the Directory Tool (just like you showed), it will import all files and union the results together into one large dataset (which is the output from the Tool).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have gotten the batch macro to work, now have a question on how it works
how does the batch marco layer on? i.e if the files in the folder it is combing goes in decending order is from 12/29-12/1, is it bringing in all the data from the 12/29 file then the 12/28 then the 12/27 and so on?
Each file has a list of unique ids, some carry over from day to day some get added and i am trying to get a unique list of unique ids in the monthly files and the date each one first appeared
for example uid:12345 shows in my 12/4 file and in my 12/5, 12/6 and 12/7 file, in my unique output i would like it to bring the record from the 12/4 file not from another day file.
as well as uid:78923 shows up first on 12/7 then in the 12/8,12/9 file so for this id i want the date from the 12/7 file to show in my unique output file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Ksisterhen you can select the full file path or file name from the input tool in the batch macro, so you will know the records and the corresponding file names, you can then filter out your unique value based on the file name
