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.
Loops in Alteryx are among the most frustrating experiences ever devised. If there is anything that will cause me to move away from this tool, it's the fact that such a simple concept is so difficult to implement. This seems to me one of the most common use cases for an ETL tool. The answer to this (so I'm told) is a batch macro, which is another difficult concept to implement.
Here's my situation - I have a set of files. They all have fun variations on their names based on how Windows auto-names downloaded files (i.e. file.xlsx, file (1).xlsx, file (2).xlsx, etc). I need to grab all these files. For each file, there is a column in the dataset which contains dates. I need to find the max value in that column and append it to the data associated with that file. This suggests a for loop as follows:
get list of all files matching criteria (ie, load file*.xlsx) into temp table
for each file in list
read date column to get max
append max(date) to file's dataset
repeat until all files processed
How do I do this? Thanks in advance for the help.
UPDATE: Forgot to mention - there can be zero user interaction required during the execution of this workflow, aside from perhaps updating the file path to the location of the downloaded files.
Thanks LordNeil, for the reply on a Sunday AM. I realized I could do this via your method after I posted, but I am still wondering how I would set up a generic loop. There is not good documentation that I can find that shows how you would construct a loop using batch macros. Are you aware of any links like this?