Azure Data Factory -Copy Activity : REST API to Cosmos DB (nested array)

Abdul Kalam Mulla 46 Reputation points
2022-04-13T17:04:02.547+00:00

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:

192707-mapping.png

Cosmos output:

192769-cosmos.png

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,933 questions
{count} votes