Azure Data Factory pagination issue

Joost Romijn 0 Reputation points
2023-06-08T14:01:13.2966667+00:00

I'm struggling with a pagination issue in a Copy Data activity fetching some data from a REST API.

The API gives me a response with the total row count of all pages, the start rownumber of this page, and the rowcount on this page.

2023-06-08 15_53_00-Postman

I can correctly fetch all data from some endpoints using the RANGE in a QueryParameter with settings start = 0 & offset = 500. But on some endpoints this is not working, because the number of rows on the page is not always the same. Apparently, some pages are too large to show 500 rows and the rowcount is randomly lower, eg. 248 or 137 for some pages. So I need the offset parameter in the RANGE to be dynamic, being the start + count from the response body.

But I can not get this to work in ADF.

I hope someone can help me with this.

pagination

Best regards

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,363 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,611 questions
{count} votes

1 answer

Sort by: Most helpful
  1. QuantumCache 20,366 Reputation points Moderator
    2023-06-10T16:59:33.97+00:00

    Hello @Joost Romijn,

    Did you try any expression to control the dynamic values for the start and Offset?

    Or Did you try to use 1) WebActivity, to fetch the Start & Total, Count values into variables 2) Until Activity, which will do Web Activity & Copy Activity

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.