ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

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

toral
メテオロイド

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件の返信4
Inactive User
適用対象外

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

Hope this helps!

flying008
オーロラ

Hi,@toral 

 

FYI.

 

录制_2024_08_09_13_56_54_223.gif录制_2024_08_09_13_58_59_983.gif

 

Raj
ネビュラ

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

mark done if solved.

toral
メテオロイド

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

ラベル
トップのソリューション投稿者