
Answer-first summary for fast verification
Answer: When the target table cannot contain duplicate records
The MERGE INTO command is essential when you need to ensure that the target table does not contain duplicate records, making it the correct choice over INSERT INTO in such scenarios. This command allows for the conditional update, insertion, or deletion of records based on whether they match criteria from a source, thus maintaining data integrity by preventing duplicates. The other options provided do not specifically necessitate the use of MERGE INTO, as they either do not address the issue of duplicates or are unrelated to the command's primary function.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
When should a data engineer choose the MERGE INTO command over the INSERT INTO command?
A
When the location of the data needs to be changed
B
When the target table is an external table
C
When the source table can be deleted
D
When the target table cannot contain duplicate records
E
When the source is not a Delta table
No comments yet.