Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Unzipping files and processing the output

vkarthik21
8 - Asteroid

The task I am assigned is to unzip a file and process all the files within. The files within the zip folder are all non-uniform flat files (.csv files) i.e. each file has different sets of columns say file001.csv, file002.csv etc. To achive this task what I have done is create two workflows - 

 

1. Unzip the files to folder - I am using powershell command to finish unzipping a file to folder.

2. Process the files from the above folder - I am using Directory tool as the input to browse all the files. I then am using different 'Filter' tasks to identify the right file I need and then perform the processing for that file as per the business rules.

 

What I am unable to do is to be able to combine both the tasks above into a single task. I tried using 'Block Until Done' transform to first let the unzipping complete and then go ahead with processing of the files. I just don't know how to pass the file path to the 'Directory' Tool. Can someone give any pointers?

 

Here is how the unzip files workflow currently looks like - 

 

 

 

Unzipping_Module.png

 

 

 

 

 

 

 

 

 

 

 

 

2 REPLIES 2
Inactive User
Not applicable

To dynamically send the path to a directory tool you can create a macro to do that using a control parameter. Create a new macro with a directory, drop a control parameter over it and update the tool with the field from your workflow. Then put that macro into the workflow. The macro can also contain the CSV processing you require as well. One step further, you can even take the CreW Macro tool Wildcard Input and replace the path in that tool instead of the directory, that way your CSVs will be combined automatically. 

vkarthik21
8 - Asteroid

Thank you Ryan for the elegant solution. I am just taking noob steps towards macros and starting to see the benefits and ease of doing things. Thanks a lot.

Labels