MetricSign
EN|NLRequest Access
High severityexecution

Power BI Refresh Error:
DELTA_SCHEMA_CHANGE_MERGE_FAILED

What does this error mean?

A Delta Lake MERGE operation failed because a concurrent transaction modified the schema of the target table while the MERGE was in progress, making it impossible to safely resolve the conflict.

Common causes

  • 1A concurrent ALTER TABLE ADD COLUMNS or schema evolution write changed the Delta table schema while a MERGE operation was reading the table's metadata
  • 2An automatic schema evolution triggered by a streaming write added new columns to the table schema mid-MERGE
  • 3A dbt model with schema_changes = ignore ran simultaneously with a MERGE pipeline targeting the same Delta table

How to fix it

  1. 1Step 1: Retry the MERGE operation — after the schema change is committed, the retry will use the updated schema and should succeed.
  2. 2Step 2: Coordinate schema changes and MERGE operations to not run concurrently; apply schema changes during a maintenance window before resuming MERGE pipelines.
  3. 3Step 3: If schema evolution is frequent, consider using mergeSchema = true carefully and ensure all writers agree on the new schema before any MERGE is attempted.
  4. 4Step 4: Use Delta table isolation level Serializable to detect and abort conflicting schema changes early rather than failing mid-operation.

Frequently asked questions

Does setting mergeSchema = true prevent this error?

No. mergeSchema = true allows a write to add new columns to the schema, but it does not prevent a concurrent MERGE from failing if it encounters an unexpected schema change mid-execution.

Can streaming pipelines trigger this?

Yes. Delta Lake auto-merge schema evolution in structured streaming can modify the table schema between the MERGE operation's plan phase and its commit phase, causing this error.

Other execution errors