How to store set variable json array output into csv file in data factory

Mohit Bokade 0 Reputation points
2024-04-26T18:01:30.62+00:00

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
User's image

User's image

Under for each activityUser's image

If Lookup output count greater or equal to 1
User's image

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
		}
	]
}


Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,371 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,751 questions
{count} votes