Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Single line to column

RVDL
8 - Asteroid

Hi All,

 

I have a file containing a single line such as below:

"Type=X, Date=2025/12/31, Amount=100, Type=Y, Date=2030/06/30, Amount=25",

 

I want an output file containing the data as shown below:

TypeDateAmount
X2025/12/31100
Y2030/06/3025

 

Note 1 - the double quotes and the final comma are part of the data as well.

Note 2 - the actual data contains many more columns and rows, so the solution should not assume there are only 3 columns and 2 rows.

 

Thanks.

2 REPLIES 2
davidskaife
14 - Magnetar

Hi @RVDL 

 

Here is one way of doing it, not very elegant though! I've added comments under each tool as to what its doing, but its based on the assumption that the first column of the row you need will always be 'Type'

 

I've set the second Text to Columns tool to parse out to 100 columns, to show that it will work if there are less columns within the data.

 

Capture.PNG

RVDL
8 - Asteroid

@davidskaife Thank you.

Labels
Top Solution Authors