ADF Copy Data REST API Pagination not ending on condition

Jon 0 Reputation points
2023-03-22T12:32:54.4533333+00:00

Hi there,

I am trying to fix my endCondition on my paginated copy date REST api activity.

My API only returns the current page and the total pages. So I tried to add a endCondition of...

EndCondition:$['page']Const$['total']

aka. end if current page is equal to total pages. but it is over running and hitting the next page with a 500 error as the page doesnt exist.

Any help would be much appreciated.

Thanks,

Jon

Screenshot 2023-03-22 122911

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

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,422 Reputation points Microsoft Employee
    2023-03-25T00:30:18.93+00:00

    Hi @Jon Welcome to Microsoft Q&A forum and thanks for reaching out here.

    At this point I'm not sure how your API response looks like, but as per my understanding you would like to end the pagination when all pages are completed. Looking at what you are trying when the page value is equal to total value from your response you would like to end the pagination.

    In that case you can just try Empty or NotExist as described in the public documentation and that would end your pagination when there is no data returned for the specified node.

    User's image

    In case if you have specific requirement to match page value with total value, then please share a sample response of your API and we will assist you accordingly.

    Hope this helps.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments