Exam Certified Data Engineer Professional All QuestionsBrowse all questions from this exam
Question 38

The downstream consumers of a Delta Lake table have been complaining about data quality issues impacting performance in their applications. Specifically, they have complained that invalid latitude and longitude values in the activity_details table have been breaking their ability to use other geolocation processes.

A junior engineer has written the following code to add CHECK constraints to the Delta Lake table:

A senior engineer has confirmed the above logic is correct and the valid ranges for latitude and longitude are provided, but the code fails when executed.

Which statement explains the cause of this failure?

    Correct Answer: C

    The operation fails because the activity_details table already contains records that violate the constraints. In Delta Lake, when adding a CHECK constraint to an existing table, all existing data must comply with the new constraints. If any records in the table do not meet the constraint conditions specified, the operation will fail. Therefore, before adding the CHECK constraints, it is necessary to ensure that all existing records meet the constraints or modify the records accordingly.

Discussion
8605246Option: C

incorrect the correct option is C, with constraints, if added to an existing table the existing data in the table must be consistent with the constraint otherwise it fails https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-ddl-alter-table.html#add-constraint

aragorn_bregoOption: C

When adding a CHECK constraint to an existing table, the operation will fail if there are any rows in the table that do not meet the constraint. Before a CHECK constraint can be added, the data already in the table must be validated to ensure that it complies with the constraint conditions. If any existing records violate the new constraints, they must be corrected or removed before the ALTER TABLE command can be successfully executed.

PrashantTiwariOption: C

C is correct

DAN_HOption: C

correct ans is C

AziLaOption: C

correct ans is C

Jay_98_11Option: C

correct

kz_dataOption: C

C is the correct answer

PatitoOption: C

C is correct

hamzaKhribiOption: C

C is correct

EnduresoulOption: C

C is correct

BIKRAM063Option: C

Correct option C : existing data violated check constraint condition

QuadronoidOption: C

Right answer is C

sturcuOption: C

C - table already has data

MarceloManhaesOption: C

Yes the correct is option C