Hi @Vsleg, Enabling the Change Data Feed feature for streaming tables in Azure Databricks allows you to track row-level changes between versions of a Delta table. When enabled, the runtime records change events for all data written into the table, including metadata indicating whether a row was inserted, deleted, or updated. You can then read these change events in batch queries using Spark SQL, Apache Spark DataFrames, and Structured Streaming.
Hereโs how you can enable the Change Data Feed:
-
New Table:
-
Existing Table:
-
All New Tables:
- To enable the Change Data Feed for all new tables, set the Spark configuration property
spark.databricks.delta.properties.defaults.enableChangeDataFeed = true
.
Remember that only changes made after enabling the Change Data Feed are recorded; past changes to a table are not captured. Additionally, the Change Data Feed works alongside table history to provide comprehensive change information. Cloning a Delta table creates a separate history, so the Change Data Feed on cloned tables wonโt mat...1.