🔥 3-day streak
Databricks Certified Data Engineer Associate48 / 150
Question 48 of 150

A data engineer runs a MERGE INTO command to upsert a batch of customer updates into a Delta target table. The source DataFrame contains multiple rows with the same customer_id (the merge key) because the daily extract captured several updates per customer. The MERGE fails with an error stating that a matched target row was matched by more than one source row. What is the correct approach to resolve this while keeping only the most recent update per customer?

Reviewed for accuracy · Report an issueNext question