Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Split a stream into multiple streams based on values in a specific column

dmitry_berman
7 - Meteor

Hi All,

 

I have the same problem as in this question:

https://community.alteryx.com/t5/Alteryx-Connect-Gallery/Split-a-stream-into-multiple-streams-based-...

 

Basically need to split data into multiple streams based on the values in a column. Question: Is there a way to do this without dumping the data into an intermediate set of files? 

 

Thanks

7 REPLIES 7
TonyM
Alteryx Alumni (Retired)

Hi @dmitry_berman

 

I believe you are looking for the Filter Tool. Would there be any dynamic reasons where a filter would not work?

 

Thx,

dmitry_berman
7 - Meteor

Hi TonyM,

 

The column I'm splitting on can have many different values which are not always present and I'm not 100% positive of the "universe" of values that may appear. A "filter chain" in this case would be very cumbersome to set up and error prone.

 

Thnx

Kenda
16 - Nebula
16 - Nebula

Hey @dmitry_berman! I'm not sure what the magnitude of "many" is in your case, but several filters is the only thing that I can think of that might work here to get multiple streams of data. Since you don't know what the actual values will be, though, you could use a Summarize tool to GroupBy the field the values are coming from, add a RecordID, then some filters based on RecordID =1,  2, 3, etc. This should eliminate your 'error prone' issue from your previously reply, but maybe not the cumbersome part. 

BenMoss
ACE Emeritus
ACE Emeritus
Hey,

I beleive the best option his is an iterative macro, here’s some documentation about what they allow you to achieve:

https://help.alteryx.com/9.5/IterativeMacro.htm

https://youtu.be/xExR3-rmcDc

A quick summary would be that it lets you to split your data into chunks, this can, as in your instance include into the different members that exist within a column.

You can iterate your members through a workflow where they are processed before being bought back together at the end of the macro.

Ben

KaneG
Alteryx Alumni (Retired)
vishwa_0308
11 - Bolide

Hi @dmitry_berman,

 

You can do some configuration in the output tool as given below, It will create files by grouping your desired column values. You will get as many files as  distinct values exists in that field.

 

SplitFilesAsPerColumn.jpg

MemphLantAntonio
8 - Asteroid

Depending on how many values you expect, this is simpler than a batch macro. I had a similar issue and just summarized by the values in the field in question, assigned a record ID to them, and then did filters by the record ID. If you had a relatively small amount of values per run, even if the values differed day to day, you could capture them all this way.

Labels