We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Read latest zip file that contains a single txt file of the same name

SarahFenton
6 - Meteoroid

Hi 

We get daily extracts saved to a network folder that are zipped (due to size) and contain a single text file with a date stamp at the end of the file name.  I've worked out how to identify the file I want to use, but am struggling to get the Dynamic Input tool to work and receive a 'No file specified' error message.

I'm fairly new to Alteryx so any help you can provide would be great.  I've attached a sample file and current workflow for reference.

Thanks

Sarah

7 REPLIES 7
aatalai
15 - Aurora

@SarahFenton I've managed to do something (but had to unzip the file first) Had to edit the dynamic input tool too to read the txt as a csv, and seems to run now. I've uploaded it here, please take a look and let me know if it does the trick.

Carlithian
11 - Bolide
11 - Bolide

ooooo this was really interesting. I assume the key requirement here is that you cannot unzip the file to get the data. This solution works but it does require you to know the name of the file you are after.

The Dynamic Input Tool simply does not want to work with this, so I default back to a normal Input Data Tool and add it to a macro to make it dynamic. To do this you use a Control Parameter Tool and an Action Tool to interact with the Input Data Tools configuration, and each batch of data that flows into the macro will update the configuration of that Input Data Tool

 

SS 1.jpg

 

Then in the main workflow we obtain the zip folder, and append on the name of the file we need and feed this into the macro.

ss 2.jpg

 


I am looking into if we can get the names on the files in the folder without extracting it, but currently nothing appears in the XML data prior to the file being selected, so gonna have to work on this further, but hope this helps 

 


Happy Alteryxing
SarahFenton
6 - Meteoroid

Thanks for your reply @Carlithian .  I will know the first part of the file name as that's fixed, but the last part is made up of a date and time stamp, so wont know the full name in advance - but is the same name as the zip file if that helps?

SarahFenton
6 - Meteoroid

Sorry @aatalai , but need a solution that handles the zipped file directly as thats the format in which the data is saved.

Carlithian
11 - Bolide
11 - Bolide

Will that timestamp align to anything else that is outside if the zip folder? I think the other solutions will involve Python or Command Line from what I'm hearing, and I can't currently test those options


Happy Alteryxing
SarahFenton
6 - Meteoroid

@Carlithian unfortunately not - all of the Zip files are in a standard folder set up and then it contains the zip files with new ones added every day.

SarahFenton
6 - Meteoroid

Hi All,

Don't suppose any one else has any ideas for this please?

Thanks

Labels
Top Solution Authors