
Explanation:
Delta Lake treats CHECK constraints as atomic enforcement mechanisms. If any row in a transaction (via INSERT, UPDATE, MERGE, COPY INTO, etc.) violates the defined constraint, the entire transaction is rolled back and an error is raised. This ensures strict data integrity by preventing partial or invalid writes.
CHECK constraint is violated.Ultimate access to all questions.
A Delta Lake table named activity_data includes a CHECK constraint called correct_coordinates to ensure valid geographic ranges (latitude between -90 and 90; longitude between -180 and 180). If a batch write operation attempts to insert a dataset containing at least one record with a longitude of 185, what will be the result of this operation?
A
The write operation succeeds for valid records, but the record with the invalid longitude is silently skipped.
B
The write operation succeeds for all records, and a new boolean column correct_coordinates is added to flag violating rows.
C
The entire write operation fails atomically, preventing any data from being committed to the table.
D
The write operation succeeds for all records, but the violating records are logged as warnings in the driver logs.
E
The operation results in a partial success, where records processed before the violation are committed and the invalid record is moved to a quarantine table.
No comments yet.