Systems & decisions
Architecture is a set of trade-offs.
A synthetic reference system, from raw events to trusted metrics. Explore the model boundaries and the decisions that shape them.
7 models · 6 connections
Architecture decision records
ILLUSTRATIVESeparate ingestion from transformation
Context
Events arrive with variable timing and inconsistent types. Coupling ingestion and business logic makes replay and recovery harder.
Decision
Retain raw events as the source layer; normalize in staging and publish stable facts and metrics downstream.
Trade-offs
Additional storage and orchestration in exchange for replayability, clearer ownership, and isolated recovery.
Data model · Session grain
| COLUMN | TYPE | CONTRACT |
|---|---|---|
| session_id | VARCHAR | Unique, not null |
| player_id | VARCHAR | Foreign key → stg_players |
| started_at | TIMESTAMP | UTC, not null |
| duration_minutes | DECIMAL | Non-negative |
| region | VARCHAR | Accepted region code |
Synthetic reference schema. Not a description of Semrush’s internal architecture.