
Answer-first summary for fast verification
Answer: None of the records have been inserted into the table.
Write operations failed due to the constraint violation. Delta Lake's ACID guarantees ensure all transactions are atomic, meaning they either succeed or fail completely. Thus, none of the records were inserted into the table, even those not violating the constraints. Reference: [ACID Transactions](https://www.databricks.com/glossary/acid-transactions).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
The data engineering team has a Delta table named ‘users’ with a recently added CHECK constraint to ensure age values are positive. An attempt to insert a batch of records, some with negative ages, failed due to constraint violation. What was the outcome of this batch insert?
A
Only records processed before reaching the first violating record have been inserted in the table.
B
All records except those that violate the table constraint have been inserted in the table. Records violating the constraint have been ignored.
C
None of the records have been inserted into the table.
D
All records except those that violate the table constraint have been inserted in the table. Records violating the constraint have been recorded into the transaction log.
E
The outcome depends on the action defined using the ON VIOLATION clause in the table properties.
No comments yet.