Search code examples
azureazure-sql-databaseazure-data-factory

How to map a Column to Identity Column from a Source to a Table in Azure SQL using Azure Data Factory


I am using Azure Data Factory and Azure SQL.

I am using using Copy data Activity from Move and transform.

My source is a csv file with same column names as the column names in my destination table in Azure SQL.

Now, I have an auto-increment primary key My_Emp_ID in my table(sink).

ADF is asking to match this column with source, but I do not have any such thing in my source(csv).

Here is the screen shot:

enter image description here

Please let me know how can I successfully load the data and the auto-increment key automatically increment value in Azure SQL.


Solution

  • I encountered the same issue while copying data from a CSV file to an SQL table, which has an auto-increment primary key as shown below:

    enter image description here

    Following @Thom A's suggestion, I deleted that column as shown below:

    enter image description here

    And tried to copy the data using the copy activity. The copy activity ran successfully, as shown below:

    enter image description here

    The data was successfully copied, as demonstrated below:

    enter image description here