Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam posts. As we work toward a permanent solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts. Thank you for your patience!

Alteryx Designer Desktop Discussions

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

Help with macro for downloading data

JW
6 - Meteoroid

I have a concept I want to build out. Basically I have a text input tool with a URL, a desired file path, and a few other columns. At a very high level I want to use Alteryx to download the JSON formatted data from that URL, parses the JSON, and then ultimately save to the desired file path in excel format. I got this all working in a flow where it can process 1 URL, downloads, parses JSON from the download, saves to the location specified in the text input, works great. My next step is to expand this into something that can repeat these steps for many rows in my input file. 

 

So the flow goes like this:

 

1) Text Input

- has URL, file save path

- Would like to have many rows with URL's, file save path

 

2) Download tool

- some processing after this such as JSON parsing, formulas and such. 

 

3) Output tool

- save as xlsx file to the location listed in the input

 

 

I basically had this setup as 1 workflow, tested and working with 1 row in my text input... and then highlighted everything after the text input and converted it to a macro. This works when I run it with 1 row in the input... but when I run it with 2 rows, it gets hung up on the download data step, and returns a "URL using bad/illegal format or missing URL". 

 

I think there's something fundamental that I'm missing and looking for some help. If I have a list of rows in a text input tool, and feed it into a macro, will it process those rows 1 at a time? I watched some tutorials on batch macros and they were doing stuff far more advanced than I think I'm trying to do. 

2 REPLIES 2
PhilipMannering
16 - Nebula
16 - Nebula

You don't need a macro. If I understand correctly, the Download Tool with make an API call for every record in you Text Input.

 

So, Text Input (n rows) → Download Tool → Parse Data (usually JSON Parse, Text-to-Columns, and Crosstab) → Output Data

Luke_C
17 - Castor
17 - Castor

Hi @JW 

 

Can you share a bit more about how your macro is set-up? 

Labels