Question 150
A production silver Delta table must reconcile change records against current primary keys. The team implements Use a carefully scoped `WHEN NOT MATCHED BY SOURCE THEN DELETE` clause. The goal was: A full snapshot source is authoritative and the target should delete keys absent from it. Which observed result best verifies success?
Explanation
Correct Answer
Target rows absent from the authoritative snapshot are removed under the scope directly measures whether Use a carefully scoped `WHEN NOT MATCHED BY SOURCE THEN DELETE` clause achieved the requirement “A full snapshot source is authoritative and the target should delete keys absent from it.” It checks the operating result rather than just a configured resource name.
Incorrect Answers
An older event does not replace a newer target value pertains to a different control (Add an ordering/version predicate to the matched update condition) and a different need (Only rows with a newer event version should replace an existing target record). It cannot establish that Use a carefully scoped `WHEN NOT MATCHED BY SOURCE THEN DELETE` clause met the stated goal.
The steward annotation stays unchanged while authorized source attributes update would demonstrate the separate action Use an explicit column assignment list in the MERGE matched update instead of updating all columns, which addresses “A source update must change only approved columns while preserving steward-maintained target annotations.” It does not verify the requirement “A full snapshot source is authoritative and the target should delete keys absent from it” following Use a carefully scoped `WHEN NOT MATCHED BY SOURCE THEN DELETE` clause.
Source-marked deletes remove only the intended target keys pertains to a different control (Use `WHEN MATCHED AND <delete predicate> THEN DELETE` in MERGE) and a different need (A deletion feed should remove matching target rows explicitly). It cannot establish that Use a carefully scoped `WHEN NOT MATCHED BY SOURCE THEN DELETE` clause met the stated goal.