Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Databricks Certified Data Engineer Associate · Databricks
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
- Correct answer : A — `@dp.expect_or_drop("valid_total", "order_total >= 0")` removes rows that fail the condition before the write and lets the update finish normally. A . The `expect_or_drop` decorator drops records that fail its constraint before the data is written to the target, and the constraint `order_total >= 0` describes a valid record. Negative totals are therefore discarded while the update still completes. B . The plain `expect` decorator only tracks violations for reporting; rows that fail the check are still written to the target table, so negative totals would remain in the silver table, which does not meet the requirement. C . The `expect_or_fail` decorator makes invalid records prevent the update from succeeding, which is the opposite of the 'without failing the update' requirement in this scenario. It suits critical checks where any bad row should stop the run. D . The right decorator, but the constraint is inverted: an expectation constraint states what a valid record looks like, so `order_total < 0` treats negative totals as valid and drops every non-negative order. The silver table would keep exactly the rows the team wants to discard.