I am accessing a RESTful API that pages results in groups of 50 using the HTTP connector. The REST connector doesn't seem to support Client Certificates so I can't use the pagination in that.
I have a Pipeline Variable called SkipIndex
that defaults to 0. Inside the Until loop I have a Copy Data Activity that works (HTTP source to BLOB sink), then a Set Variable Activity that I am trying to get to increment this Variable.
{
"name": "Add 50 to SkipIndex",
"type": "SetVariable",
"dependsOn": [
{
"activity": "Copy next to temp",
"dependencyConditions": [
"Succeeded"
]
}
],
"userProperties": [],
"typeProperties": {
"variableName": "SkipIndex",
"value": {
"value": "50++",
"type": "Expression"
}
}
}
Everything I have tried results in errors such as "The expression contains self referencing variable. A variable cannot reference itself in the expression." and the one above with 50++
causes a sink error during debug.
How can I get the Until loop to increment this variable after it retrieves data?
To add parameters to your data flow, click on the blank portion of the data flow canvas to see the general properties. In the settings pane, you will see a tab called Parameter. Select New to generate a new parameter. For each parameter, you must assign a name, select a type, and optionally set a default value.
The Until activity provides the same functionality that a do-until looping structure provides in programming languages. It executes a set of activities in a loop until the condition associated with the activity evaluates to true. You can specify a timeout value for the until activity.
Search for Set Variable in the pipeline Activities pane, and drag a Set Variable activity to the pipeline canvas. Select the Set Variable activity on the canvas if it is not already selected, and its Variables tab, to edit its details. Select the variable for the Name property. Enter an expression to set the value.
To use a Append Variable activity in a pipeline, complete the following steps: Select the background of the pipeline canvas and use the Variables tab to add an array type variable: Search for Append Variable in the pipeline Activities pane, and drag an Append Variable activity to the pipeline canvas.
Agree that REST Connector does supports pagination but does not for Client Certificates
Authentication type.
For the idea of your Until activity
scenario,i am tripped by the can't self-reference a variable in an expression
limitation also. Maybe you could make a little trick on that: Add one more variable to persist the index number.
For example,i got 2 variables: count
and indexValue
Until Activity:
Inside Until Activity:
V1:
V2:
BTW, no usage of 50++
in ADF.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With