QuestionQ46

VerifiedData Transformation, Cleansing, and Quality

Downstream consumers of a Delta Lake table have reported data-quality issues that affect performance in their applications. In particular, invalid latitude and longitude values in the activity_details table have prevented them from using other geolocation processes.

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

Question Image

A senior engineer has confirmed that this logic is correct and that the valid latitude and longitude ranges are provided, but the code fails when it is run.

Which statement explains the cause of this failure?

Explanation

Delta Lake validates an enforced CHECK constraint against all existing rows when it is added to a table. If any existing record has a latitude outside -90 through 90 or a longitude outside -180 through 180, adding the constraint fails.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!