Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Exporting Multiple Text Files

pacopenamedina
7 - Meteor

Using the reporting tools, one can easily export multiple excel files while only having to change one directory to update a workflow, The render tool does not allow for text files. I want to reduce the amount of directories I need to update for my workflow, is there any way to export multiple different text files in some manner similar to that of the render tool?

5 REPLIES 5
rzdodson
12 - Quasar

You can create dynamic output path with the Engine.WorkflowDirectory variable in a Formula tool - it'll save the outputs to where the workflow is saved.

 

Your formula tool will look something like this:

 

Engine Workflow Directory.png

Swap out the "xlsx" and second instance of the [Name] field for just ".csv". Then, in your Output tool, you would just need to reference the Output path field you created like so:

 

Output path.png

You'll notice in your results window that it'll create multiple CSV files with its corresponding data.

pacopenamedina
7 - Meteor

How would this work if within your example, you had different sets of Dummy Data, and you want to export it in one go just like in your example.

rzdodson
12 - Quasar

@pacopenamedina Assuming your data had similar properties (e.g. aggregating at the same level, had relatively the same field types), you can apply a Union to combine the data sets, then create your Output field in a Formula tool afterwards. Similar setup overall. :)

pacopenamedina
7 - Meteor

Unfortunately since my datasets have a different number of fields, It doesn't seem to be my solution, what would be an effective workaround here?

rzdodson
12 - Quasar

Since it sounds like we are creating different data outcomes (potentially), I would treat them as separate all together. If my assumption is correct, I would recommend duplicating the approach detailed above, but for each data stream/Output you are needing.

Labels