I have a source JSON file with hierarchical data, which I need to sink in two SQL tables(relational). The JSON is as below
{
"orders":[
{
"orderid":"30933",
"ordername":"abc",
"items":[
{
"itemid":1,
"itemstatus":"Failed"
},
{
"itemid":2,
"itemstatus":"Failed"
}
]
},
{
"orderid":"308320",
"ordername":"xyz",
"items":[
{
"itemid":5,
"itemstatus":"Succeeded"
}
]
}
]
}
My SQL holding two tables Order and OrderItem with OrderID primary and foreign key.
Now I have an Azure data factory data flow with source as above JSON and I need to park all data relational in respective tables.
So here I need OrderId(30933,308320) and OrderName(abc,xyz) will go into Order table and respective items data go into OrderItem table(which reference OrderId from Order table). In this case Order table have 2 and OrderItem table have 3 entries.




