Alteryx Designer Desktop Discussions

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

Add new column for each group based on the corresponding id for from parsed json groups

toral
6 - Meteoroid

Hi,

 

I am parsing json response and grouping the json objects using regex. For certain elements, I can have 0-many sub elements. consider this: 

 
json_namejson_valueStringSNColnew_column
0.typesample0type123
0.id1230id123
0.statusactive0status123
0.0.linkabc.def00.link123
0.1.linkasd.fgh01.link123
1.typesample_11type555
1.id5551id555
1.statusactive1status555
1.0.linkpqr.def10.link555
1.1.linklkj.fgh11.link555
1.2.linkwer.tyu12.link555

 

SN 0 represents an element group and SN 1 represents another element group. new_column is the column I want to derive based on id value for each of these groups. The reason to do so is for me to create the following csv: 

 

 

idlink
123abc.def
123asd.fgh
555pqr.def
555lkj.fgh
555wer.tyu

 

Could someone please suggest ideas as to how to assign the id value for rows belonging to the same SN group. 

4 REPLIES 4
stataltgee
8 - Asteroid

@toral Use formula tool to create 'new column'. The condition would be: "if [SN]=0 then 123 else 555 endif "

Hope this helps!

flying008
14 - Magnetar

Hi,@toral 

 

FYI.

 

录制_2024_08_09_13_56_54_223.gif录制_2024_08_09_13_58_59_983.gif

 

Raj
16 - Nebula

@toral 
find the workflow attached
made this dynamic so you can use with original data set as well.

mark done if solved.

toral
6 - Meteoroid

Appreciate all the suggestions and responses. Thanks much. I used the solution suggested by flying008

Labels