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 Ideas

Share your Designer Desktop product ideas - we're listening!
Submitting an Idea?

Be sure to review our Idea Submission Guidelines for more information!

Submission Guidelines

Field grouping

Hello,

A lot of time, when you have a dataset, you want to know if there is a group of fields that works together. That can help to normalize (like de-joining) your data model for dataviz, performance issue or simplify your analysis.

Exemple

 

order_id item_id label model_id length color amount

11A1015Blue101
21A1015Blue101
32B1015Blue101
42B1015Blue101
52B1015Blue101
63C2025Red101
73C2025Red101
83C2025Red101
94D2025Red101
104D2025Red101
114D2025Red101

Here, we could split the table in three :
-order

 

order_id item_id model_id amount

1110101,2
2110103
3210104,8
4210106,6
5210108,4
6320110,2
7320112
8320113,8
9420115,6
10420117,4
11420119,2

-model

 

model_id length color

1015Blue
2025Red

-item

 

item_id label

1A
2B
3C
4D

The tool would take :
-a dataframe in entry
-configuration : ability to select fields.
-output : a table with the recap of groups

<style> </style>

field group field remaining fields

1item_idFalse
1labelFalse
2model_idFalse
2colorFalse
3order_idTrue
3link to group 1True
3link to group 2True
3amountTrue

Very important : the non-selected fields (like here, amount), are in the result but all in the "remaining" group.

Algo steps:
1/pre-groups : count distinct of each fields. goal : optimization of algo, to avoid to calculate all pairs
fields that has the same count distinct than the number of rows are automatically excluded and sent to the remaining group
fields that have have the same count distinct are set in the same pre-group

2/ for each group, for each pair of fields,
let's do a distinct of value of the pair
like here

 

item_id label

1A
2B
3C
4D

if in this table, the count distinct of each field is equal to the number of rows, it's a "pair-group"

here, for the model, you will have
-model_id,length
-model_id,color
-length,color

3/Since a field can only belong to one group, it means model_id,length,color which would first (or second) group, then item_id and label

If a field does not belong to a group, he goes to "remaining group" at the end

in the remaining group, you can add a link to the other group since you don't know which field is the key.

<style> </style>

field group field remaining fields

1item_idFalse
1labelFalse
2model_idFalse
2lengthFalse
2colorFalse
3order_idTrue
3link to group 1True
3link to group 2True
3amountTrue

Best regards,

Simon

PS : I have in mind an evolution with links between non-remaining table (like here, the model could be linked to the item as an option)