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

Alteryx Designer Desktop Discussions

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

CSV parse, probably something simple I'm missing

Carluccio555
9 - Comet

I have imported a CSV with all data in a single field as follows:

 

Dog";"Cat";"bird";"monkey"

 

This effectively makes the delimiter ";"

 

What is the best way to parse this? Also the field heading similarly is a bunch of headings in one which also needs to be parsed.

 

thanks 

7 REPLIES 7
alexnajm
17 - Castor
17 - Castor

There's a few ways to tackle this:

  • Use a Text to Columns to split on the semicolon, and then use a Formula / Multi-Field Formula after to TRIM the quotes
  • Use Regex to split to columns based on the ";" - a little more complex but doable
  • Use a Formula to replace ";" with a single character (like a pipe |) and then use a Text to Columns after on that single delimiter

Getting a file would be useful to help further - good luck!

CoG
14 - Magnetar

Have you set the Delimiter value to ";" in the input tool?

CSV Import 1.png

Carluccio555
9 - Comet

Thanks!

Qiu
21 - Polaris
21 - Polaris

@Carluccio555 
We can first remove the " by Replace function then parse with ;

For the headings, we can use Dynamic Rename tool.

1201-Carluccio555.png

Carluccio555
9 - Comet

@Qiu so I have parsed and field headings looks as follows:

 

image.png

 

Is there an easy way to parse the field headings within the rename tool? Or do I need to extract separately, parse and then dynamic rename

Qiu
21 - Polaris
21 - Polaris

@Carluccio555 
I would tick off the option "First Row Contains Field Name" option when bringing the data, then parse the data and finally rename the data field with the first row of data with a Dynamic Rename tool.

Carluccio555
9 - Comet

Easy peasy, thanks!

Labels