
Answer-first summary for fast verification
Answer: Records that violate the expectation are dropped from the target dataset and recorded as invalid in the event log.
The expectation clause specifies that if the timestamp is not greater than '2020-01-01', the row will be considered in violation of the constraint. The ON VIOLATION DROP ROW clause means that rows violating the constraint will be dropped from the target dataset. Additionally, these violated records are recorded as invalid in the event log, ensuring that the rows failing the defined constraint are logged for auditing or further investigation. This behavior maintains data integrity within the dataset based on the specified constraints.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A dataset, constructed using Delta Live Tables, incorporates an expectations clause: CONSTRAINT valid_timestamp EXPECT (timestamp > '2020-01-01') ON VIOLATION DROP ROW.
What is the anticipated outcome when processing a batch of data that includes records which do not meet these constraints?
A
Records that violate the expectation are dropped from the target dataset and loaded into a quarantine table.
B
Records that violate the expectation are added to the target dataset and flagged as invalid in a field added to the target dataset.
C
Records that violate the expectation are dropped from the target dataset and recorded as invalid in the event log.
D
Records that violate the expectation are added to the target dataset and recorded as invalid in the event log.
No comments yet.