I am trying to copy data from a csv file into a database table. I created a pipeline in Azure Data Factory and added a Copy Activity
. I set the source and the destination datasets.
During the copy operation, I want to prefix the values of the column Col1
in the source csv file with a fixed string. At the bottom of the Mapping
section in the UI, there is an option such as "Add dynamic content
". I guess I would be able to add an expression here for such a mapping but I could not find any information on how to do that.
What is the correct way of accomplishing this?
2
Answers
Adding a dynamic column value in copy activity supports only the ADF parameter /function values which would be common for all rows.
As of now there is no direct support to modify a column at row by row level in copy activity.
You can do it via 2 ways:
https://learn.microsoft.com/en-us/azure/data-factory/data-flow-derived-column
pre
string as a prefix to id column.concat
function on the required column with prefix with a query like this: