Home > OS >  When using 'Additional columns' in Azure Data Factory's copy activity, will it duplic
When using 'Additional columns' in Azure Data Factory's copy activity, will it duplic

Time:12-22

While copying a csv file I need to be sure that a certain column exists on target. This column may or may not exist in the source file. If I use the additional columns part in the copy activity, will it avoid duplication?

CodePudding user response:

An additional column in copy activity is to add additional data columns to copy to sink along with the source data.

This will not validate if the column exists in the sink.

Additional column can store source file path, to duplicate the existing source column as another column, static value, variables, pipeline parameters.

Refer to this MS document to get more details on the Additional column in the copy activity.

You can use the Get Metadata activity to get the column names from source and sink datasets and compare them. Using If condition results, you can copy the structure with Additional column and without Additional column in True and False activities.

Refer to this similar SO link.

  • Related