Alteryx Designer Desktop Discussions

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

Batch Macros vs. Iterative Macros - that is the question

Archaeopteryx
10 - Fireball

Hi,

The objective of the macro I've made for this workflow is to cycle through a csv file of many rows and two columns and replace two parameters in a URL, the /Conversation ID/ and the /Evaluation ID/ in the API call. See screen shots.


Then, when the API call has connected, I parse the JSON and send that to a csv file and name the csv file based on the two parameters aforementioned to keep the several documents separated. The objective is to run the next line of /Conversation ID/ and /Evaluation ID/, put that in the URL and run the call again with the new parameters - create a new .csv file and repeat to the end of the file. 


I'm getting a parse error inside the macro, " a separator has to be used between operands ". So, I'm not certain how the macro should be set up for this use case to clear the error. 

 

Let me know if I should provide more information. 

 

Thank you for any assistance.

Chris

5 REPLIES 5
afv2688
16 - Nebula
16 - Nebula

Hello @Archaeopteryx ,

 

try this approach:

 

Untitled.png

 

Regards

Archaeopteryx
10 - Fireball

Hi afv2688

 

Thank you for the input. The changes to the workings of the macro work great. I get all the different URL variations. The workflow leading into the macro raises questions though. I'm not sure what to pass to the Macro's inlet that looks like an upside down question mark. Then, configuring the macro in the workflow is a little confusing. I'm presented with the tabs, "Group By" and "Questions". I do not need to Group anything, so I leave that tab alone. The Questions tab - - - well, not sure what to do there. I'll keep researching. 

 

Thank you,

Chris

afv2688
16 - Nebula
16 - Nebula

Hello @Archaeopteryx ,

 

the upside-down quesionmark is the input for the variables on the batch macro. On the question tab within the macro yo select the different parameters you want to run together, meaning that the same parameter on the same row will be the modificaitons set on the workflow to run.

 

On the case I'm writing below, on the first batch record "A" will be the parameter for conversations while "a" will be the one for the enviroment ID. On the second one, "B" and "b", etc.

 

The outputs are then written and unioned them together.

 

Run noConversation IDEnviroment ID
1Aa
2Bb
3Cc

 

Hope this helped to clarify a little bit.

 

Regards

Archaeopteryx
10 - Fireball

The api.yxmc showed me how to create all the necessary API URLs for each conversation id / evaluation id pair.

Taking those API URLs, the endeavor is to send each of those newly generated API URLs as API requests. Is it possible to send each dynamically created API URL via the one macro? 

 

Thank you,

Chris

afv2688
16 - Nebula
16 - Nebula

Hello @Archaeopteryx ,

 

The download tool can accept multiple rows as an input and will process each request separately, outputting the results together afterwards. There is no deed to worry about it.

 

Regards

Labels