Expected Schema Anomaly Reporting
How the Expected Schema check reports a contract breach: what the Shape Anomaly tells you, and why there is nothing to report per row.
Anomaly Messages
Expected Schema emits a Shape Anomaly only, one per failed evaluation. The message names what did not line up:
| What failed | Message |
|---|---|
| A declared field is missing | The required field [o_custkey] is not present, or 3 required fields [a, b, c] are not present when more than one is missing |
| A column outside the declaration exists, with Allow other fields off | Unexpected fields [o_channel] are present |
| A declared field no longer holds its profiled type | The types of fields [o_totalprice(expected:Fractional,loaded:String)] do not match the latest profile |
Only one of the three is reported per evaluation: the check stops at the first category that fails.
There is no per-row variant, because the violation belongs to the container. There is also no filter suffix, since the rule accepts no filter.
What the Numbers Mean
- Declared fields: the field names configured on the check, each checked against the type on its profile.
- Observed structure: the fields and types the scan found on the container.
Reading the two side by side tells you whether a field went missing, changed type, or appeared unannounced.
Source Records Behavior
Expected Schema does not evaluate rows, so the anomaly carries no source records. The evidence is the container's own field list and declared types, available on the container's page.
Custom Anomaly Description
Custom Anomaly Description does not apply to this rule. The option replaces the message on Record Anomalies, and Expected Schema emits a Shape Anomaly only.
See Also
-
Examples
Three production scenarios: a stable contract, a type change, and an unexpected column.
-
Best Practices
Guidelines for declaring the contract, choosing the extra-fields policy, and pairing with Field Count.
-
Permissions
The team permission each action needs: view, create, edit, archive, restore, and delete.
-
How It Works
The complete reference: definition, container scope, the declared field list, the extra-fields toggle, and why filters and coverage do not apply.