I am building a Delta Live Tables pipeline and I need to perform complex quality checks on top of the data mart. Following the guidelines of DLT, this should be done in a separate temporary live table where the quality check logic is implemented as well as the expectations. I add the clause ON VIOLATION FAIL UPDATE on the temporary table with the quality check logic and I expect that when an expectation fails all the pipeline fails and all transactions within the execution get rollbacked. However, the behavior I see is that when the expectation fails only the final table fails but the transaction in the data mart table do not get rollbacked, as well as the other tables in the pipeline. In general, when an expectation with the clause ON VIOLATION FAIL UPDATE fails, only that table and the downstream tables fails and no transactions get committed but the other tables in the pipeline continue processing and commit transactions. Is there a way to set the behavior of DLT to immediately stop the execution and rollback any transaction ?
From https://learn.microsoft.com/en-us/azure/databricks/delta-live-tables/expectations Fail on invalid records When invalid records are unacceptable, use the expect or fail operator to stop execution > immediately when a record fails validation. If the operation is a table update, the system atomically rolls back the transaction