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

Alteryx Designer Desktop Discussions

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

Is it possible to create new column based on a key/value pair in the input file?

rrapelje
5 - Atom

I have a sample data set that looks like this:

 

Resource GroupResource Group tagsSubscriptionSubscription tags
aaaaenv=prod;owner=bob;management=partialwwwwsubowner=jack;billing=13982
bbbbowner=sam;compliance=soc2;management=full xxxxsubowner=jill;compliance=soc2;billing=13983

 

 

I know I can do text to columns and split the Resource Group tags into multiple columns delimited on the semicolon and then I end up with something that looks like this:

 

Resource GroupResource Group tagsSubscriptionSubscription tagsResource Group tags 1Resource Group tags 2Resource Group tags 3
aaaaenv=prod;owner=bob;management=partialwwwwsubowner=jack;billing=13982env=prodowner=bobmanagement=partial
bbbbowner=sam;compliance=soc2;management=fullxxxxsubowner=jill;compliance=soc2;billing=13983owner=samcompliance=soc2 management=full 

 

 

Ideally, I would like the column header to look like this:

 

Resource GroupResource Group tagsSubscriptionSubscription tagsenvownercompliancemanagement
aaaaenv=prod;owner=bob;management=partialwwwwsubowner=jack;billing=13982prodbob partial
bbbbowner=sam;compliance=soc2;management=fullxxxxsubowner=jill;compliance=soc2;billing=13983 samsoc2 full 

 

 

3 REPLIES 3
JagdeeshN
12 - Quasar
12 - Quasar

@rrapelje ,

 

Have you tried using the formula tool with this formula:-

 

Right([Field1], length([Field1])-FindString([Field1], "=")-1)

 

This will remove everything before the '=' in your text. For eg 'env=prod' will become 'prod'. You can then use a select tool to rename the columns.

 

Hope this helps.

 

Best,

Jagdeesh

binuacs
21 - Polaris

@rrapelje your method was correct. once you use the text to column tool you need to use the Transpose tool again one more text column tool then the Cross tab tool should do the work here.

 

binuacs_0-1649794480429.png

 

rrapelje
5 - Atom

I appreciate your help and thanks

Labels
Top Solution Authors