Free Trial

Alteryx Designer Desktop Discussions

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

Setting up Batch Macro

Alteryxuserhere
8 - Asteroid

Hi there

Its the first time for me using batch macro and I'm trying to get my head wrapped in how to set it up.

Essentially i have a large dataset that I would like it to run a batch macro on every 10k rows of data as I would like to use the find and replace tool instead of join. Below I have set a dummy workflow, where the formula tool will create the [Batch Group] field that will split the data into groups of 10,000 rows. The Unique Tool then deduplicate the [Batch Group] field, so I can get distinct batch group values like 1, 2, 3,... for the control parameter.

Q1) Do i just leave the update value tool as is so that it uses the "Update Value (Default)"?

image.png
Q2) For my batch macro is this how I should set it up? I have left the default settings for the Control parameter and Update Value. For the filter tool, it ensures that only the rows belonging to the current batch (e.g., batch 1 or batch 2) are processed at a time.

Q3) What do I use to set up the input macro? 

 

image.png

Thanks a ton

8 REPLIES 8
OTrieger
12 - Quasar

@Alteryxuserhere 
For the first picture, you do not need to have any Control Parameter Tool. 


OTrieger
12 - Quasar

To set the Control Parameter select the Batch Macro to see the Configuration window. Then you will need to selected the field that you would like to be used as the variable for the Control Parameter

OTrieger
12 - Quasar

There will be 2 tabs, Group By and Questions. Click on the Question and select it from the DropDown list.

OTrieger
12 - Quasar

For the second question it will be much better to connect the Control Parameter tool to the Filter too with Q to Q. The action tool is not needed.

OTrieger
12 - Quasar

Q3, there are several ways how to go about. I like create an output of data from the last tool that connected to the batch macro. And then connect that file in the Macro Input tool. This will be useful if later things will change in your input data and then you will need to modify the macro itself. So create an output file and in the Macro input you have 2 option, select the 2nd one and connect that file to it.

Another way will be to set the top option with some manual data. You can copy and paste it from excel or whatever.

There are at least 2 additional way however I guess the above will be a good start.

Alteryxuserhere
8 - Asteroid

Thanks! That was very helpful

What do I need to link to the Macro to complete it?
 image.png

 

image.png

In the questions tab, what do I need to do to be able to select a field? When i click the drop down no options are availableimage.pngimage.png

apathetichell
19 - Altair

first off - turn off field mapping on your input. That's your main data source -and you should feed it in via your main/outer workflow. second. go to interface designer. configure it to union by name.

 

third - if this doesn't work -> check out your action tool. In your situation - your action tool should replace the string 1. That assumes that '1' is a string... if 1 is a number - your filter tool should be changed. in both cases - your action tool should be set to replace a specific string (1)

OllieClarke
15 - Aurora
15 - Aurora

Hey @Alteryxuserhere 

You've got data going into the control parameter (the upside down ?), but you don't have data going into your macro input.

I think you need to connect your formula tool (before the unique) into the macro input (the green input anchor at the bottom left of your macro). This will let you assign fields in your config

Labels
Top Solution Authors