## TL;DR
A jump to a 40 percent null rate is a structural break, not noise: segment the nulls by source, record type, and load batch to find the segment that went fully null, then fix that segment's mapping or join. A rate that high almost always means one whole input stopped populating the field.

```text
unexpected nulls error: failed data quality test null rate spiked to 40 percent
```

## Use this when
- The check or run fails with this symptom: the null rate for a key field spiked to roughly 40 percent.
- You are working on a production table whose null rate suddenly reached about 40 percent and the failure repeats on the same data or configuration.
- You need the failing rows, rule, or stage isolated before changing thresholds or code.

## Not for this skill when
- A gradual null increase over months, which points at slow source erosion rather than a single break instead.
- The error text names a different tool, stage, or root cause. Match the verbatim error first and use that skill.

## Steps
1. Compute the null rate by day, source, and record type and find the segment whose rate went to near 100 percent. Verify: the fully-null segment is identified
2. Compare that segment's raw records before and after the spike for a field rename, a format change, or a missing file section. Verify: the segment's raw change is found
3. Inspect the transform for that segment, especially joins and case mappings that default to null on a miss. Verify: the transform step emitting nulls is pinpointed
4. Fix the mapping or join, reload the segment's affected batches, and keep a quarantine for records that genuinely lack the field. Verify: the segment reloads with populated values
5. Recalculate the overall null rate and confirm it returns to its historical band. Verify: the rate is back inside the historical range

## Variant phrasings
### null rate spiked to 40 percent data quality
The verbatim spike phrasing.
### unexpected nulls segment source stopped populating field
The segmentation phrasing for one input going fully null.
### null percentage jump after source change warehouse
The source-change phrasing for sudden jumps.

Compatibility: Soda, Great Expectations, and dbt null checks on production warehouse tables

## Why it happens
Aggregate null rates hide segmentation: when one input that supplies about 40 percent of rows stops populating a field, the overall rate jumps by exactly that share. The flat overall number looks like general decay until the segment breakdown shows one input at 100 percent null.

## Edge cases / pitfalls
- Dashboard the null rate per segment, not only overall. Segment alarms fire days earlier.
- A segment at exactly 100 percent null after a deploy is usually a rename. Check raw field names first.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_8ycJXdYOC0CXimPfJN1XXQ
