Alteryx Designer Desktop Discussions

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

Batch Macro - They seem to run concurrently. How to Force to run Running Consecutively

AlexApolloni
7 - Meteor

Hello,

The summary is:  I suspect that the Batch Macro runs concurrently but I need it to run consecutively to give each iteration time to finish its interaction with the Tableau Server.  Is my suspicion correct and what do I do differently?

 

I have a Batch Macro which uses Rest API to download a data source from a Tableau server.

When I run it directly (so that it uses the Template Input (for Test as a Standard Workflow)->Text Input) it run's correctly 100% of the time (including manually putting in different data sources in the Text Input))

When I run it in Batch Macro mode so that I pass it 10 data sources, it only downloads a few of the data sources.

My guess is that the tableau server doesn't like 10 concurrent requests.

 

A few things are making me guess that it's not running the batch macro consecutively.  One, a seemingly random set of data sources are downloaded every time.

 

Another is that I added 2 message and a wait tool (below screenshot) and the Results Messages are:

First Message Tool - Data Source Name One  

First Message Tool - Data Source Name Two

First Message Tool - Data Source Name Three

First Message Tool - Data Source Name Four

2nd Message Tool After the Wait - Data Source Name One

2nd Message Tool After the Wait - Data Source Name Two

2nd Message Tool After the Wait - Data Source Name Three

2nd Message Tool After the Wait - Data Source Name Four

 

AlexApolloni_0-1677146602650.png

 

The macro runs a tar to unzip the Datasource and it's only one terminal window popping up instead of one for every iteration.

 

I have this problem with the Rest API.  Using the old Tabcmd (from Tableau...it's a cmd that gets installed on the Gallery), it runs correctly. I guess the authentication/interaction is more like a person doing something on a server unlike the RestAPI interaction.

 

(I'm still on Designer 2021.1)

5 REPLIES 5
FrederikE
13 - Pulsar

Hey @AlexApolloni

 

Is the AMP Engine Turned on in you workflow? Turning it off might help. AMP enables Alteryx to process multiple records at once, so this could cause an issue. 

Other then that you could try if the "Throttle" Tool is more helpful then "Wait a Second". 

willemb
7 - Meteor

From your description it sounds like it's behaving like a standard macro. Have a look at this post and make sure you are using a control parameter and/or control group by appropriately:

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/CS-Macro-Dev-Batch-Macros-when-to-u...

 

Also ensure it is saved as type Batch Macro:

willemb_0-1677151092982.png

 

AlexApolloni
7 - Meteor

Thanks for the replies!

 

@FrederikE  I had AMP turned off(put then tried it on  ¯\_(ツ)_/¯  and now it's back off).  

I tried adding the Throttle but didn't see an improvement.  Would you put it in the same place as the Wait a Second? I did that and set it to "1 Record per minute". 

AlexApolloni_0-1677153241687.png

 

@willemb Mmmm.. it looks like this...seems ok, no?

AlexApolloni_1-1677153351996.png

AlexApolloni_2-1677153372814.png

AlexApolloni_3-1677153382872.png

AlexApolloni_4-1677153398233.png

AlexApolloni_5-1677153464740.png

 

 

willemb
7 - Meteor

Try it like this, and then in the Control GroupBy field select DataSourceName again:

willemb_0-1677155219777.png

 

AlexApolloni
7 - Meteor

@willemb  

🎉

That did it.  

Now when I run it (in addition to seeing all of the data sources downloading)  the tar/unzip cmd windows pop up once per macro iteration vs previously when they seemed to get all bundled into one cmd run.

Very strange, I reread the post you pointed me to and I'm not really understanding why it's acting differently.

 

Thanks again, I definitely wouldn't have tried what you suggested based off of the documentation. 

Labels