Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Export multiple csv based on formula results

max_hfr
8 - Asteroid

Hi, so I have a database which contains events (eg. EF11RO9)

 

Each event can occur multiple times. 

 

I need to make one csv output per event. So the idea is that i need a formula that could join the same events in a different file. 

 I have more than 2M lines and about 500 000 events so it's pretty impossible to make 500 000 outputs.

 

So if you have any idea for:

- The simplest formula to achieve the sorting

- The fastest way to export every table as a csv

 

Thanks in advance 

 

(Unfortunately i cannot share the dataset)

 

 

 

13 REPLIES 13
max_hfr
8 - Asteroid

Hi David, 

 

Sorry for bothering you again. I have tried to reproduce the last workflow you've sent me but I am having issues.

 

I have attached both my macro and the input file. There is a select at the begining of the workflow, because i don't want the second column (Event type) to be part of my output.

In the first part of the workflow when I link it to the marco I am getting more question then just (parameter 5) and I don't understand why

1.PNG

 

 

On the second hand, inside the macro when i use the TILE tool it shows me all the column names instead of showing me (id, name and value)

2.PNG

 

 

Do you have idea?

DavidP
17 - Castor
17 - Castor

I think something went wrong with the filter tool and action tool in your macro.

 

You can literally just use the macro from my last post in your workflow (as attached to this post)

 

One key thing to note: In the last version of the workflow and macro that I posted, I moved the Transpose tool out of the macro and into the workflow. That means that the input data structure of the macro has changed (it's a transposed version of the input file grouped to ID), so the macro input has to be updated to this format.

 

Because you're choosing the input file as a macro input, this is the wrong format, which is why the rest of the macro doesn't work.

 

If you have any problems importing and running the attached, give me a shout.

 

 

max_hfr
8 - Asteroid

Hi David,

 

I thought I had to reproduce it in order to make it work.

 

I'll try to reproduce it another time but for now I can export my files using yours.

 

Thanks a lot again! 

max_hfr
8 - Asteroid

Hi David,

 

I am sorry to reopen this thread but I am having an issue at the moment with the macro you've made for me. 

 

If you do not remember the macro was made to divide a large file into multiple smaller files.

 

My problem is that the columns have to be arranged in a certain order in the output and i can't change it. I have tried using selects on multiple parts of the workflow but nothing changed.

 

I have attached a workbook aswell as the original macro you made.

 

the input file contains:  ID ; First Name; Last Name ; Code

 

The output shows:  Code ; First Name ; Last Name

 

I need the output to look like:   First Name; Last Name ; Code

 

 

Do you have an idea on how i can change the column order in the output.

 

Thanks in advance,

 

 

Max 

Labels