Alteryx Designer Discussions

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

Name parsing issue (text to column)

Pingu
9 - Comet

Hi all,

 

I have an issue with the text to column tool.

 

Before I was always lucky enough the delimiters that should not be delimited were within quotes or parentheses, but not this time.

 

The format is like 

 

{value1=470,type=370,work=House,city=Paris,name=Jack Ripper,loyalty=Yes, ... , ..., etc.}

 

Now the issue is that the name field sometimes contains , (comma's) as well which is used as the separator. So how can I make sure the fields are parsed correctly and not end up with a different amount of columns per row?

 

{value1=470,type=370,work=House,city=Paris,name=Jack Ripper,loyalty=Yes}
{value1=12322,type=32270,work=Houses,city=Amsterdam,name=Ron , Jans,loyalty=Yes}
{value1=1322,type=3220,work=App,city=Amsterdam,name=Mr , double, comma name,loyalty=No}
{value1=470,type=370,work=House,city=Paris,name=Testing test,loyalty=Yes}

 

Merci!

 

4 REPLIES 4
Christina_H
11 - Bolide

This was an interesting one!  I've used the = to find the headings, assuming each heading is only one word.  This won't work for multi-word headings without some modification.

Christina_Hurrell_0-1633701367927.png

 

atcodedog05
21 - Polaris

Hi @Pingu 

 

If you already know the column names you can use Regex to prase the values out which is next to column name like below.

 

atcodedog05_0-1633701716836.png

 

Hope this helps : )

Pingu
9 - Comet

Thanks very much @Christina_H  and @atcodedog05 they both work like intended. The regex one seems to be the best solution and easy copy past for the rest of the columns. The column names are indeed known beforehand.

 

(Sorry i couldn't accept both as solution).

atcodedog05
21 - Polaris

Happy to help : ) @Pingu 

 

Just an info share community allows you to accept more than one solution 🙂


Cheers and have a nice day!

Labels