Databricks Certified Data Engineer Associate — Question 115
In which of the following scenarios should a data engineer use the MERGE INTO command instead of the INSERT INTO command?
Answer options
- A. When the location of the data needs to be changed
- B. When the target table is an external table
- C. When the source is not a Delta table
- D. When the target table cannot contain duplicate records
Correct answer: D
Explanation
The MERGE INTO command is specifically designed to handle scenarios where updates and inserts are needed simultaneously, particularly to ensure that no duplicate records are inserted into the target table, which aligns with option D. The other options do not pertain to the operational functionality of MERGE INTO, making them less appropriate for this scenario.