Alteryx Designer Desktop Discussions

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

How to create a batch macro with 2 control inputs

kayogunbo
7 - Meteor

Dear Team,

 

I am trying to extract data from some large tables and i am looking a way to create a Batch macro input that uses variable year and month data in extracting the data.

 

Year format is "YYYY" while month is formatted as "MM".

 

Year Structure:

NameSelectionOperatorLowKeyHighKeySplit
RYEARIEQ2024 True

 

Month Structure:

NameSelectionOperatorLowKeyHighKeySplit
MONATIEQ01 True

 

The macro should dynamically change the "LowKey" values for both tables. These tables will then be joined using the union tool and then fed into another tool to extract the data. Then i want this data saved into a folder that has this structure automatically: YYYY > MM > "output.csv". If the folder doesn't exist then it should be created.

 

For example, if extracting data for 2022, the macro will cycle through months 01 to 12, then move to the next year in the list.

 

Inputs:

Years (>= 2020): Generated using the "Generate tools".

Month: 01 - 12

 

Many thanks in advance for your help.

 

6 REPLIES 6
danilang
19 - Altair
19 - Altair

Hi @kayogunbo 

 

Can you provide some sample input and output data?

 

Thanks

 

Dan

griffinwelsh
11 - Bolide

You can concatenate the two fields to create a single input with a delimiter and then use update by formula to parse your control parameter within your actions that feed off of the control parameter.

kayogunbo
7 - Meteor

Hi Dan,

 

This is the input tables table 

 

NameSelectionOperatorLowKeyHighKeySplit
RYEARIEQ2024 True

 

Month Structure:

NameSelectionOperatorLowKeyHighKeySplit
MONATIEQ01 True

 

Final outcome will change the Lowkey for the upper year (1st Table) and another one will change the month data (2nd Table). This data are then now combined into an output macro that is then fed into another tool.

 

Combined table would look like below:

 

NameSelectionOperatorLowKeyHighKeySplit
RYEARIEQ2024 True
MONATIEQ01 True
apathetichell
19 - Altair

This is with the a DVW SAP Tool - correct? You'll need to use two control parameters - and two action tools - these will feed into the tool's parameters - my memory is that there is a ton of trial and errror in trying to figure out where the selectors are in the tool (there's like 100 different components and things aren't labeled great). I don't have access to a system with DVW or even SAP ECC so I can't really help more than that.

kayogunbo
7 - Meteor

Indeed. Its a DVW SAP tool.

 

I dont have a problem with the SAP tools though, just that i need to be able to iteratively change the year and months without the need to manually do it myself.

 

Considering your suggestion, is there a way that you can provide a sample workflow. I would love to pick a year and run the month input from Jan - Dec before moving to the next year in the list.

 

Many thanks!

kayogunbo
7 - Meteor

Marking it as solved. Reached out to the DVW team and they already have a solution that works for my use-case. I should have probably done that from the onset 😅.

 

Thanks everyone for for the advice and pointers.

Labels