ADF, Pipeline, Copy Activity

grajee 351 Reputation points
2021-02-03T17:51:44.893+00:00

All,

I have to copy lot of tables from On-Prem to AzureSQL. I setup a pipeline and copy activities to accomplish the copy. How do I disable IDENTITY insert off to ensure that the identity column values are brought over from the source as they are instead of it getting generated and assigned new values.

Is there an option in the copy activity or the pipeline?

Thanks,
grajee

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,679 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pedro Fiadeiro 216 Reputation points
    2021-02-03T18:40:38.407+00:00

    Hi @grajee

    If you don't mind me asking, if you want to copy the Ids you currently have on your On-Prem source, why do you create the identity column in AzureSQL?

    Anyway, if you do want to keep that column has an Identity column, you can achieve that in the Copy Activity by executing a pre-copy script on the Sink which disables the identity column before the insert

    63623-image.png

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Nandan Hegde 32,336 Reputation points MVP
    2021-02-03T18:42:21.8+00:00

    Hey @grajee ,
    When you map the identity columns across source and sink in copy activity, it should copy the data as is automatically without you turning off the identity property manually.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.