ADF Data flow fetch data from JSON to SQL

Mav 81 Reputation points
2022-01-30T04:44:41.683+00:00

Hi
Could someone advise how to use DATAFLOW in ADF to get data from a JSON with hierarchy
My JSON is of following structure

{
"totalRowCount": 2,
"data": [
{
"ProductCode": "P - 1",
"ProductType": "CARS",
"fields": [
{
"fieldName": "CarType",
"label": "Is this an electric car?",
"dataTypeName": "RADIOBUTTON",
"fields": null,
"values": [
{
"value": "No"
}
]
},
{
"fieldName": "CarLocation",
"label": "Where is the Vendor located",
"dataTypeName": "SINGLESELECT",
"fields": null,
"values": [
{
"value": "123 NY Park NY City USA"
}
]
}
]
},
{
"ProductCode": "P - 2",
"ProductType": "BUS",
"fields": [
{
"fieldName": "BusType",
"label": "Is this an electric Bus?",
"dataTypeName": "RADIOBUTTON",
"fields": null,
"values": [
{
"value": "No"
}
]
},
{
"fieldName": "BusLocation",
"label": "Where is the Vendor located",
"dataTypeName": "SINGLESELECT",
"fields": null,
"values": [
{
"value": "4444 NY Park NY City USA"
}
]
}
]
}
]
}

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

Accepted answer
  1. AnnuKumari-MSFT 34,556 Reputation points Microsoft Employee Moderator
    2022-01-31T10:25:28.877+00:00

    Hi @devhere ,
    Thanks for using Microsoft Q&A platform and posting your question.
    The Json provided by you consists of Array of multiple arrays which means you need to use multiple Flatten transformation to get the job done. Please refer to the below attached gif for your reference .

    169779-jsontosqldataoadfinalgif.gif

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

1 additional answer

Sort by: Most helpful
  1. Y Varsa Anand 0 Reputation points
    2023-02-14T10:22:40.5466667+00:00

    Hi Annu,

    i have multiple json file in sink, with the one json file i'm able to do flatten and its successfully copying. can u please help for multiple json file i'm not able to do it.

    can u provide any suggestion.

    Thanks


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.