Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Multiple csv output files with constant few rows in each file

keyur_ubs
6 - Meteoroid

Hi,

 

I have a workflow where I am creating multiple csv output files. All the csv files are generated fine.

 

However, I need to have a few rows of data as constant on each of these output files. Attached sample format for reference.

 

Can someone please help?

 

Thanks 

Keyur

6 REPLIES 6
Goppi
7 - Meteor

It would be good if you could share the workflow with a mockup of the two input files. Otherwise people make an effort and it might not work with the way you designed your workflow.

 

Goppi

JoshuaGostick
11 - Bolide

Hi @keyur_ubs,

 

 

To get the same format of your outputs, you could use the Union tool and select Auto Config by Position. This will allow the rows from Input 2 to be stacked on top of Input 1. Make sure that the Output Order is correct so that Input 2 is at the top

 

The Union tool should be configured something like this.

 

Union on Position.PNG

 

Would this be a good start for helping you with your issue? Please let me know if you have any further questions.

 

 

Thanks,

Josh

keyur_ubs
6 - Meteoroid

Hi Josh,

 

I tried that, but that would stake the rows from Input 2 on top of Input 1. But for output, I need to split data from Input 1 into multiple output file by field 1 of Input 1 and each of these output csv file should have those rows from Input 2 staked on top of the data. 

 

Thanks 

Keyur

keyur_ubs
6 - Meteoroid

its a simple workflow. I am using two inputs as shown in sample excel. Data of Input 1 is split into multiple output files depending on field 1.

 

All I need is a way to stake rows from Input 2 on top of each of the dynamically generated csv file. 

JoshuaGostick
11 - Bolide

Hi @keyur_ubs,

 

I understand. I've created a workflow that should hopefully solve your solution. In brief, it uses the list of letters from Input 1 to create multiple output files and then uses sorting logic to ensure that it is in the right format.

 

You will need to change the Output tool at the end so that it is pointing to one of your folders instead of my one.

 

Let me know if you have any questions.

 

Multiple CSV Output Files.PNG

 

 

Thanks,

Josh

keyur_ubs
6 - Meteoroid

Hi Josh,

 

Thank you for the solution. I implemented it on my actual data and it worked perfectly as expected.. 

 

I observed one thing about Append Fields tool - if there are more than 16 values in the summarize tool before, it gives error. Does this means that the Append Fields tool has a limit of 16 fields?

 

Thanks a lot.

 

Keyur

Labels