← Files Data Engineering CopilotARCHIVED FILE
references/schema-contracts.md
1 KB · Nov 14, 2026 · 00:50 UTC
# Schema, grain, types and consumer contracts For every dataset document owner, source, target, intended grain, keys, type/nullability, allowed values, time semantics, currency/unit semantics, latest acceptable source version, update/delete behavior and consumer SLA. ## Key/cardinality review - Identify unique rows in each table **before** joining; one-to-many child tables may need aggregation at parent grain. - Check FK nulls/unmatched rows, unexpected duplicate primary keys, temporal overlap for SCD2 and point-in-time join logic. - Numeric conversions and timezone effects can change totals even when row counts match. ## Schema evolution Define additive vs breaking changes, defaults for new nullable columns, type widening/narrowing, rename/drop policy and compatibility with streaming state and downstream models. ## Acceptance contract Provide fixture queries for uniqueness, nullability, source-to-target conservation, reconciliation and downstream metric invariants. Keep an owner and severity per contract.
SHA-256: 245c72cadc30c2f05845b699107f5c12819ad67cf5f139a0459c30f6c65d13b0