Alteryx Designer Desktop Discussions

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

Single .csv Output With Different Column Counts

Sue
7 - 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!

2 REPLIES 2
BenMoss
ACE Emeritus
ACE Emeritus
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
Sue
7 - Meteor

Hi Ben,

 

This is great, thank you!

 

Sue

Labels