Tips & Tricks: Automatically accessing most recent files in Alteryx

A common issue I come across while locating the file I need to access is determining which is the most recent file. And, based on light conversation with the other Business Intelligence Engineers on the Continuus Technologies team, I know I am not the only one who has dealt with this.

 

Jake_Auto Pic 1.png

 

Often times, the person (or persons) updating certain monthly files do not adhere to a consistent naming convention, and likely don’t realize the importance of have a consistent file path when it comes to managing data. Luckily, there is any easy way to solve this issue and save data engineers some time in Alteryx.

Here’s how it works…

 

Jake_Auto Pic 2.png

 

Using the Directory tool, you can gain access to a file’s CreationTime, so you can use the most recent CreationTime and a Join tool to filter to your most recent file. That way, if the budget team changes the naming convention of their budget files, your workflow isn’t broken. Beyond those three tools, you can add the Dynamic Input tool to pull in the data within that most recent file.

 

Jake_Auto Pic 3.png

 

Jake_Auto Pic 4.png

 

Taking it a step further, you could add Interface Tools to make this a Macro and add it to your company’s Gallery.

 

Jake_Auto Pic 5.png

 

Your Analytical App on Alteryx Gallery will show this view to users:

 

Jake_Auto Pic 6.png

 

So, they'll be able to select the folder they want this Macro to Target. Once that folder is selected, every time this Macro is scheduled to run, it will pick up the most recent file in that folder.

 

Boom! There you have it. A super simple workaround to save you some time and avoid broken workflows in Alteryx!