Home / DE Associate practice test / Data Transformation and Modeling / Question

Databricks Data Engineer Associate · free practice question

A data engineer adds a data-quality constraint to a Lakeflow declarative pipeline table so that any record failing the constraint is discarded before it is…

Exam-style question on Data Transformation and Modeling from the free DE Associate practice test, with the answer and a full explanation below.

Updated November 10, 2026

Data Transformation and Modeling

A data engineer adds a data-quality constraint to a Lakeflow declarative pipeline table so that any record failing the constraint is discarded before it is written to the target, while the pipeline update keeps running. Which expectation clause achieves this?

  1. ACONSTRAINT valid_id EXPECT (id IS NOT NULL) with no violation clause, which drops invalid rows by default and counts them in the event log.
  2. BCONSTRAINT valid_id EXPECT (id IS NOT NULL) ON VIOLATION FAIL UPDATE, which discards failing records, logs a metric, and finishes the update.
  3. CCONSTRAINT valid_id EXPECT (id IS NOT NULL) ON VIOLATION DROP ROW, which removes failing records before the write while the update continues.
  4. DCONSTRAINT valid_id DROP (id IS NOT NULL) ON VIOLATION WARN, which filters failing rows from the target and halts the update on the first one.
  5. ECONSTRAINT valid_id EXPECT (id IS NOT NULL) ON VIOLATION RESCUE ROW, which routes failing records to a _rescued_data column for inspection.
Answer & explanation

Correct answer: C

WHY C: ON VIOLATION DROP ROW discards records failing the boolean EXPECT condition before writing and lets the update continue with the valid rows.

WHY NOT B: FAIL UPDATE stops the pipeline update on the first violation; it does not quietly discard rows and continue.

WHY NOT A: An EXPECT with no clause is the warn/retain default, which keeps invalid records (and records the violation metric) rather than dropping them.

WHY NOT D: DROP is not a valid constraint keyword, and the description also contradicts itself by both filtering and halting.

WHY NOT E: RESCUE ROW is not an expectation policy; _rescued_data belongs to Auto Loader schema handling, not pipeline expectations.

Take the full DE Associate practice test free →

Would you pass today?

This question is one of 45 in the free, timed Databricks Data Engineer Associate practice test. Take it and get a section-by-section score.

Start the free test →