Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Text to columns

hungdm
8 - Asteroid

I have a csv file that include the information below:

  • input:

name1="value1" name2="value2" ..... nameN="valueN"

 

I would like to create 2 new column containing the data as below:

  • expected output:

 

NameValue

name1

value1
name2value2
... 
nameNvalueN

 

Thanks for reading!

3 REPLIES 3
paulfound
11 - Bolide

Hi @hungdm 

 

Bit of regex for you. First split by row and then split to columns. It cleans up all white space within the regex so no need for data cleansing tool.

 

PaulFound_0-1599232572030.png

 

 

grazitti_sapna
17 - Castor

Hi @hungdm , you can try this if it works for you?

grazitti_sapna_0-1599203086585.png

 

Thanks.

Sapna Gupta
echuong1
Alteryx Alumni (Retired)

You actually just need two text to columns to parse out your data. Given that each "group" is separated by a space, you can use a space with the text to rows function. After that, the name and values are separated by an equals, so you can use that as a delimiter to create two columns. 

 

I added a data cleansing to remove the quotation marks and a select to rename the fields.

 

echuong1_0-1599229080857.png

 

Labels