@Vineet S - Thanks for the question and using MS Q&A platform.
Before jumping into the solution make sure to validate the JSON file which you are referring to?
I had used online JSON Lint: JSON Online Validator and Formatter
Here is the modified valid JSON:
{
"ONE": "JJJJ",
"TWO": "HH",
"THREE": "JJKK",
"4": "HJJJJ",
"5": "UUUU",
"_6": "UUUU",
"_7": "dbJJJJ",
"_8": "4GGG",
"_9": "EE/",
"_ts": "WW"
}
I had used online JSON Lint: JSON Online Validator and Formatter
To read the curly brackets code and format it into CSV using an Azure Data Factory pipeline, you can use the "JSON to CSV" transformation in the pipeline. Here are the steps to do so:
Step1: Create a new pipeline in Azure Data Factory and storage account to upload the JSON files.
Step2: Add a new "Copy Data" activity to the pipeline.
Step3: In the "Source" tab of the activity, select the dataset that contains the curly brackets code.
Step4: In the "Sink" tab of the activity, select the output dataset where you want to write the CSV file.
Step5: In the "Mapping" tab of the activity, click on the "Import schemas" button to import the schema from the source dataset.
Step6: Save and run the pipeline.
This should convert the curly brackets code into CSV format and write it to the specified output dataset.
For more details, refer to a video on How to Convert JSON File to CSV File in Azure Data Factory - Azure Data Factory Tutorial 2021 and Transforming JSON to CSV with the help of Flatten task in Azure Data Factory
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.