Databricks Certified Data Engineer Associate — Question 12

A dataset has been defined using Delta Live Tables and includes an expectations clause:
CONSTRAINT valid_timestamp EXPECT (timestamp > '2020-01-01') ON VIOLATION DROP ROW
What is the expected behavior when a batch of data containing data that violates these constraints is processed?

Answer options

Correct answer: C

Explanation

The correct answer is C, as the expectation is defined to drop rows that do not meet the timestamp condition and log them as invalid. Option A is incorrect because there is no mention of a quarantine table in this context. Option B and D are wrong since they suggest that invalid records are added to the dataset, which contradicts the expectation clause. Option E is also incorrect, as the job will not fail; it will simply drop the violating records.