Troubleshooting a Batch Macro | Alteryx Tip

by Angelos Pachis

Have you built your batch macro and for some reason you get only a single record at the output? Have you then spent hours trying to figure out what’s wrong and you still have no idea what’s going on? Well dear reader, you would be more than glad to know that you are not alone. It happened to me and I’ve spent the better of an hour to find the solution which I am at the pleasant position to share with you.

The workflow

The target of the workflow I was working on was to consolidate data having different schema from different Excel tabs. This application is where batch macros come in handy since you can configure the output mode of your batch macro by name or position.

My aim was to create a nested batch macro. Essentially, I had to make this workflow a part of another batch macro and hence I had to make sure that the former produces the right results. However, when I was running my workflow, I kept getting a single record in the output. No errors, no warnings, nothing! Only this message in the results window saying:

“1 iterations were run (ended by a downstream tool)”

What’s a downstream tool? I’ve never heard of that before, it doesn’t ring any bells. No warnings or errors means that everything is running smoothly, right? But for some reason, my batch macro wasn’t working. Or so I thought.

The solution

Add a Browse Tool after you Batch Macro !

It’s so simple and still I have spent all this time changing file directories, renaming fields, exchanging whitespaces with underscores, checking the Interface Designer window. As I found out searching in the Alteryx community, this is an artefact of how Alteryx used to work, where the use of the Browse tool was necessary. If you don’t have any other tool connected to your Batch macro output, the macro is unaware of how many iterations should run or when to stop and runs a single iteration returning a single output as a test.

Thankfully, I remembered rather sooner (?) than later that we’ve been warned about this Batch Macro behavior during our training with Peter Silvester and Andre de Vries.

Thank you for reading my blog and hopefully this tiny tip will save you a lot of time. Fail, be curious and never stop learning!

P.S.

Credits to Bobe for providing this explanation to the Alteryx community.