# Data Observability and Data Contracts

> Monitor freshness, volume, schema and distribution automatically, and agree data contracts with producers so upstream changes stop breaking pipelines. Free...

Canonical: https://www.internhack.in/roadmaps/tracks/data-engineer/observability-contracts
Last updated: 2026-11-28

Monitor freshness, volume, schema and distribution automatically, and agree data contracts with producers so upstream changes stop breaking pipelines.

Advanced · about 4 hours · difficulty 3/5

Learn first: [Testing with dbt](https://www.internhack.in/roadmaps/tracks/data-engineer/dbt-tests)

Tests check what you thought of. **Observability** watches for what you did not, and **contracts** stop many problems at the source.

### Data observability

Monitor every important table for:

- **Freshness**: when was it last updated?
- **Volume**: did today's row count drop by 40 percent?
- **Schema**: did columns appear, disappear or change type?
- **Distribution**: did the share of null cities or the average order value shift sharply?
- **Lineage**: what is affected downstream when something breaks?

Tools range from commercial platforms (Monte Carlo and others) to open source options (Elementary for dbt, custom SQL monitors plus alerts). Start simple: a daily job computing row counts and freshness with thresholds.

### Data contracts

A data contract is an agreement between a data producer (often a backend team) and consumers:

- Schema with types, required fields and meaning.
- Quality expectations and SLAs (delivered by 6 a.m., no null order_id).
- Ownership and a change process (breaking changes need notice and versioning).

Enforce contracts with schema registries for events, dbt model contracts for tables and CI checks in producer repositories.

### Pipeline SLAs and on-call

Define SLAs for critical datasets, alert the owning team, write runbooks, and run blameless post-mortems after incidents.

### Pitfalls

- Alerting on everything so the team mutes the channel.
- Contracts written in a document nobody enforces.

You are ready to move on when you have a daily monitor that alerts on freshness and volume anomalies for your key tables, and a written contract for one source with an enforcement mechanism.

## Key concepts

- **Freshness and volume monitoring**
- **Schema change detection**
- **Distribution anomalies**
- **Data contracts**
- **dbt model contracts**
- **Elementary for dbt**
- **SLAs, runbooks, post-mortems**

## Mini project

Build a small observability job that records daily row counts and max timestamps for five tables, flags anomalies beyond a threshold, and posts to a Slack or Discord webhook. Write a one-page data contract for your orders source.

## Check yourself

A backend team renames a column and your pipeline loads nulls for three days. Which practice would have prevented this, and which would have detected it sooner?

## Free resources

- [dbt model contracts](https://docs.getdbt.com/docs/collaborate/govern/model-contracts) (dbt Labs)
- [Elementary documentation](https://docs.elementary-data.com/) (Elementary)
- [Confluent documentation (Schema Registry)](https://docs.confluent.io/) (Confluent)

Previous: [Great Expectations and Pipeline Validation](https://www.internhack.in/roadmaps/tracks/data-engineer/great-expectations) · Next: [Cloud Fundamentals for Data Engineers](https://www.internhack.in/roadmaps/tracks/data-engineer/cloud-fundamentals)

## More in Data Quality and Testing

- [Data Quality Fundamentals](https://www.internhack.in/roadmaps/tracks/data-engineer/data-quality-fundamentals)
- [Testing with dbt](https://www.internhack.in/roadmaps/tracks/data-engineer/dbt-tests)
- [Great Expectations and Pipeline Validation](https://www.internhack.in/roadmaps/tracks/data-engineer/great-expectations)
- [Data Observability and Data Contracts](https://www.internhack.in/roadmaps/tracks/data-engineer/observability-contracts)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Data Engineer Roadmap](https://www.internhack.in/roadmaps/tracks/data-engineer)
