Mounika_Tarigop
Databricks Employee
Databricks Employee

The _commit_version is a part of the Delta Lake transaction log and is committed at the same time as the new data. This means that the changes are processed in the order they were committed in the source table.Ensure that CDF is enabled on your source Delta table (src). This allows you to capture changes (inserts, updates, deletes) in the source table.

The code snippet you provided, which correctly sets up the streaming read and write operations. By following this, you can ensure that the _commit_version in the target table (tgt) reflects the correct sequence of changes as they occurred in the source table (src). This guarantees that the data in the target table is consistent with the source table in terms of the order of commits