Tech_Interview_Prep

Semantic Data Modeling for BI

The metrics layer that defines business terms consistently, so 'revenue' means the same thing in every report.

What it is

A semantic layer defines business metrics and dimensions (revenue, active user, churn) once, consistently, so every report and dashboard built on top of it uses the same definition — instead of each analyst independently writing slightly different SQL for "revenue."

Key points

  • The problem it solves: without a shared semantic layer, it's common for two dashboards to show different numbers for what's nominally the same metric, because each was built with a subtly different definition — this quietly destroys trust in the data.
  • Metrics vs. dimensions: metrics are the numbers being measured (revenue, count of users); dimensions are the ways to slice them (by region, by product) — a semantic layer defines both consistently.
  • Governance and reuse: a metric defined once in the semantic layer is reused everywhere it's needed, rather than being redefined (and potentially made subtly inconsistent) by every report author.
  • BI tools increasingly build this semantic modeling in as a first-class layer, separate from the raw underlying tables, specifically to prevent this class of inconsistency.