
Answer-first summary for fast verification
Answer: ON VIOLATION DROP ROW
The correct answer is `ON VIOLATION DROP ROW`. This ensures that records violating the expectation are dropped, and their violations are reported in the event log. For more details, refer to the [Microsoft documentation](https://learn.microsoft.com/en-us/azure/databricks/workflows/delta-live-tables/delta-live-tables-expectations).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
In a Delta Live Tables pipeline, a data engineer has set up a data quality constraint as follows: CONSTRAINT valid_id EXPECT (id IS NOT NULL) _____________. How should the blank be filled to ensure that records violating this constraint are dropped and their violations are reported in metrics?
A
ON VIOLATION FAIL UPDATE
B
ON VIOLATION DELETE ROW
C
There is no need to add ON VIOLATION clause. By default, records violating the constraint will be discarded, and reported as invalid in the event log
D
ON VIOLATION DROP ROW
E
ON VIOLATION DISCARD ROW
No comments yet.