Data Quality Contracts With a Defined Response
Give each data rule a scope, a null policy and an action, then keep rejected records visible in the accounting.
DATA JOURNALSQL, models & data integrity
A data engineering notebook about rows, keys, time and evidence. Small examples make the rules inspectable before they reach a larger pipeline.
Start with the identity of a record. Then write the query that checks it.
| source_key | revision | amount |
|---|---|---|
| A-101 | 1 | 12.00 |
| A-102 | 1 | 7.50 |
| A-101 | 2 | 13.00 |
Start here
Data ModelingDefine what one row represents, distinguish entities from revisions and attach that meaning to keys and measures.
5 min readModels, SQL examples and validation methods
Give each data rule a scope, a null policy and an action, then keep rejected records visible in the accounting.
Define what one row represents, distinguish entities from revisions and attach that meaning to keys and measures.
Inspect join cardinality, aggregate at the intended grain and preserve missing matches when they matter.
Align population, units and reporting boundaries before comparing totals, and keep missing keys distinct from value differences.
Separate delivery identity from business revision and make repeated input converge on a defined accepted state.
Distinguish instants from local dates and define numeric units and rounding boundaries before aggregation.
Questions under study
The identity and meaning of a row before the first aggregate.
Explicit rules for completeness, validity and the action on failure.
Batch identity, durable inputs and a deterministic replay result.
Comparable totals with the same grain, time window and precision.
An editorial record
Defined a standalone editorial scope covering SQL, modeling and data integrity.
Added the distinction between row grain, entity identity and record version.
Outlined small checks for row multiplication and reference coverage.
Documented null, key, reference and failure policies for a pipeline stage.
Documented work, with its current stage
A model-review notebook that records table grain and tests key and join assumptions using small fixtures.
Updated October 3, 2026Read the project noteA data contract design defining quality checks, affected populations and the response to a failed condition.
Updated October 3, 2026Read the project noteA batch ingestion protocol with immutable inputs, conflict rules and an explicit replay exercise.
Updated October 3, 2026Read the project noteA reconciliation method that retains coverage gaps and signed value differences at a declared comparison grain.
Updated October 3, 2026Read the project note