Azure Data Factory -Copy Activity : REST API to Cosmos DB (nested array)
Copying below REST API data into cosmos DB by using ADF copy activity(explicit mapping) but inplace of array[] it appearing as object {} in cosmos.
REST api response:
{
"page": 1,
"per_page": 2,
"total": 4,
"total_pages": 2,
"Candidate": [
{
"Contact": [
{
"ContactID": 1,
"ContactType": "aliqua laboris ",
"EffectiveDate": "2022-01-10T13:20:35.335Z",
"IsPrimary": false,
"isPrivate": true
}
],
"PartyID": 23,
"ID": "dolo",
"LastUpdatedDateTime": {
"DateTime": "2021-09-06T12:33:53.891Z"
},
"Name": [
{
"FirstName": "incididun",
"LastName": "cillum do",
"LongName": "cil",
"MiddleName": "veli",
"NameSuffix": "inc",
"NameType": "incididunt ",
"Title": "amet occaecat aute",
"isPreferred": true
}
]
]
}
Mapping in copy activity:
Cosmos output: