Question 390
An operational source delivers insert, update and tombstone events to a silver Delta table. A reviewer sees that engineers chose Use deterministic stable keys and idempotent matched/not-matched logic. To verify A retried merge must not produce duplicate logical business records, what should the reviewer observe?
Explanation
Correct Answer
The team used Use deterministic stable keys and idempotent matched/not-matched logic to fulfill “A retried merge must not produce duplicate logical business records.” Observing Re-execution leaves one current target row per key confirms the intended effect in the resulting workload.
Incorrect Answers
Only keys absent from the authorized snapshot scope are removed would demonstrate the separate action Apply a scoped `WHEN NOT MATCHED BY SOURCE THEN DELETE` clause, which addresses “The full snapshot is authoritative and stale target keys must be purged.” It does not verify the requirement “A retried merge must not produce duplicate logical business records” following Use deterministic stable keys and idempotent matched/not-matched logic.
That observation is a valid indicator for “Rows marked deleted should be removed only when the incoming event is newer” when using Use a sequenced matched-delete predicate in MERGE. The scenario instead tests “A retried merge must not produce duplicate logical business records”; the relevant result is Re-execution leaves one current target row per key.
One committed transaction applies the intended upsert would demonstrate the separate action Use Delta `MERGE INTO` with matched update and not-matched insert, which addresses “Matched keys should update and unseen keys should be inserted atomically.” It does not verify the requirement “A retried merge must not produce duplicate logical business records” following Use deterministic stable keys and idempotent matched/not-matched logic.