Databricks Certified Data Engineer Associate — Question 54

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 because the expectation clause specifically states that records violating the constraint will be dropped. Options A and D are incorrect as they suggest that the job fails or that invalid records are added to the dataset, which contradicts the behavior defined in the expectation. Option B is also incorrect since it implies that invalid records are flagged instead of being dropped.