Delta Lake interview questionsQuestion 2 of 2
Delta Lake interview question · Question 2 of 2
What is schema evolution and when is it safe?
Short answer
Schema evolution means changing a table's schema over time, for example adding a column when the source starts sending a new field. It is safe when the change is backward compatible: adding a nullable column, so old rows read as NULL and existing queries keep working. Incompatible type changes, renames and drops can break downstream readers and need explicit migration, communication and usually a coordinated change rather than automatic merging.
Detailed explanation
| Change | Safe? | Why |
|---|---|---|
| Add nullable column | Yes | Old data reads as NULL; old queries ignore it |
| Widen numeric type | Usually, check engine support | Values still fit |
| Narrow or change type | No | Existing values may not convert |
| Rename column | Risky | Every downstream query referencing the old name breaks |
| Drop column | Risky | Same, plus possible data loss |
Safe rollout of a breaking change
- Add the new column alongside the old one.
- Backfill it and update consumers.
- Stop writing the old column, then remove it after consumers have migrated.
Common mistakes
- Turning on automatic merge so a typo becomes a new column.
- Changing a type in place without checking existing data.
- No communication with downstream owners.
Progress is saved in this browser only. No account needed.