Alteryx Designer Desktop Discussions

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

Batch Macro not processing files individually

marcus
6 - Meteoroid

I have a Batch Macro I'm trying to set up to change the input and output directory based on the user selected country (selected via listbox). I need to add total rows for each file, but when the batch runs, it's totaling records from all files and then adding that total to one of the files. If I add a group by to my summarize tool and then a union, I do get what I expect but it is adding some additional steps.

 

I thought a Batch Macro would process each file one at a time through the macro, which is what I want because I think that's just easier to understand and to set up for more complicated processing I want to do in the future.

.Batch macro group by settingsBatch macro group by settingsWorkflowWorkflowScreenshot 2025-02-20 090708.png

 

 
 

 

5 REPLIES 5
caltang
17 - Castor
17 - Castor

Is it possible to share your workflow? 

Just thinking that you are batching 3 things, and you need total rows… why not just batch load and use count rows + append the file name, then output it out? Wouldn’t that get you each file’s row count.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
marcus
6 - Meteoroid

I suppose I could but before I do I just want to know if Batch Macro is the right tool to accomplish what I want. As I said, I thought it would process each file through the workflow individually, but it seems to be doing something like a union on them. For simplicity, it would be great to just treat each file completely separately, run the workflow, then go to the next file.

OTrieger
13 - Pulsar

@marcus 
This is happening as you are using Macro Output, then minute that you do it the macro will union all the data together. If you will set the data output inside the batch macro it will take one file and process it and then write it out, then take the next one and do the same until processed all the files.

marcus
6 - Meteoroid

Thank you for confirming what I was seeing! I have adjusted my workflows a bit and moved entire sections to Batch Macros and I am getting exactly what I want on output.

OTrieger
13 - Pulsar

😀 Well done

Labels
Top Solution Authors