Reputation: 5
I have a web activity in ADF pipeline. This web activity calls an API and get data from that. The output Web activity is in below format,
{
"fdgdhgfh": {
"so2_production": 7hjhgj953,
"battery_charge": jkjlkj,
"battery_discharge": kjlklj,
"critical_load_energy": 4ljljh4
},
"9fsdsfb": {
"so2_production": asdasd,
"battery_charge": sdaasf,
"battery_discharge": ewewrwer,
"critical_load_energy": bmvkbjk
},
"ADFWebActivityResponseHeaders":{
"Content-Length":14268,
"Content-Type":"application/json"
},
"effectiveIntegrationRunTime":"Azure IR",
"billingReference":{
"activityType":"ExternalActivity"
},
}
From above output I only want API response without ADF auto generated properties like,
{
"fdgdhgfh": {
"so2_production": 7hjhgj953,
"battery_charge": jkjlkj,
"battery_discharge": kjlklj,
"critical_load_energy": 4ljljh4
},
"9fsdsfb": {
"so2_production": asdasd,
"battery_charge": sdaasf,
"battery_discharge": ewewrwer,
"critical_load_energy": bmvkbjk
}
}
Let me know the process or expression to achieve in ADF pipeline.
Upvotes: 0
Views: 455
Reputation: 6114
response
attribute in the set variable activity, you can use the following procedure instead.web activity
output as a string in a variable using set variable activity. The output would look like something shown below:ADFWebActivityResponseHeaders
as delimiter.@split(variables('tp2'),'ADFWebActivityResponseHeaders')[0]
@array(json(substring(variables('tp1'),0,sub(length(variables('tp1')),3))))
@variables('tp3')[0]
where tp3 is the variable with value in the above image.Upvotes: 0