Hi,
I am trying to read multiple files through batch macro but for some reason it is not reading all the files. I thought this is a simple one but I am unable to understand the root cause of this behaviour for not getting desired output! I am attaching data and worflow package for your reference.
Any assistance on this will be highly appreciated. Thanks!
Solved! Go to Solution.
I don't believe the dynamic input tool can work with wildcards.
It needs to have the full path accessible.
If you change the process to pass through the full file path and update your dynamic input to use that. That should then work for you.
Thanks
Joe
Ps, there are lots of solutions in the challenge that you can see how they are done 😉
So it does (you learn something new everyday!)
It looks like the issue you had was the settings in the dynamic input tool around modifying the SQL.
I changed it to these:
And updated the formula to:
This then powers through them.
Another tip is to have the input file name as a field as well:
Hi @JoeS
Though I had tried all these options before, I tried it again as per mentioned settings, but no luck. When I test it individually inside macro it always produces expected result for that particular input, but when I run it from workflow it only produces one row as shown below!
Sorry to bother, but your help on this will be much appreciated! Thanks.
This may seem strange, but try connecting a browse to the output of the macro in you main workflow. You're probably seeing a message similar to "1 iterations were run (ended by a downstream tool)" in your workflow output.
It seems that the Alteryx engine only runs one iteration of a macro if the output isn't used in the main workflow since the data isn't needed anywhere. If your macro doesn't output data, try removing the Macro Output tool from within it.
Dan
A batch macro will only run one batch if there are no downstream tools. If you add a browse to the output anchor that may be all you need.
Edit: looks like @danilang beat me to it on the slow train WiFi!
🙂
Thanks @danilang
This did the magic!! New thing I learnt!