Jason in adf

Vineet S 950 Reputation points
2024-09-22T13:00:46.1033333+00:00

Hi how to read curly brackets code using adf pipeline so that it will format into CSV.. Pls share screenshots {"ONE":"JJJJ",

"TWO":"HH",

"TGHREE":"JJKK",

"4":"HJJJJ",

"5":"UUUU",

"_6":"UUUU",

"_7":"dbJJJJ",

"_8":""4GGG"",

"_9":"EE/",

"_ts":WW}

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,740 questions
0 comments No comments
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 89,816 Reputation points Microsoft Employee
    2024-09-23T06:22:07.5233333+00:00

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

    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

    User's image

    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.

    User's image

    Step2: Add a new "Copy Data" activity to the pipeline.

    User's image

    Step3: In the "Source" tab of the activity, select the dataset that contains the curly brackets code.

    User's image

    Step4: In the "Sink" tab of the activity, select the output dataset where you want to write the CSV file.

    User's image

    Step5: In the "Mapping" tab of the activity, click on the "Import schemas" button to import the schema from the source dataset.

    User's image

    Step6: Save and run the pipeline.

    User's image

    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.