Marts
Organised by domain rather than platform. This is the "current state" layer — where SCD2 history collapses to a single row per entity, and where a domain's raw fields turn into named dimensions and facts.
By domain
| Domain | Shape |
|---|---|
web_analytics | GA4-derived facts — traffic, engagement, stock-attributed page views. The largest domain at this layer, mirroring GA4's outsized share of staging. |
crm | Dealer, subscription, lead, and billing dimensions/facts — see CRM domain for the full dim/fact breakdown |
paid_media | Campaign dimension (current-state, from the SCD2 chain) and daily/hourly spend facts |
Two different ideas of what a "dimension" is
paid_media__campaigns_dim and crm__dealer_dim are both called dimensions, but they're built differently, and it's worth knowing which pattern a given mart follows before assuming its shape:
paid_media__campaigns_dimis an SCD2 current-state filter — literallyselect * from {{ ref('paid_media__campaign_scd_int') }} where is_latest = true. The "dimension" here is a snapshot of the SCD2 history table at a point in time, not a separately-modelled entity.crm__dealer_dimis a traditional Kimball-style split — the same intermediate model (crm__dealers_int) feeds bothcrm__dealer_dim(descriptive attributes: name, status, region, billing address) andcrm__dealer_fact(measures only: annual revenue, employee count, expected listing). There's no SCD2 involved; this is a straight columnar split by kind.
paid_media__campaign_daily_fact adds derived ratios (ctr, avg_cpc, cpa) via a shared safe_divide() macro on top of its intermediate counterpart — the kind of small cross-cutting utility worth knowing exists if you're adding a similar ratio elsewhere.