Reputation: 75
I am trying to create a pipeline where I want to store a particular value from a web activity in azure data factory, in a variable, so that I can pass it to other activities. I want to get the export ID but I keep running into errors. The response of the web activity looks like this:
{
"requestId": "----",
"result": [
{
"exportId": "---",
"format": "CSV",
"status": "Created",
"createdAt": "2020-12-15T16:03:01Z"
}
],
"success": true
}
I have tried the following methods but it fails: @string(activity('Web1').output.result.exportId
@string(activity('Web1').output.result[0].exportId
@string(activity('Web1').output.result.[0]
first(@string(activity('Web1').output.result)
Upvotes: 1
Views: 3338
Reputation: 8660
I have tried this. Your second expression should work @string(activity('Web1').output.result[0].exportId)
My test
Output of Web activity
These expressions also work fine on my side, you can have a try:
@string(activity('Web1').output['result'][0]['exportId'])
@string(activity('Web1').output.result[0].exportId)
@string(first(activity('Web1').output['result']).exportId)
Upvotes: 1