@range for building Ids in a string

arkiboys 9,616 Reputation points
2022-04-24T15:57:56.227+00:00

ADF pipeline reads .csv file daily which is populated by calling api url
The .csv file has different number of rows for each day, could be 10, may be 50, may be 300 rows, etc. for each day...

I am using @Rover () function inside foreach activity so that batches of Ids are built...
@Rover (0, 10)
The above goes through the iteration 10 times but what if there are say 243 rows and I want to build the string for 10 Ids at a time and process each batch of 10 Ids and then get the next 10 Ids and process them...
for example:
The first 10 Ids to be processed, then the next 10 and then the next 10, etc. untill the iteration gets to the final loop which could be 243
How can I use the @Rover function in a loop to do what I am after?
Perhaps this is related to offset parameter in calling the api url and the pagination functionality?

Thank you

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,527 questions
{count} votes

1 additional answer

Sort by: Most helpful
  1. Pratik Somaiya 4,201 Reputation points
    2022-04-25T05:50:56.057+00:00

    Hello @arkiboys

    If the ForEach activity's input is a lookup, you can pass the Range to loop using lookup

    In ForEach activity you can mention number of batches to run in parallel as below

    195926-image.png