Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Run one file at a time through workflow

JUUP
7 - Meteor

Hello,

 

I have a set of .csv files in a directory that need to run through a workflow one at a time. It seems like the correct way to do this is a macro, so I added a control parameter above the Input Tool and set the Action Tool to Update Value > {the file name}. I set the Workflow Type to Macro and ran it, but it only runs the 1st file in the directory through the workflow. I'm not sure what on my settings is incorrect, appreciate any guidance you can share.

 

Thanks,

Jackie 

2 REPLIES 2
T_Willins
14 - Magnetar
14 - Magnetar

Hi @JUUP,

 

Without seeing your workflow it is hard to diagnose the exact cause, but is your macro now a tool in another workflow?  Just saving a workflow as an iterative macro will not make it iterate unless part of another workflow.  Running the macro stand-alone only makes it run once.  What you are describing, though may be better suited for a batch macro, but even then there may be a simpler solution.  If all the data in the .csv files is the same format, can you bring in all files at once, include the filename as a field, then use the filename to parse the data into separate outputs?

JUUP
7 - Meteor

Hi @T_Willins ,

 

The macro wasn't in a workflow, I had thought testing it on its own would run through all of the files. After I added it to a new workflow per your suggestion, it ran perfectly and picked up all of the files in the folder.

 

To answer your question, I had tried that initially but the data being brought in is text data from a grid with several rows and some of the parsing is dependent on the row numbers. I ran into issues where the rows that were supposed to be selected weren't in the correct places because all of the data was combined.

 

Thanks very much for your help!

Jackie

Labels