How to concat REST API coulmns at Azure Data Factory copy activity

Abdul Kalam Mulla 46 Reputation points
2022-05-16T16:08:19.467+00:00

I am using REST API source and cosmos DB sink in Azure Data Factory Copy activity.
The REST API sample output is below.

{
"Metadata" : [
{
"count" : 100
"page_num" : 1,
"page_count" : 1,
"total_count" : 5
}
],
"data" : [
{
"Code":"ABC123","Year":"2021",Description":"TestDescription1"
},
{
"Code":"ABC456","Year":"2021",Description":"TestDescription2"
},
{
"Code":"ABC789","Year":"2021",Description":"TestDescription3"
},
{
"Code":"XYZ123","Year":"2021",Description":"TestDescription4"
},
{
"Code":"XYZ456","Year":"2021",Description":"TestDescription5"
},
]
}

The requirement to concatenating Code+Year and store as a new column in cosmos. I didnt find any clue ? any help on this please ?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,539 questions
Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
313 questions
0 comments No comments
{count} votes

Accepted answer
  1. ShaikMaheer-MSFT 37,896 Reputation points Microsoft Employee
    2022-05-17T09:40:09.313+00:00

    Hi @Abdul Kalam Mulla ,

    Thank you for posting query in Microsoft Q&A Platform.

    If I understand correctly, you would like to concatenate two columns and then load to sink using copy activity. Please correct me If my understanding is incorrect.

    Copy activity cannot perform any kind of data transformations or data manipulations. It will only allow us to perform Data movement. Your scenario cannot be done using copy activity. You can consider using Dataflows for this kind of transformations.

    In Data flows consider using derived column transformation for implementing your scenario of concatenation.

    Below are few useful resources to refer.

    Hope this helps. Please let us know if any further queries.

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

    Please consider hitting Accept Answer. Accepted answers help community as well.


0 additional answers

Sort by: Most helpful