Alteryx Designer Desktop Discussions

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

Grouping IDs into strings for an API call

tbergama
5 - Atom

Hello,

 

I am making calls to an API that accepts start time, end time, and dataset IDs, and returns the data for the specified IDs and time frame. The API allows up to 10 comma separated IDs to be specified in a single call. I am trying to leverage that to reduce the number of calls I am making. 

 

To begin, I have a column containing the ~500 dataset IDs I want data for. For example:

 

datasetIDs: 1000, 1001, 1002, ..., 1500

 

I need to build strings that look like:

 

"1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009"

...

"1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500"

 

so I can build the URLs for my API calls.

 

My tact has been to create a column that I can group by to create groups of 10 IDs or less, and then build strings with the groups. I started by creating a column whose values are the modulo of the length of datasetIDs/10. But building the strings from there has me stumped.

 

How can I build the strings of comma separated IDs?

 

I am attaching an example flow that builds the query_group column. Any ideas on how to build the string from there would be very much appreciated.

 

Thanks,

 

Tom

2 REPLIES 2
Aaron_Harter
11 - Bolide

Hi @tbergama

 

Check out the Tile tool for creating your groups of 10 IDs, then use the Summarize tool to create the concatenated lists of IDs:

 4.PNG

tbergama
5 - Atom

Thank you!

 

The summarize node was what I was missing. Got it working.

Labels