Hi,
About a week ago I posted a question about how to best check if a file is locked. I have some workflows that read in a shared yxdb file and sometimes that yxdb is being updated when a workflow attempts to read it, and so the workflow throws an error and skips that input, which results in me having to re-run the workflow once I receive the error email.
The response from @scottj gave me the guidance and inspiration I needed to put together a macro that does exactly what I needed. Specifically:
I added some steps to identify if the file and directory actually exist, whether a sheet name is provided (in the case of Excel files), and set it up to handle (as of now) three different types of input (yxdb, Excel and CSV...the most common input files we work with).
I suspect there are ways to make this more robust and handle more use-cases, but since I hadn't seen anything like this out there yet, I figured I'd share it with the community in its current state to both help others who might be facing a similar challenge as well as to see if anyone might have ideas on how to make this macro better. I haven't worked with macros too much (and this was my first exposure to batch files), so I am sure there is a lot I can learn. :-)
-Mike
Solved! Go to Solution.
My original macro ran into some issues when executed on Alteryx Server, but @patrick_digan was able to help me troubleshoot and update the workflow to ensure smooth and consistent execution whether run locally or on a server. Thanks Patrick!
I've attached the updated macro, which has also been augmented to allow the user to select how long the iterative macro should wait between iterations.
Has anyone ran into issues with this macro and received 'The score output "" was not a valid output' error? I've modified the initial macro inputs to point towards files on my PC, and when running the initial macro standalone, it runs fine. However, the above error is received when the initial macro is within the final macro.