Alteryx Designer Discussions

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

Uploading a file with a dynamic name to S3 Bucket

Mahmoud_Turki
6 - Meteoroid

Hi, 

 

can anyone help me? My workflow is running daily and exporting a file to s3 Bucket. Therefore I would like the file to be imported to be named "name+today" every time. In some discussions macro was suggested. This solution failed to work for me. 

Can someone please help me? What am I doing wrong? 

Mahmoud_Turki_0-1635255781911.pngMahmoud_Turki_1-1635255810885.png

Mahmoud_Turki_2-1635255833680.png

 

After I run the file is uploaded with the name "ExampleObject.csv" every time. It fails to update with the formula 

 

Best regards 

Mahmoud

4 REPLIES 4
DavidP
17 - Castor
17 - Castor

Hi @Mahmoud_Turki 

 

The idea of a batch macro is that you can use the control parameter to change the value of something in your macro from another workflow that uses the macro. So there's a couple of things you need to do.

 

1. If you haven't done so yet, you need to define a path for where your macro will be called from.

a. Create a folder such as C:\Alteryx\Macros

b. Go to settings->User Settings->Macros and set this folder as your default Macros path

 

DavidP_0-1635330349827.png

 

2. Change the Action Tool to "Update Value" rather than "Update with Formula" - The thing you want to update with the Control Parameter is Object - Value.

3. Right click on the input data tool and select, "Convert to Macro Input" - this becomes a placeholder for the data you'll be passing - your macro should look like this:

 

DavidP_1-1635330631789.png

 

4. Save your batch macro - Alteryx should default to saving it in your defined Macros path

 

Now you need to create a workflow that calls your macro. You need to create something like this. Once you've configured the input data tool, you can right-click on it, pick Insert after, scroll down to Macros and you should be able to pick your macro from the list. Note how I create a placeholder filename and then replace the yyyy-mm-dd with today's date. This becomes the input for your control parameter.

 

DavidP_2-1635330999504.png

Attached is my example workflow and macro. I've removed my AWS Key and Secret in the macro. You'll have to add yours in and also enter you own AWS workspace details. 

 

Let me know if you have any further questions

Mahmoud_Turki
6 - Meteoroid

Thank you so much David for that well explained and documented solution. I tested that and it worked. 

Mahmoud_Turki
6 - Meteoroid

Solved

Mahmoud_Turki
6 - Meteoroid

solved

 

Labels