## TL;DR
A missing required column is a contract break, not a data error: confirm whether customer_id was renamed, dropped, or never delivered in the latest load, then restore it at the source or update every consumer and the contract together if the rename is intentional. Patching one downstream model leaves the rest broken.

```text
schema validation failed error: missing required column customer_id
```

## Use this when
- The check or run fails with this symptom: schema validation reports the required column customer_id as missing.
- You are working on a schema validation failing because customer_id is absent 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 column that exists but is entirely null, which is a population problem rather than a missing column instead.
- The error text names a different tool, stage, or root cause. Match the verbatim error first and use that skill.

## Steps
1. List the table's actual columns from the information schema and compare them with the contract's required list. Verify: the actual and required column lists are compared
2. Check recent upstream changes for a rename, such as customer_id becoming customer_key or client_id, by sampling any similarly named column's values. Verify: a rename candidate is confirmed or ruled out by its values
3. If the column was dropped by a failed or partial load, reload the table from the source and confirm the column returns. Verify: the reload restores the column or proves the source itself lacks it
4. If the rename is intentional, update the contract, the models, and the validation configuration in the same change and note the mapping for consumers. Verify: all references use the new name consistently
5. Rerun the schema validation and a downstream smoke query that selects customer_id or its replacement. Verify: validation passes and the smoke query returns rows

## Variant phrasings
### schema validation failed missing required column customer_id
The verbatim missing-column phrasing.
### required column missing after upstream rename
The rename phrasing, focused on matching values under a new name.
### data contract missing column validation error
The contract phrasing for producer-consumer schema checks.

Compatibility: Soda, Great Expectations, dbt source checks, and contract validators on warehouse tables

## Why it happens
Required-column checks encode the producer-consumer contract. Renames during source migrations, partial loads that recreate tables from a subset of fields, and case changes in column names all remove the column from the consumer's view while the data itself may be intact under another name.

## Edge cases / pitfalls
- Case sensitivity differs across warehouses. A column present as CUSTOMER_ID can read as missing to a case-sensitive check.
- Validate required columns at load time, not only in downstream checks, so the break is caught at the boundary.

## Provenance

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