How do you handle unexpected schema changes in production ETL pipelines?

Nicola
Updated 5 hours ago in

One challenge I’m exploring in data engineering is managing changes to source systems without breaking downstream pipelines.

For example, an external API might introduce a new field, change an existing field’s data type or remove a column without prior notification. These changes can cause pipeline failures or, even worse, introduce incorrect data into downstream dashboards without anyone noticing immediately.

Automatically adapting to every schema change seems risky, while manually approving every change could become difficult when managing dozens of data sources.

How are data engineering teams handling this in production?

I’m interested in understanding whether teams prefer strict schema validation, schema evolution, data contracts or a combination of these approaches. How do you distinguish harmless changes from those that require immediate intervention?

  • 1
  • 7
  • 5 hours ago
 
5 hours ago

I’d recommend combining data contracts, schema validation and controlled schema evolution rather than relying on just one approach.

The first thing I’d do is classify schema changes based on their potential impact:

  • Adding a new nullable column: Generally safe and can often be handled automatically.

  • Removing or renaming a column: Potentially breaking and should trigger validation before processing continues.

  • Changing a data type: Requires careful review, especially if downstream transformations depend on that field.

Having a schema validation layer at the ingestion stage helps detect these changes before they affect downstream systems. If a breaking change occurs, the affected records can be moved into a quarantine area while the team investigates, rather than allowing incorrect data into production dashboards.

Tools like Great Expectations, dbt and Schema Registry can help automate parts of this process, depending on your architecture.

I’d also recommend maintaining versioned schemas, monitoring schema changes and setting up automated alerts for pipeline owners.

The biggest concern isn’t always a pipeline failure. Sometimes it’s a pipeline that continues running successfully while producing incorrect results. That’s where data quality checks become equally important.

Ultimately, I’d allow backward-compatible changes to evolve automatically, while requiring explicit approval for breaking changes. This provides a reasonable balance between operational flexibility and data reliability.

  • Liked by
Reply
Cancel
Loading more replies