Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam Certified Data Engineer Professional topic 1 question 38 discussion

Actual exam question from Databricks's Certified Data Engineer Professional
Question #: 38
Topic #: 1
[All Certified Data Engineer Professional Questions]

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?

  • A. Because another team uses this table to support a frequently running application, two-phase locking is preventing the operation from committing.
  • B. The activity_details table already exists; CHECK constraints can only be added during initial table creation.
  • C. The activity_details table already contains records that violate the constraints; all existing data must pass CHECK constraints in order to add them to an existing table.
  • D. The activity_details table already contains records; CHECK constraints can only be added prior to inserting values into a table.
  • E. The current table schema does not contain the field valid_coordinates; schema evolution will need to be enabled before altering the table to add a constraint.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
8605246
Highly Voted 4 months, 1 week ago
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
upvoted 7 times
...
hamzaKhribi
Most Recent 1 week, 1 day ago
Selected Answer: C
C is correct
upvoted 1 times
...
Enduresoul
2 weeks, 2 days ago
Selected Answer: C
C is correct
upvoted 1 times
...
aragorn_brego
2 weeks, 6 days ago
Selected Answer: 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.
upvoted 1 times
...
BIKRAM063
1 month, 1 week ago
Selected Answer: C
Correct option C : existing data violated check constraint condition
upvoted 1 times
...
Quadronoid
1 month, 1 week ago
Selected Answer: C
Right answer is C
upvoted 1 times
...
sturcu
1 month, 3 weeks ago
Selected Answer: C
C - table already has data
upvoted 1 times
...
MarceloManhaes
2 months, 2 weeks ago
Yes the correct is option C
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...