
Answer-first summary for fast verification
Answer: append, ('mergeschema', 'true')
The correct answer is 'append, ('mergeschema', 'true')' because it ensures that all existing rows in the Delta table are kept ('append') and allows automatic schema updates when new columns are detected in the DataFrame ('mergeschema', 'true'). This way, the new data with the additional columns is correctly integrated into the table. Using 'overwrite' would replace the existing data, which does not meet the requirement of keeping all the existing rows.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are working with a Fabric tenant that houses a lakehouse named Lakehouse1. Within Lakehouse1, there exists a Delta table consisting of eight columns. Recently, new data has been provided to you, which includes the original eight columns as well as two additional columns. You have created a Spark DataFrame containing this new data and have assigned it to a variable named df. Your task is to append the new data to the existing Delta table while adhering to the following requirements:
• Retain all pre-existing rows in the Delta table. • Ensure all new data is incorporated into the Delta table.
How should you complete the code to achieve this? Select the appropriate options.
A
append, ('mergeschema', 'true')
B
append, ('overwriteschema', 'true')
C
overwrite, ('mergeschema', 'true')
D
overwrite, ('overwriteschema', 'true')
No comments yet.