In the past, I would open a browser and select the S3 file(s) or use Alteryx workflow with S3 download tool. S3 download tool works great if the daily file follows the proper naming convention and it kicks off at the scheduled time - file includes the execution timestamp. Then a macro can easily pull the file with today's date.
But.... if the file runs at another time. Back to opening Edge/Chrome and downloading it manually.
I came across a great article Amazon S3 Download – Use Wildcards to Select a Single or Multiple Objects - Alteryx Community sélect...
With this great idea from @DanC, wrote some Python code to pull any files generated today. See below using the Python tool:
Note my variables for AccessKey, SecretKey, and BucketName. Other than that, it's just the bottom two cells. After a few blanks, figured out Package.installPackages(['boto3']) was missing. Then it ran fine, also on Alteryx Server.
Hope this helps you, too!
Hi ,
Please refer to the link below which is part of the tool mastery series of Alteryx. It also comprises of the issues and resolutions as well
Hope this helps!!
My post is how to do it dynamically instead of the usual S3 download tool's way. That is the key point.
Would this work with .gz files in the s3 bucket? If not, do you know how to adapt it so it would? The inbuilt connector does not allow .gz file downloads.
Thanks!