We're excited to announce that we'll be partnering with Credly starting October 19th - see what this means and read the announcement blog here!

Alteryx Designer Discussions

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

How to Split a CSV Out When New Record Starts on New Row

kurtwz
8 - Asteroid

Hello!  I'm having trouble working with the following dataset.  As you can see, the data are separated by commas and a new record starts on a new row.  However, the last field from any record is not followed by a comma between that field and the first field on the next record.

 

kurtwz_0-1584455989085.png

 

Can anyone give me tips on how to neatly transform this into a table with columns and rows?  Ideally after I figure out how to parse it out, I will not even go the route of reading from a CSV.  The CSV was an intermediate step, but I was originally reading from a webpage and only put a .cvs step in there because I thought it might allow me additional flexibility in parsing the data.

 

Thanks!  Kurt

 

5 REPLIES 5
Greg_Murray
12 - Quasar

Hi @kurtwz,

 

You can use the text to columns tool to split to rows on new lines. See attached. 

 

Greg_Murray_0-1584456786547.png

 

fmvizcaino
16 - Nebula
16 - Nebula

Hi @kurtwz ,

 

Take a look at the attached example and let me know if this works for you.

fmvizcaino_0-1584456905772.png

 

 

 

Best,

Fernando Vizcaino

grossal
15 - Aurora
15 - Aurora

Hi @kurtwz,

 

I wouldn't attempt to solve this in Alteryx, I'd quickly fix the input.

 

Remove the first row "DownloadData" and the first two characters in the second line as well as the last character at the end of the file and it's a perfect csv file that works with default settings in Alteryx.

 

grossal_0-1584457208085.pnggrossal_1-1584457245599.png

 

 

Regards

Alex

kurtwz
8 - Asteroid

Thanks very much for the support, Fernando!

kurtwz
8 - Asteroid

Worked like a charm and you win the speediness race!  That was too easy for you, though! 😛 Thank you for the help Greg!

 

 

Labels