Copy behaviour of Azure Data Factory

Rohit Boddu 461 Reputation points
2020-10-15T13:43:59.17+00:00

Hi ..

i have copied some sql table data which is in adls gen2 from source to destination ..

our requirement was like data should be overwritten to destination tables but data has been appended.

My question is what is the behaviour of ADF Copy : Overwrite or Append

Can u tell me how to do copy in overwrite manner and also how to copy in Append manner

Regards,
Rohit

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,788 questions
0 comments No comments
{count} votes

Accepted answer
  1. HimanshuSinha-msft 19,381 Reputation points Microsoft Employee
    2020-10-15T19:39:12.007+00:00

    Hello @Rohit Boddu ,

    Thanks for the ask and also using the Microsoft Q&A.

    As per my understanding you have the source as ADLS Gen2 and the sink is SQL and you are using the ADF copy activity . In the above scenario the append( to the sql table ) is the default behaviour . So all the record in the file on ADLS gen2 will be inserted into the SQL . In the event you want to go the overwrite route , you can use insert all the records in the file into a staging table on the SQL DB and then use SQL Procedure ( you can use the stored proc actrivity ) to call a stored proc which is read the staging table and update/insert records to the main table .

    Please do let me know if you have any further questions on this .

    Thanks Himanshu
    Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members


0 additional answers

Sort by: Most helpful