How to store set variable json array output into csv file in data factory
Mohit Bokade
0
Reputation points
I used the Lookup activity under for each loop and used Store Procedure which gave me some record as an output if the condition is fails
So that output I have stored into the Set Variable and then those values I need to store into csv file whose file name can be anything but needs to be created automatically.
After loading into csv it should look like
Under for each activity
If Lookup output count greater or equal to 1
LookUp Value Output -
{
"count": 25,
"value": [
{
"id": 1,
"claim_id": 123,
"filename": "ErrorRecord1.csv",
"IsDuplicated": true,
"ReasoneOfError": null
},
{
"id": 2,
"claim_id": 456,
"filename": "ErrorRecord1.csv",
"IsDuplicated": true,
"ReasoneOfError": null
},
{
"id": 3,
"claim_id": 789,
"filename": "ErrorRecord1.csv",
"IsDuplicated": true,
"ReasoneOfError": null
},
{
"id": 4,
"claim_id": 678,
"filename": "ErrorRecord1.csv",
"IsDuplicated": true,
"ReasoneOfError": null
}
],
"effectiveIntegrationRuntime": "AutoResolveIntegrationRuntime (East US)",
"durationInQueue": {
"integrationRuntimeQueue": 1
}
}
Set Variable Output -
{
"name": "ErrorRecord",
"value": [
{
"id": 1,
"claim_id": 123,
"filename": "ErrorRecord1.csv",
"IsDuplicated": true,
"ReasoneOfError": null
},
{
"id": 2,
"claim_id": 456,
"filename": "ErrorRecord1.csv",
"IsDuplicated": true,
"ReasoneOfError": null
},
{
"id": 3,
"claim_id": 789,
"filename": "ErrorRecord1.csv",
"IsDuplicated": true,
"ReasoneOfError": null
},
{
"id": 4,
"claim_id": 678,
"filename": "ErrorRecord1.csv",
"IsDuplicated": true,
"ReasoneOfError": null
}
]
}