Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Batch macro

dpan
6 - Meteoroid

I would like to create a batch macro to process the data below. Iterate through the settings table, one process for each row. Append the three columns in settings to each group of data using column one as control parameter.

 

settings

A345
B127
C444

 

data

A13276
A23417
A44456
B87934
B34321
C33430
C33428

 

The output should be three files. One for each row in settings.

 

A13276345
A23417345
A44456345

 

B87934127
B34321127

 

C33430444
C33428444

 

Each iteration would produce one of the output files above. If someone could please give me insight, is this possible and how would I achieve this?

 

 

3 REPLIES 3
Thableaus
17 - Castor
17 - Castor

Hi @dpan 

 

You don't need a Batch macro to do the job here.

 

Just use a join tool to append the desired columns, and then use the Output Data tool configured to produce a file for each instance of your "Letter" field.

You can set the file name appending suffix/prepending prefix, or even creating an entire different file path for each file using a Formula Tool before the Output Data tool.

 

Thableaus_0-1662656375136.png

 

 

Cheers,

Emmanuel_G
13 - Pulsar

Hi @dpan ,

 

Find attached a way of doing that.

 

Each file contains the lines of unique letters.

 

Let me know if there is an issue.

 

Emmanuel_G_0-1662658937707.png

 

dpan
6 - Meteoroid

My over simplification of what I am after caused confusion. Each of those outputs would be processed further using those three new columns to use as counters of rows to include in the final outputed files. So I am not sure your approach would work. I need those datasets at the beginning of each batch to manipulate and create the final files. Those columns would be: Give me a file that consists of x rows with the earliest date, where x is the first column value. Then y rows with the earliest date, where y is the second column value. And so with the third column.

 

I am new to Alteryx, coming from JAVA programming. So what I am trying to achieve is the equivalent of a loop in which I take each group (A,B,C) and apply the settings to each to produce a separate file for each group.

Labels