This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Today, the behaviour of batch macro can be strange.
If I refer to https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Batch-Macro-not-looping-after-running-...
we can have big behaviour differences between :
-wf and app
-designer and schedulerExample here with a batch macro running for all lines in designer and only for line in scheduler
Designer works fineScheduler only runs the first line!!
I know the turnaroud (just use a message box) but it's not natural and I think
-at least the same behaviour is needed in any use case-if you want to do some optimization, ok, but make it an option!!
The explanation provided in the Link you referenced is good but left out some nuance.
So given this additional nuance maybe you could explain more fully the value of what you are asking for? Why would it be valuable to a developer or an end user running the app to have a job run and leave nothing to look at?
When run as an App the only evidence it even ran the iterations is if you can access the output log which end users would likely not be able to do.
Hello @fharper .Here my batch macro is used to drop a table through SQL code.What is after a drop? Well, nothing. Or sometimes some logging (and that's why there is an exit) but sometimes I use it, sometimes not, depends of the workflow.But the main reason I want this functionnality, it's that it's pretty dangerous, I mean, really dangerous and counterintuitive to have a different behaviour between running in desktop and scheduler.
I disagree on your characterization of the current behavior as very dangerous in this case. But that is just my opinion.
That said you may have an argument on modifying the optimization based on executing a tool that uses sql.
I would like to see the actual macro to see what u r are doing. What tool are you using to execute sql to perform a drop table?
Everything I suggest will sound like a work around rather than a solution but you can
1. Make your sql dynamic and put the tool executing the sql in the main flow vs macro.
2. add an output tool or pass out a record confirming the tables dropped which is more natural and good practice than using the message box as you mentioned.
3. Another option is to write a dynamic script to drop the tables in the macro and execute the batch from a run tool.
I suspect the optimization logic is complex and far reaching on how Alteryx runs and to tweak it is likely a more costly and complex problem than one thinks. So finding the best alternative for your need is probably the best you can do for now. But I’m not Alteryx so this is again just opinion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.