community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

Single .csv Output With Different Column Counts

Meteor

Hi all,

 

I am trying to produce a .csv output file that contains 5 different types of records. Each record type contains a different number of fields, and the data in them is different. Effectively it's 5 different tables joined on to each other.

 

I can produce the data, but when I output it to a .csv Alteryx pads the shorter records with additional commas to match the number of fields on the longest record type. To add further complexity, one of the record types needs to have some empty fields at the end.

 

Is there a way to create a single CSV file with different numbers of fields in it for each row?

 

See below for the output I'm producing, and what I want to produce.

 

Current output:

Capture1.JPG

 

Desired output:

Capture2.JPG

 

Thank you for your help!

Alteryx Certified Partner
Alteryx Certified Partner
Yes you can achieve this by doing the cancat of the fields into one single field itself comma delimited and then outputting the table as an undelimited (\0) .csv file.

You can easily do the concat by transposing your data and using the summarize tool.

Give this a go and let us know where you get stuck.

Ben
Meteor

Hi Ben,

 

This is great, thank you!

 

Sue

Labels