DATABRICKS-CERTIFIED-DATA-ENGINEER-ASSOCIATE · Question #87
Which of the following commands can be used to write data into a Delta table while avoiding the writing of duplicate records?
The correct answer is C. MERGE. MERGE (also known as upsert) matches source records against a target Delta table using a join condition. When a match is found, you can UPDATE or skip; when no match is found, you INSERT. This logic inherently prevents duplicate records. APPEND and INSERT (D, E) add data…
Question
Options
- ADROP
- BIGNORE
- CMERGE
- DAPPEND
- EINSERT
How the community answered
(52 responses)- A4% (2)
- B6% (3)
- C88% (46)
- E2% (1)
Explanation
MERGE (also known as upsert) matches source records against a target Delta table using a join condition. When a match is found, you can UPDATE or skip; when no match is found, you INSERT. This logic inherently prevents duplicate records. APPEND and INSERT (D, E) add data unconditionally and can produce duplicates. DROP (A) removes data entirely. IGNORE is not a standard Delta Lake write mode that prevents duplicates in this context.
Topics
Community Discussion
No community discussion yet for this question.