Vipendra Singh
Vipendra Singh

Reputation: 859

unable to use pagination rules in Azure data factory

I am trying to use the Pagination rules in the ADF rest source to download all my pages data. My API looks something like this: www.xyz.com?page=0 and i get the response like this : {content:[],

totalPages:"150",

page:0} Here is the pagination rule that i am trying to write to fetch the next page data

QueryParameters.page = @add(int($.page),1) but this is reflecting an error saying UnsupportedConcept and showing invalid.

Please tell if there is any way to increment the value of a response and hit the api again

Upvotes: 0

Views: 2075

Answers (1)

JLuis Estrada
JLuis Estrada

Reputation: 978

You can create an until loop.

Create a pipeline that contains a variable that will be evaluated by the until activity and a call to your api to get the total number of pages (or the 1st batch of data). Then, inside the Until activity, you run it until your @equals(pipeline.variable, activity('1stcall').output.totalPages).

The activities inside the until should be a -Another web call to your appy -A set variable activity increasing the value of the page variable.

Upvotes: 1

Related Questions