Alteryx Designer Desktop Discussions

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

Custom Batch Macro

azakharyan
5 - Atom

Hello Everyone, 

 

I'm desperate for some assistance with a flow that was built by people who are no longer with my organization. 

 

Here is the issue. 

 

Inside of the flow, a custom batch macro was built to run some logic and write to an output tool and then the output to the batch macro is picked up and used in the rest of the flow. 

 

The batch macro has 3 inputs. 

  • Input 1 Title: Control (with upside down question mark) 
  • Input 2 Title: Input 11
  • Input 3 Title: Input 12

The "Control" input as well as "Input 11" are both grouped by "Rank" and "Input 12" has None for grouping. 

 

The "Control" input has 3 records, Input 11 has 12 records and Input 12 has 66 records. 

 

The Expected Output of the Batch Macro is 12 records. 

 

The problem is that this batch macro gives two different outputs depending on how I run it. In other words,

 

Run Scenario 1: what I have done is open a new tab in designer and have copied over the Batch Macro and have also copied over the inputs using "Text Input" tool. 

 

Run Scenario 2: I opened a second copy of the batch macro and have directly placed the "Text Inputs" with the data directly inside of the Batch Macro and connected them to the correct Dynamic Input tools. The problem is that when I open the batch macro, I can see where the "Input 11" and "Input 12" need to be placed by replacing the "Configuration" tools for Input 11 and Input 12. But for the life of my I have no idea what the 3 records in the "Control" input are doing. There is no Configuration tool inside of the macro for the "Control" input. 

 

When I run Scenario 1 I get 12 records as my output however the logic on the inside only gets applied to 6 of the records. The other six we are not sure what is going on with them. When I run Scenario 2 I get 6 records as my output. It seems that the "Control" input is somehow affecting my output depending on if I'm running the batch Macro with the inputs on the outside vs running the macro while having the inputs inside. Can someone please help me understand how I can figure out what this "Control" input is doing and why am I getting two different results when running the exact same logic. 

 

In summary, I need help figuring out the following: 

  1. What is the "Control" input doing?
  2. How Can I replicate the "Control" input inside of the Batch Macro?
  3. Why am I getting 12 records with Scenario 1 and 6 records with Scenario 2 as my outputs. 

 

 

 

 

1 REPLY 1
SPetrie
12 - Quasar

Its going to be next to impossible to really say what is going on with the macro without seeing it.

I can give your questions a shot though.

  1. What is the "Control" input doing?  - Its limiting what records are allowed to be processed by the macro for each run. Batch macros run multiple times either using the full data set fed to them, or on a subset that is limited by the control parameter and groupings. Its limiting it to one Rank at a time as the control and only ranks that match the current control are used inside the macro. 
  2. How Can I replicate the "Control" input inside of the Batch Macro? - You can limit the test data that the inputs are using to test one of the control runs, but you are not going to replicate the entire process because of how batch macros work. If you look at your results screen after running the macro normally, you should see it say the macro ran 3 iterations (one for each of the 3 inputs passed to the control parameter input). Its telling you it ran multiple times on different subsets of your data.
  3. Why am I getting 12 records with Scenario 1 and 6 records with Scenario 2 as my outputs. - Similar to above, its the nature of the batch macro. When you run data through it from the outside, you get the multiple iterations and the combined output at the end. When you run it from inside the macro, you get only one iteration using whatever test data you fed it. 

Blind guessing here, but its possible that the Control is a listing of target ranks, Input 11 is a list of possible ranks and some associated values, and Input 12 is the data to be actioned. So its being fed 3 possible ranks to group by, then  grabbing the matching rank and its values for that iteration of the macro, and using that info to action the data from Input 12. Then it moves to the next Control rank and repeats until it runs out of Control items.

For the records that dont appear to be actioned, do they have a Rank that doesnt match one of the Ranks from the control parameter? That could be why they get ignored if they dont meet the control criteria.

Again, that is 100% me guessing based off your descriptions and I could be completely wrong.

I hope that makes sense and is at least somewhat helpful.

 

Labels