Hi all,
I have a standard macro which has one input row, containing two columns (a table name and an ID).
I don't know if this is relevant but the macro contains, among others, a Dynamic Input tool which I use to delete records from a SQL Server table.
In the SQL Editor of this tool I have this query:
"Select 1; Delete From [table] Where <condition>;"
In the tool configuration, I then replace the string [table] with the table name that I have as input of my macro, and <condition> is replaced by a WHERE clause which I generate inside the workflow.
Now, when I run this macro in isolation for a particular table name and ID, it executes the query 115 times (one for each WHERE clause that I have generated). It continues one and does some more stuff. All fine. Takes around 15-20 minutes to finish.
However, here's the problem: when I invoke the macro from another workflow, with the exact same table name and ID, I see that it only executes the query 2 times, and stops after 3 minutes.
Does anyone have any idea why there's a difference between running the macro on its own and invoking it, even though the parameters are exactly the same?
Solved! Go to Solution.
Do you have an output from you macro? Make sure you have a browse coming out for Alteryx to populate if you have got a batch macro
Do you get a message about ended by downstream tools?
Hi, thanks for your reply.
No, my macro does not have a macro output tool in it, though it has some regular output tool which come after the aforementioned Dynamic Input tool.
The macro is a standard macro, not a batch macro.
Yes, I get a message about ended by downstream tool. It says the second of the two deletion queries is ended by a downstream tool.
What does this mean?
It does have some regular output data tools in it which follow it, I should add.
I mean Dynamic Input tool in OP, not Input Data tool
Is there any chance you could upload your macro?
@danilang suspicions are the same as mine, but would be good to check the macro itself to see.
That makes sense and was my first thought too. So what can be done?
Sadly I can't upload my workflow due to restrictions from my company.
I read the other thread and I should mention that right after my Dynamic Input Tool (with configuration as posted in OP) I immediately do a Sample 1. My macro ends in two branches, both of which are Output Data tools.
Hope that provides some more insight.
Without knowing the exact configuration it will be a bit of guess work, but yeah using a sample and setting it to Last N Records and setting N to 1 may well do the trick!