Marts: slicing gold for the business
Marts are the curated tables each audience actually reads. Product wants weekly active reporters. Security wants open critical volume per team. Finance wants bounty paid per quarter. Each mart is a narrow view of gold, aggregated for one purpose, and cached so dashboards stay fast.
Marts as thin slices over gold
Each audience reads one mart. The mart reads gold. Nobody reads silver or bronze.
CREATE OR REPLACE TABLE mart_open_critical_by_team AS
SELECT
dt.team_handle,
COUNT(*) AS open_critical_count,
MIN(f.report_natural_key) AS earliest_open_report,
MAX(dd.date_day) AS last_seen_day
FROM fact_report f
JOIN dim_team dt ON dt.dim_team_sk = f.dim_team_sk
JOIN dim_date dd ON dd.dim_date_sk = f.dim_date_sk
WHERE f.severity = 'critical'
AND f.state IN ('new','triaged')
GROUP BY dt.team_handle;Security wants open critical volume per team. This mart answers it once, caches the shape, and lets the dashboard run a trivial SELECT. No window functions at dashboard time, no re-aggregation.
Keep marts thin and audience-scoped. A mart that tries to serve three audiences turns into gold. If finance and product need different shapes, build two marts. Storage is cheap. Ambiguity is expensive.
Fill in the blanks: Complete the weekly-active-reporters mart
Loading practice…
Quiz: Quiz
Loading practice…