I am creating a pipeline for the first time. The requirement is to fetch a JSON file with an array of objects. Split the array and save each object as a separate item in the cosmos DB.
In pipeline I am using CopyData Activity. And providing the source as JSON File and using cosmos db dataset in Sink.
I am stuck with mapping the data. Since I have given the [0] array. All the values in db gets saved with same value. I am not sure how to map the value dynamically. Can someone assist if I there is a way to map dynamically based on the number of objects in the array. Or if I can use any other Activities.
Below is the JSON Data format.
{
"d": {
"results": [
{
"OrderDescription": "abc",
"SalesManager": "abc",
"ProjectCoordinator": "",
"CustomerNumber": "",
"CustomerName": "",
"CustomerStreetAddress": "",
"CustomerCity": "",
"CustomerState": "",
"CustomerZiip": "",
"FacilityName": "",
"ShipToNumber": "",
"ShipToName": ""
},
{
"OrderDescription": "abc",
"SalesManager": "abc",
"ProjectCoordinator": "",
"CustomerNumber": "",
"CustomerName": "",
"CustomerStreetAddress": "",
"CustomerCity": "",
"CustomerState": "",
"CustomerZiip": "",
"FacilityName": "",
"ShipToNumber": "",
"ShipToName": ""
},
{
"OrderDescription": "abc",
"SalesManager": "abc",
"ProjectCoordinator": "",
"CustomerNumber": "",
"CustomerName": "",
"CustomerStreetAddress": "",
"CustomerCity": "",
"CustomerState": "",
"CustomerZiip": "",
"FacilityName": "",
"ShipToNumber": "",
"ShipToName": ""
}
]
}
}