The layering that works

Names vary by stack; the responsibilities do not. Four layers, each with one job:

LayerJobRule that keeps it honest
Raw / landingEvents exactly as received from the schemaImmutable. Nothing is fixed here — fixes are new events upstream
Conformed coreDeduplicated, identity-resolved, currency-normalised facts at source grainOne player key, minor-unit integers, both clocks preserved
Metric layerThe dictionary implemented as code — one place per metricDashboards may not define metrics; they may only display them
MartsConsumer-shaped views: finance periods, CRM player states, regulatory snapshotsShapes diverge, definitions do not

The third layer is the one most operations skip, and it is where the recurring disputes come from: when every dashboard computes its own GGR from the core, the organisation has as many definitions as dashboards. Moving the computation into one governed layer is the structural fix — the dictionary made executable.

Grain: decide once, at the bottom

Keep facts at the finest grain the source produces — bet-selection, transaction, event. Every aggregate is derived and disposable; the fine grain is neither. Three iGaming-specific grain traps:

  • Ticket-level gameplay facts. Multi-leg bets misattribute margin across markets and products the moment anyone slices below the ticket. Selection level or regret.
  • Daily player aggregates as the base. They bake in one timezone and one cut-off forever. Aggregate views can be rebuilt per market timezone only if the base is event-grain.
  • Snapshot-only state. Balances, verification states and bonus states need transition history, not just current values — the difference between answering "what is" and "what was", and the second question is the audit question.

Time: the two-clock discipline, downstream

The schema carries event time and processing time; the warehouse decides what each consumer sees. The workable convention: operational and CRM marts read event time (players live in event time), finance and regulatory marts read settlement/accounting time with an explicit reopening window, and every externally reported figure gets a frozen snapshot. The revenue bridge then reconciles between clocks by design rather than by monthly negotiation.

Restatement: the rule nobody writes until it hurts

Late events are structural in this industry — settlements, chargebacks, voided markets, regulatory corrections. The design answer is a written restatement policy: which facts may change a closed period and for how long, which published aggregates re-state versus freeze, and how a restatement is itself recorded as an event. This is the same lineage discipline as regulatory reporting — the warehouse is where it either exists or does not.

The consumers, explicitly

ConsumerNeedsDesign consequence
FinanceStable periods, reconciled to the cashier and the ledgerAccounting-time mart, frozen snapshots, restatement log
CRM / operationsFresh player state, actionable within minutesEvent-time mart with latency SLO; freshness monitored like uptime
Risk / RGComplete protection and activity join, fastProtection events in the core with money-grade completeness
Regulator / auditReproducible historical answersAppend-only lineage from filed figure back to raw events

Writing this table for your own operation — with named owners per row — is worth more than any tooling choice. Most warehouse redesigns are really the discovery that one consumer's needs were never stated.

What to monitor

  • Freshness per mart, against its stated SLO — staleness discovered by a user is a trust event, not an incident ticket.
  • Reconciliation deltas — warehouse revenue versus cashier and ledger, daily, with a tolerance and an owner.
  • Restatement volume — a rising trend means an upstream source is degrading, long before anyone complains.
  • Definition drift — any metric computed outside the metric layer, caught by review; the count should be zero and stay zero.

Continue reading: Cohort analysis — the discipline the marts exist to serve. Dashboards by role — the last mile.