Gold is the analytical and serving layer between normalized Silver data and the public snapshot contract. Each relation has a consumer, a grain, a source window and a retention rule.
| Reference | Value |
|---|---|
| Subject and boundary | The main Gold relation families and the rule for recombining each one. Table layout is on ‣; formulas on ‣. |
| Verified source | 0093 schema, rollups.py, reader kernels at main f32cd9b10a6cfa7ea87c07c979355c226e9ddbac, checked November 7, 2026. |
| Support state | Implemented source. |
| Family | Grain or purpose | Recombination rule |
|---|---|---|
fact_trip_delay_snapshot |
Provider, realtime snapshot and source entity index; trip-level delay | Keep source identity, capture clock and static matching context. Repeated reports of one trip are not distinct punctual trips |
fact_vehicle_snapshot |
Provider, realtime snapshot and source entity index; reported vehicle | Measurement time can differ from feed and capture time |
trip_delay_summary_5m → route_delay_hourly |
Five-minute interval, then route and hour | Pool exact eligible sums and counts; rounded averages are not enough |
route_delay_spine |
Provider, route, local capture date, local hour and direction | Keep counts, delay sum and histogram bins for declared windows |
| Stop delay spine and percentiles | Eligible stop-delay observations at their grain | The stop non-severe proxy and route on-time percentage are different populations |
| Headway, cancellation and service marts | Observed starts, reported trip-days and scheduled service | Keep each denominator and service-date policy explicit |
warm_rollup_periods |
Provider, rollup kind and period | Completion and invalidation drive repair; a watermark is not a metric value |
realtime_serving_state |
Current source capture per live lane | Replays never silently promote an older capture |
Reader kernels in gold/reader/ own rate, null and rounding semantics. Historic builders such as snapshots/builders/historic/_spine.py project the public contract from these relations. Add a relation only for a clear consumer or a measured performance need, with reproducible inputs.
Detail facts keep 14 days by default and warm rollups 730 days. A retained aggregate does not guarantee access to the raw inputs needed for a correction, so validate the selected cohort and its dependent states before rebuilding history.