DATABRICKS-CERTIFIED-DATA-ENGINEER-ASSOCIATE · Question #45
A dataset has been defined using Delta Live Tables and includes an expectations clause: CONSTRAINT valid_timestamp EXPECT (timestamp > '2020-01-01') ON VIOLATION FAIL UPDATE What is the expected…
The correct answer is B. Records that violate the expectation cause the job to fail. In Delta Live Tables, the ON VIOLATION FAIL UPDATE clause is the strictest constraint mode. When a record violates the defined expectation, the entire pipeline update fails immediately. This is in contrast to ON VIOLATION DROP ROW (which silently drops violating records) or no…
Question
Options
- ARecords that violate the expectation are dropped from the target dataset and recorded as invalid in
- BRecords that violate the expectation cause the job to fail.
- CRecords that violate the expectation are dropped from the target dataset and loaded into a
- DRecords that violate the expectation are added to the target dataset and recorded as invalid in the
- ERecords that violate the expectation are added to the target dataset and flagged as invalid in a
How the community answered
(29 responses)- A3% (1)
- B90% (26)
- C3% (1)
- D3% (1)
Explanation
In Delta Live Tables, the ON VIOLATION FAIL UPDATE clause is the strictest constraint mode. When a record violates the defined expectation, the entire pipeline update fails immediately. This is in contrast to ON VIOLATION DROP ROW (which silently drops violating records) or no ON VIOLATION clause (which allows violating records through but tracks them as invalid metrics). Use FAIL UPDATE when data quality is critical and any bad data should halt the pipeline.
Topics
Community Discussion
No community discussion yet for this question.