Alteryx Designer Desktop Discussions

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

API Fails in Macro, but works by itself?

PSmitty334
6 - Meteoroid

Hey All,

 

I'm calling two API's for each of ~40 sites and joining the data for each site, seems simple enough. I have an XLSX file with the Site names (which the API URL is created using a formula tool), and the client name (for ease of reporting later).

 

I'm using a Batch Macro to feed the XLSX data by rows, grouping by Client (which is always unique), I need to feed in only one row of data at a time (client/site). When I run the macro by itself with one set of data for a specific client, it runs fine. When I run the macro, it fails on the same clients every time on the union saying a download field doesn't exist (ProfileID). I'm assuming this is because there's some process overlap with multiple records trying to process at once? Or is this because I need to introduce a control parameter?

 

Any help here would be appreciated, I've looked through so many topics and videos on batch macros and I have no idea what's happening here, I've even tried to feed each client into 40 independent macros in a separate workflow and I get the same issue, which makes me think it's not the control parameter issue. What gives?

2 REPLIES 2
BrandonB
Alteryx
Alteryx

I think that this approach will be easier for you rather than using a macro input. Just use a control parameter connected to an action tool connected to a text input that passes in the URL. When you have it set up this way, you will configure your workflow to feed in the column with the URLs in it and your macro will run one time for each URL passed through. I think that this should accomplish your goal. 

 

api call.png

PSmitty334
6 - Meteoroid

Hey Brandon thanks for the reply and the time!

 

Through some trial and error, and in using your suggestion I managed to get this to work. It seemed there was an issue with the import file causing the URLs to fail as well. Thanks for the assistance!

Labels