Issue: How to Write JSON Data From Parameter or Variable to Azure Blob Storage File in Azure Data Factory.
In this article, we are going to learn how to write JSON data from a parameter or variable to an Azure blob storage file on Azure Data Factory, in this scenario I have JSON data which I will save in the parameter, then set into the variable and then will write into the file, let's start our demonstration.
Open your Azure Data studio, go to the Author tab, click on the pipeline, then click on the new pipeline, go to the parameter tab, click on the + New button to create a new parameter, then name your parameter, select the type, and paste the JSON data.
Next, find and bring the Set variable activity, go to the Variables tab, select the variable which we have created earlier, then in the value, click on the ''Add dynamic value'' and select the parameter which we have created earlier.
Once we are done with our Set variable activity, find and bring the copy data activity, connect with the set variable activity, then go to the Source tab, click on the + New button to create a new source dataset.
Select Azure blob storage then click on continue.
Name your source dataset, select the linked service which points to blob storage, then select the file path, select the template file, then click on Ok.
Select the CSV file, then click on continue.
Provide the output file name, select No escape character, select No quote character, then back to the pipeline.
Go to the mappings tab, click on import schemas, provide the value to the variable and click on ok.
In the mappings tab, delete the template file column and leave the additional column as it is.
No comments:
Post a Comment