Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Dynamically create batch groups

knozawa
11 - Bolide

Hello,

 

Is there any way to dynamically create batch groups?

 

The record number of input file is different on each project.  In order to run the file within the batch macro, I would like to split records into small groups.  I would like to assign batch group by every 10,000 record.  


Desired output contains "batch" column to specify the batch number.

desired output.png


I used a formula tool to do so, but this is not dynamic at all.
create batch group.png

 

Is there any way to dynamically assign batch group?  I've attached a sample workflow.

 

Sincerely,

knozawa

5 REPLIES 5
DavidP
17 - Castor
17 - Castor

Would you be able to use the Tile tool with Equal Records option to create batches?

Thableaus
17 - Castor
17 - Castor

Hi @knozawa 

 

What about a Multi-Row Formula Tool?

 

BatchMulti-Row.PNG

 

WF appended.

 

Cheers,

knozawa
11 - Bolide

Hi@DavidP ,

 

Thank you for your reply.

 

I think equal records option is good when the maximum number of records is the same for all input.  However, I might have 100,000,000 records or sometimes 500,000 records.  If I would like to separate batches by 10,000 batch records, I'm not sure if we can do that using the tile tool.

 

Sincerely,

knozawa

knozawa
11 - Bolide

Thank you, @Thableaus

 

This is my first time seeing the MOD function. Good idea.

 

Sincerely,

knozawa

CraigG
6 - Meteoroid

Hi

 

I noticed you have a RecordID. Below is the formula I would use to create the BatchID for batches of 10,000 records

 

FLOOR(ToNumber([RecordID])/10000)

 

Kind Regards

Craig

Labels