
Answer-first summary for fast verification
Answer: Apply `mergeSchema` option set to false in the write operation
Setting the `mergeSchema` option to false in the write operation ensures that any schema changes in the data being appended are not merged with the existing schema. This approach effectively prevents accidental schema modifications, maintaining the schema integrity of the Delta Lake table. While other options like manually adjusting the schema or enabling schema enforcement have their merits, they either introduce potential for human error or focus more on schema consistency rather than specifically preventing accidental modifications during appends. Therefore, option D is the most reliable choice for this scenario.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
To prevent accidental schema modifications during an append operation in a Delta Lake table, which of the following options should you apply?
A
Manually adjust the schema using ALTER TABLE before appending data
B
Set spark.databricks.delta.schema.autoMerge.enabled to true
C
Enable spark.databricks.delta.schemaEnforcement.enabled to true
D
Apply mergeSchema option set to false in the write operation
No comments yet.