Engine Works

Under the hood of Alteryx: tips, tricks and how-tos.
16 - Nebula
16 - Nebula

Use Case


You’ve been notified by an email event or by a user that a scheduled module has failed. You’d like to have a quick and relatively painless way to get the output log for that module and see if you can isolate the failure point(s).




Let’s say the module that failed is module_abc.yxmd. You go to where the Alteryx engine logs are stored on the server (refer to Alteryx Documentation), and all you see are a bunch of files named Alteryx_Log_[number].log. You have no idea which log contains the information for module_abc.yxmd. You’d literally have to open each one and look at the first line to see which log is for the failed module:




If only there were an easy way to have Alteryx read through them all and pull out just the log associated with module_abc.yxmd.




Since you know where the log files are stored, we could use a Directory tool to collect all their paths:




And then we could filter for the date that it failed using a Filter tool (note that I’m allowing for a date range in case I ever want to search for more than one day):




And then, we can use a Dynamic Input tool to read in just the first line of each file (note the specific configuration of the highlighted options):






And from there, you could simply filter for the module you’re interested in.


If only it were that simple...


The problem here is that if Alteryx is currently running any module, the log will be open and therefore cause the Dynamic Input tool to produce an error. If only there were a way to filter the logs for only the ones that are not open...


Well, not only did my fellow ACE Claire (@clmc9601) address this very issue in a prior Engine Works Blog, but she also wrote a macro that uses Python to filter for only unopened logs. Read all about it here!


So, I made use of her awesome macro and put it together with the steps I mentioned earlier, added a few more pieces, and came up with the Log Extraction App.

The app has the following user-entered parameters:




Here is an example where I’m looking for the log for the module C:\Users\mbarone\OneDrive - Paychex\Desktop\Ayx_Ace\Blog\Random_Grouping\Random_Grouping.yxmd. My engine logs are stored in C:\AlteryxLogs, and it was run on 2023-01-23. I want the logs for this module on that date to be written to C:\Users\mbarone\OneDrive - Paychex\Desktop\Ayx_Ace\Blog\Random_Grouping.


Here’s my app configuration:




I click Finish, and then go to the folder I requested the log to be output to, and see the log:




And then, I can open the log and look at the details of the run, including any errors:




Let’s look at the “guts” of the app:




Feel free to download the Log Extraction App from the Gallery and use it as necessary. Have a look at each tool’s configuration so you can see the logic being used. Nothing too crazy going on – fairly basic-to-intermediate-level stuff.


Special thanks again to Claire @clmc9601 for the collaboration on this one!