🔥 3-day streak
Databricks Certified Data Engineer Associate51 / 150
Question 51 of 150

A data engineer maintains a Silver dimension table `dim_customer` and receives a daily batch of updated customer records in a staging view `stg_customer`. Both tables share the key `customer_id`. The requirement is: update existing customers with new attribute values, and insert customers that do not yet exist. Which single Spark SQL statement correctly implements this upsert?

Reviewed for accuracy · Report an issueNext question