How to update and delete a row using Azure Data Factory Change Data Capture

jigsm 236 Reputation points
2024-04-28T17:40:36.5966667+00:00

I am exploring Azure Data Factory CDC feature, and I am trying to perform the CDC from one SQL table to another SQL table, also the SQL table in the source has a primary key.

Whenever a new row is added to the source table, it gets added to the destination SQL table.
However, when an existing row is modified/updated in the source table, it adds a new row in the destination SQL table, instead of updating it.

Is there a way to achieve update and delete with Azure Data Factory CDC?
In the answer section of this question (https://stackoverflow.com/questions/75233423/how-are-changes-count-calculated-in-azure-data-factory-change-data-capture), the author says to specify a Primary Key, however in the current ADF CDC UI, I am unable to see the Keys column.

Please let me know if the update and delete is possible using Azure Data Factory CDC.
User's image

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

2 answers

Sort by: Most helpful
  1. Amira Bedhiafi 16,146 Reputation points
    2024-04-28T19:12:17.93+00:00

    If your SQL source doesn't have SQL Server CDC with net_changed enabled or doesn't have any time-based incremental columns, then maybe the columns the tables in your source will be unavailable for selection.


  2. ShaikMaheer-MSFT 38,126 Reputation points Microsoft Employee
    2024-04-29T16:55:59.4433333+00:00

    Hi jigsm,

    Thank you for posting query in Microsoft Q&A Platform.

    Kindly check my video on CDC and fellow same steps. That helps to avoid this error. Below is the video link. CDC (change data capture) Resource in Azure Data Factory

    Hope this helps. Please let me know how it goes.


    Please consider hitting Accept Answer button. Accepted answers help community as well.