I am trying to download the zipped file at the below link but am having trouble with the regular expression in the RegEx tool. Any suggestions would be greatly appreciated.
I found a discussion with a similar issue but the link that they were using does not work so I cannot use it as an example to see how they pulled the expression. Attached is the workflow I have so far.
https://www.cms.gov/research-statistics-data-and-systems/statistics-trends-and-reports/mcradvpartdenroldata/ma-plan-directory
Hi @grodriguez
See this version, it will download the current month file, unzip it and import the xlsx to the workflow.
The actual URL of the file just varies with month-year, so you can build your URL using formulas like this one and download it:
I'm slightly new at this and may be missing something but what you implemented above did not download the files from the site it just created a table with the URL, OUTPUTPATH, and DownloadHeaders fields.
@Felipe_Ribeir0 I'm slightly new at this and may be missing something but what you implemented above did not download the files from the site it just created a table with the URL, OUTPUTPATH, and DownloadHeaders fields.
The downloaded file will be placed on the OUTPUTPATH. Just configure the output path to a valid path in your machine, run the workflow and the zip file will be placed there.
@Felipe_Ribeir0 how do I configure the output path? I've tried with both a formula and an output tool and its not working. Here is an example output location \\san02\alteryx\uat\gabriella\
@grodriguez
Inside of the input text tool:
@Felipe_Ribeir0
That worked! Thank you!
However, I would need to run this job yearly with our scheduler, where the file name will change. I don't believe this workflow will work since the OUTPUTPATH contains the exact name of the current file. Is there a way to configure that so it pulls the new file name each time it runs?
You can build the filepath using the formula, check the attached workflow:
Oh ok that makes sense! You are the best!
Is it possible to unzip the file with Alteryx or will I need to install an unzipping tool?
It is possible, one way is by using this macro. Take a look at it. I need to go for now, but tomorrow i send you the workflow with this macro working.
https://community.alteryx.com/t5/Community-Gallery/Unzip-zip-and-yxzp-files/ta-p/1161434
Wow that's awesome! Thank you so much for all your help. If I run this on the server will it require installing something for the unzip tool on the server?
@grodriguez no it should not require any further configuration The server just need to have access to the folders that you are dealing with (OUTPUTPATH).
But deploying to server can bring surprises sometimes, so try and be sure.
Does this need a temp location or folder location to download the files?