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

DomainShape
web_analyticsGA4-derived facts — traffic, engagement, stock-attributed page views. The largest domain at this layer, mirroring GA4's outsized share of staging.
crmDealer, subscription, lead, and billing dimensions/facts — see CRM domain for the full dim/fact breakdown
paid_mediaCampaign 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_dim is an SCD2 current-state filter — literally select * 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_dim is a traditional Kimball-style split — the same intermediate model (crm__dealers_int) feeds both crm__dealer_dim (descriptive attributes: name, status, region, billing address) and crm__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.

See also

Esc