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

Amazon S3 Download tool - Update the Bucket Name to be the 8 digit date for "yesterday"

msonnenfeld
6 - Meteoroid

Hey,

 

I'm trying to create a workflow that pulls data from an Amazon S3 server (toasttab.com).  My issue is that the file path includes a date for yesterday & these folders expire after 15 days.  Once the folder expires the bucket name/file path no longer exists causing an error.  I have tried the following

 

  • create macro that updates the bucket name to be the date.
    • This doesn't work because when the macro runs an error occurs because the default bucket name doesn't work.  I'm assuming that the action updates after Alteryx makes the initial connection
  • create a constant on the workflow configuration
    • I'm not sure how to get the S3 download tool to recognize my constant [User.FilePath]

       

Does anyone have a solution or suggestion other than go in and manually update daily?  Thank you for reading & any help.

   

msonnenfeld_3-1609956995018.png

 

msonnenfeld_2-1609956972562.png

 

msonnenfeld_0-1609956576180.png

 

3 REPLIES 3
TrevorS
Alteryx Alumni (Retired)

Hello @msonnenfeld 

Are you able to share your workflow so that the Community can see what you have attempted so far?
This will help to better troubleshoot your issue.

If you can share what the file location file path looks like (please make sure to censor sensitive data beforehand) users of the community may be able to provide you with a process change!

 

Thanks!

TrevorS

Community Moderator
DavidP
17 - Castor
17 - Castor

Hi @msonnenfeld 

 

I've used an app interface tool and action tool before to update the S3 Download tool and got it working.

 

Is you macro a batch macro, i.e. is there a control parameter attached to the action tool? If you could show the whole macro that might help.

msonnenfeld
6 - Meteoroid

Thank you @TrevorS & @DavidP for your response…after I posted the I found my error was a date formatting issue where I was only getting single digit days & months.  This is why it was working some days, but not for others.  I’m sure you would have noticed the same if I published the workbook, but I didn’t want credentials to be mistakenly passed through.

 

This is my updated formula in my action tool...

file path'+ToString(DateTimeYear(DateTimeAdd(DateTimeNow(),-1,'days')))+IF DateTimeMonth(DateTimeAdd(DateTimeNow(),-1,'days'))<10 THEN '0'+ToString(DateTimeMonth(DateTimeAdd(DateTimeNow(),-1,'days'))) ELSE ToString(DateTimeMonth(DateTimeAdd(DateTimeNow(),-1,'days'))) ENDIF+IF DateTimeDay(DateTimeAdd(DateTimeNow(),-1,'days'))<10 THEN '0'+ToString(DateTimeDay(DateTimeAdd(DateTimeNow(),-1,'days'))) ELSE ToString(DateTimeDay(DateTimeAdd(DateTimeNow(),-1,'days'))) ENDIF

 

Labels