Menu

1 / 5

SQL Server to Databricks With CDC: From sp_cdc_enable_db to a Unity Catalog Query

DEV Community: database·Shubham Baldava·7 days ago
#IWChMjTi
#devtodatabase#devto#dev#catalog#databricks
Long article (2847 words) — no AI summary yet.
Reading 0:00
15s threshold

Copying a table from SQL Server to Databricks once is easy. Keeping that copy current is the hard part: an order flips to delivered , a customer moves city, and Databricks keeps the old value until the next full export. Deletes are worse: an incremental file load has no way to say that a row went away, so you fall back to reloading the whole table.

SQL Server ships its own change feed. Change data capture (CDC) has the SQL Server Agent read the transaction log and write every change into a change table per tracked table, such as cdc.dbo_customers_CT . The open question is what reads those tables.

Ways to move SQL Server data into Databricks

bcp export, then Auto Loader. The bulk copy utility writes each table to files in a bucket, and Auto Loader picks them up. Freshness is hours to daily, and a changed row means a full reload or a merge you write yourself.

Debezium and Kafka, read with Structured Streaming . Changes arrive within seconds.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.