Certified Data Engineer Associate Exam QuestionsBrowse all questions from this exam

Certified Data Engineer Associate Exam - Question 16


Which of the following commands can be used to write data into a Delta table while avoiding the writing of duplicate records?

Show Answer
Correct Answer: C

The correct command to use for writing data into a Delta table while avoiding the writing of duplicate records is MERGE. The MERGE command in Delta Lake allows you to perform an 'upsert' operation (a combination of update and insert), which inserts new records if they do not exist and updates existing records based on a specified condition. This ensures that duplicates are avoided and data integrity is maintained when adding new data to the table.

Discussion

15 comments
Sign in to comment
kniveszOption: C
Apr 2, 2023

la unica opcion posible

knivesz
Apr 4, 2023

Respuesta correcta C A) DROP: Elimina registros, B) IGNORE : NO existe C) MERGE: EN base a la data, registra, actualiza o elimina registros, D) NO existe E) Solo inserta

vctrhugoOption: C
Sep 3, 2023

C. MERGE The MERGE command is used to write data into a Delta table while avoiding the writing of duplicate records. It allows you to perform an "upsert" operation, which means that it will insert new records and update existing records in the Delta table based on a specified condition. This helps maintain data integrity and avoid duplicates when adding new data to the table.

Varma_SaraswathulaOption: C
Apr 21, 2023

Ans - C https://docs.databricks.com/sql/language-manual/delta-merge-into.html

softthinkersOption: C
May 4, 2023

Answer is C. AS DROP is used to remove a table or database IGNORE is used to skip errors while executing a query. INSERT will add new records but will not avoid duplication so Merge is right answer

AtnafuOption: C
Jul 7, 2023

C. MERGE To write data into a Delta table while avoiding the writing of duplicate records, you can use the MERGE command. The MERGE command in Delta Lake allows you to combine the ability to insert new records and update existing records in a single atomic operation. The MERGE command compares the data being written with the existing data in the Delta table based on specified matching criteria, typically using a primary key or unique identifier. It then performs conditional actions, such as inserting new records or updating existing records, depending on the comparison results. By using the MERGE command, you can handle the prevention of duplicate records in a more controlled and efficient manner. It allows you to synchronize and reconcile data from different sources while avoiding duplication and ensuring data integrity. Therefore, option C, MERGE, is the correct command to use when writing data into a Delta table while avoiding the writing of duplicate records.

DavidRouOption: C
Oct 9, 2023

MERGE INTO is the one to choose if you want to avoid duplicates.

XiltroXOption: D
Apr 4, 2023

Wrong answer. The correct answer is D.

Oleskie
Apr 5, 2023

'C' is a correct answer. https://docs.databricks.com/sql/language-manual/delta-merge-into.html

XiltroX
Apr 5, 2023

Thanks for the clarification

naxacod574Option: C
Apr 20, 2023

Option C

KalavathiPOption: C
Sep 26, 2023

Merge will avoid duplicates by comparing the results based on primary key columns

chris_machOption: C
Sep 29, 2023

Merge is correct

J_1_2Option: C
Oct 19, 2023

Merge is correct

awofalusOption: C
Nov 7, 2023

C is correct

SerGreyOption: C
Jan 3, 2024

Correct answer is C

benni_aleOption: C
Apr 27, 2024

C merge

BharaniRajOption: C
May 18, 2024

C is the right answer