Fabric Data Engineer (DP-700) · Free practice question 11 of 12
Schema evolution with mergeSchema
A daily PySpark job at Aldwick Fashion appends to a Delta table, and today's source added a new nullable column, PromoCode. The append fails with a schema mismatch error. The team wants new columns added automatically while existing data stays in place. Which write option should they use?
- A.option("overwriteSchema", "true") with mode("overwrite")
- B.option("mergeSchema", "true") with mode("append")
- C.option("inferSchema", "false") with mode("append")
- D.option("ignoreChanges", "true") with mode("append")
Show answer and explanation
Correct answer: B. option("mergeSchema", "true") with mode("append")
Why: Setting mergeSchema to true on an append lets Delta add new columns such as PromoCode to the table schema while keeping existing rows. overwriteSchema with overwrite replaces the data as well as the schema. inferSchema applies when reading files, and ignoreChanges is a streaming read option.
More free Fabric Data Engineer (DP-700) questions
- Maximum Spark job lifetime guardrail
- Managed identity for Azure SQL mirroring
- Spark job definition for script batch jobs
- KQL mv-expand for arrays
- Dataflow Gen2 fast copy
- Zero-copy table clone in a warehouse
- Restoring a Delta table version
- Killing a running warehouse query
- Until activity for status polling
- Load to Tables from lakehouse files
- Pipeline dependency conditions on failure