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
- 1Step 1: Retry the MERGE operation — after the schema change is committed, the retry will use the updated schema and should succeed.
- 2Step 2: Coordinate schema changes and MERGE operations to not run concurrently; apply schema changes during a maintenance window before resuming MERGE pipelines.
- 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.
- 4Step 4: Use Delta table isolation level Serializable to detect and abort conflicting schema changes early rather than failing mid-operation.