Change Data Capture preview feature not working

Anmol Ganju 176 Reputation points
2024-07-22T07:31:37.3133333+00:00

I am trying to perform some poc by using change data capture feature which is in preview, but I am not able to see table results. I create a connection with Azure SQL Database and get a succesful connection, but when I try to fetch tables every time its giving me not able to fetch result error. I tried in different data centers East Asia, East US 2 but seems I am not able to fetch the results. Is this feature enabled for specific datacenters? Or do I need to enable it from Microsoft in order to test it out?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,690 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 89,471 Reputation points Microsoft Employee
    2024-07-22T10:48:48.5966667+00:00

    @Anmol Ganju - Thanks for the question and using MS Q&A platform.

    You need to enable change data capture on Azure SQL DB before using this option in ADF.

    Enable native change data capture(Preview): Use this option to tell ADF to only process delta data captured by SQL change data capture technology since the last time that the pipeline executed. With this option, the delta data including row insert, update and deletion will be loaded automatically without any incremental column required. You need to enable change data capture on Azure SQL DB before using this option in ADF. For more information about this option in ADF, see native change data capture.

    Note: Before you can create a capture instance for individual tables, you must enable change data capture for the database.

    To enable change data capture, run the stored procedure sys.sp_cdc_enable_db (Transact-SQL) in the database context. To determine if a database already has CDC enabled, query the is_cdc_enabled column in the sys.databases catalog view.

    -- ====
    -- Enable Database for CDC
    -- ====
    USE MyDB
    GO
    EXEC sys.sp_cdc_enable_db
    GO
    

    For more details, refer to Copy and transform data in Azure SQL Database by using Azure Data Factory or Azure Synapse Analytics.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


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.