Databricks
The Databricks template uses MERGE INTO on Delta tables, with Delta Change Data Feed as the source where it is on, or the change-data APIs in Lakeflow Declarative Pipelines.
- A Delta MERGE fails when more than one source row matches the same target row. That is why the template reduces each key to its latest change first.
- Once Change Data Feed is enabled on a table, it exposes each row change with its change type and commit version, ready to use as the change source.
- The AUTO CDC flow in Lakeflow Declarative Pipelines (previously APPLY CHANGES) takes the keys, a sequence column and a delete condition, and handles out-of-order records declaratively.
- The job's principal needs MODIFY on the target table in Unity Catalog.