In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Help with Batch macro

craigja
10 - Fireball

I'm trying to download all our workflows from the server via the Server API, I need to use a batch macro as there are loads of workflows and the authentication token is only valid for 1 hour. So my idea is to batch workflow ID's up into groups of say 10 and pass these into a batch macro. So my workflow initially queries the API, gets the list of workflows, then using the Tile tool and CrossTab tool, groups then up into batches - 2 fields, the batch number and a comma separated concatenated list of workflow ID's.  Like this:

Tile_Num    ConcatIDs
4                 5e54ceb0137a1410141a7bad,5e54cfc1137a1410141a7ccd,5e621243137a1410141aa5d6,5e7a375c137a1410c096978e
5                 5e81f4e8137a142988afc64e,5ee32009137a141040426f2d,5ee34bf7137a141040427195,5ef310a4137a1410dc5ee0e1
2                 5d9b2823137a140d1c039562,5dc3dad6137a141ba4a4fd87,5ddd5b1e137a14036c84942d,5de6276d137a14036c84a350
1                 5c766cbc04bca70de87f17cf,5c882bd004bca70de87f2d9a,5d4d804e137a140fe867798a,5d5d6a56137a140fe867ac86
3                 5e3d9073137a1413f8c90b0c,5e42caf2137a1413f8c91255,5e4fc0af137a1410141a7234,5e5408ba137a1410141a784a

 

My Macro is where Im getting confused!  I take the ConcatID's field and use the Transpose tool to get back 5 individual rows of data, pass those 5 rows of data to the API Tool - I have a separate API tool that will run once and get the authentication token for that batch and it passes the token to the API call where I download the workflow.  

In testing this works fine, I can replace the macro input with a text input tool, pass in concatenated ID's and it downloads them as it should. My issue is the control parameter - what do I do with it?  I dont want to change anything with the control parameter but I need one - so I created a calculated field called Iteration Number and used the control input to modify the value.  

When I wire everything up, it seems to download but then gives this error, which is not helpful!

Designer x64 The Designer x64 reported: The Engine encountered a problem, and a report was sent to Alteryx for future investigation. If you have additional information to share (example workflow, sample data) to reproduce the error, please contact Customer Support with Reference ID: c6db8b41-27cc-41f3-93f2-3810acc5a339
 
Attached is the macro, I've removed my API credentials from it :-)

 

2 REPLIES 2
BS_THE_ANALYST
14 - Magnetar
14 - Magnetar

@craigja I think this is the type of batch macro you'll be looking for: https://www.youtube.com/watch?v=NNH_K5U5r78 

 

All batch macros function the same. The batch macro in the video has two anchors, based off your explanation above, I guess that's what's going to be needed. 

 

If the video isn't enough, I've attached a dummy workflow of me batching some data based off a column. I only glue the iteration number onto each batch, you could take the idea and run with it hopefully.

Screenshot 2025-04-03 211252.png

 

All the best,
BS

LinkedIN

Bulien
craigja
10 - Fireball

The error turned out to be caused by me using the AMP engine in the Macro

Labels
Top Solution Authors