mmune | Why dbt tests pass while source data drifts

Show text version

Whitepaper ยท dbt

Why dbt tests pass while source data drifts

Four ways a green dbt run sits on top of wrong numbers, and where the check has to sit instead.

Nothing failed. The number is still wrong.

The models built, not_null and unique passed, freshness came back green. Then finance asks why EMEA revenue doesn't match the ERP.

dbt tests what you wrote down. It can't see the source change underneath.

dbt answers

Did data arrive, and does it fit my rules?

It doesn't answer

Is this still the same data?

Four ways it stays green

1. Freshness passes because something landed

Half a batch arrives on time. The newest row is recent, so the table looks healthy.

2. accepted_values passes because the value fits

Dollars become cents. A discount becomes a rate. Still valid, still wrong.

3. The column was never in a test

The source has sixty columns. The model selects eight.

4. The test runs on a copy

Connectors widen types on the way in. dbt only sees what survived the trip.

Example: gross becomes net

More dbt tests help. They still run after load.

If a vendor changed what a field means tomorrow, which check would notice, and when?

See what's silently wrong.

10-day passive evaluation. Read-only on your data.