Track 02 · Semantic Modelling

Semantic Modelling

Capturing the meaning of data — entities, metrics and relationships — in a shared layer decoupled from physical storage. It is how you get one consistent definition of every metric across BI, and a governed grounding layer that stops LLMs from hallucinating joins and aggregations.

Read time ~19 min Level Intermediate → Advanced For Analytics Engineers, Ontologists

What you'll be able to do

Learning outcomes for this track

  • Distinguish the BI semantic layer from ontologies and knowledge graphs
  • Define governed, reusable metrics as code and serve them headless
  • Model an ontology from competency questions and validate it
  • Query knowledge with SPARQL and Cypher
  • Use a semantic layer to ground reliable text-to-SQL and GraphRAG
  • Plan a career path and self-assess against a skill matrix

01 What it is

Two meanings, one goal: shared meaning

Definition

Semantic modelling captures the meaning of data — its entities, metrics and relationships — in a shared, business-friendly layer that is decoupled from physical storage.

The term carries two complementary senses. In the BI world, the semantic layer is a governed abstraction that maps business terms — "Revenue", "Active Customer" — onto physical tables and columns, so people query concepts rather than hand-writing joins. In the knowledge world, an ontology or knowledge graph is a formal model of entities and their relationships (often in RDF/OWL) that supports inference and linking.

Both exist for the same reason: one consistent definition of everything. That means dashboards that agree with each other, and a grounding layer that keeps LLMs honest. dbt's own benchmarks show natural-language queries answered through a semantic layer reaching roughly 83% accuracy versus ~40% for raw text-to-SQL — the semantic layer is fast becoming core AI infrastructure, not just a BI convenience.

02 Core concepts

The vocabulary of meaning

  • Semantic layera business-meaning map over physical data.
  • Metrics / headless BI layermetric definitions decoupled from any one BI tool and served to all consumers via API.
  • Dimensions vs measuresdimensions group and filter (date, region); measures aggregate (revenue, count).
  • Ontology vs taxonomy vs glossaryformal classes and axioms; a hierarchy; an agreed set of terms — increasing formality.
  • Knowledge graphentities as nodes, relationships as edges, plus attributes — queryable and inferable.
  • RDF, RDFS, OWLtriples, schema, and rich logic/inference for the semantic web.
  • SPARQL & SHACLthe query language for RDF, and a language to validate graph shapes.
  • Business-glossary linkageevery metric traced back to an authoritative term definition.
  • Embeddings vs symbolicstatistical vectors vs graph/logic; GraphRAG combines both.

03 Key personas

Who builds semantics

OE

Ontologist / Knowledge Engineer

Designs ontologies, taxonomies and inference rules.

RDF/OWLGraphs
AE

Analytics Engineer

Builds metric and semantic models as code (dbt, MetricFlow).

dbtSQL
SM

Semantic / BI Modeller

Designs dimensions, measures and hierarchies.

LookMLModelling
DA

Data Architect

Owns the overall semantic/graph architecture and governance.

Architecture
TX

Taxonomist

Builds controlled vocabularies and classification schemes.

SKOSVocab
BD

BI Developer

Builds dashboards and explores on top of the semantic layer.

Dashboards
ML

ML / AI Engineer

Wires the semantic layer and graph into RAG and agent grounding.

RAGGrounding
BA

Business Analyst

Authors canonical metric definitions and glossary terms.

MetricsGlossary

04 Methodology

Model meaning, don't guess it

Whether you're building an ontology or a metrics layer, start from competency questions: what must this model be able to answer? Formal methods like METHONTOLOGY and NeOn (reuse-driven networks of ontologies) codify the ontology route; the BI route maps a dimensional model to governed metrics.

01

Scope & questions

Write the competency questions the model must answer — they become your acceptance tests.

02

Model entities

Define classes, properties and relationships (graph) or facts, dimensions and grain (BI).

03

Define metrics

Declare each measure once — formula, grain and allowed dimensions — as versioned code.

04

Add constraints

Axioms and SHACL shapes for graphs; naming and governance rules for metrics.

05

Validate & test

Unit-test metric outputs against known values; validate graphs with SHACL.

06

Govern & iterate

Assign ownership, trace lineage to the glossary, and evolve definitions in Git.

05 Best practices

What good looks like

Single source of metric truthDefine once, consume everywhere — no metric redefined per dashboard.
Semantic-as-codeVersion-controlled YAML/LookML in Git, peer-reviewed like any code.
Reuse patternsReuse ontology design patterns and metric components; avoid duplication.
Align to the glossaryConsistent naming; every metric linked to an authoritative business term.
Go headlessDecouple metrics from BI tools and serve them via API to every consumer.
Test definitions in CIAssert metric outputs and document ownership and lineage.

07 In practice

Where meaning pays off

A semantic layer is quietly becoming core AI infrastructure. Here's how enterprises use it, what the analysts and platforms are doing, and how SCIKIQ delivers it.

Consistent trusted metrics

Define a KPI once so every dashboard and tool returns the same number — no more conflicting reports.

Governed self-service

Business users explore certified metrics and dimensions without writing SQL or waiting on data teams.

Grounding LLMs & BI agents

Text-to-SQL queries resolve against governed definitions, not inferred logic — far fewer hallucinated metrics.

GraphRAG for GenAI

Knowledge graphs supply entity relationships and context so retrieval returns explainable, connected answers.

360 entity views

Graphs link customer, product and supplier data across silos into one connected view.

Reporting consistency

Shared semantics and lineage give traceable, auditable metric definitions across regulatory and financial reporting.

What the leaders are doing

The whole industry is converging on a shared semantic layer — capped by the Open Semantic Interchange (OSI), a vendor-neutral spec launched in September 2025.

DADAMAStandard · DMBOK

DMBOK2's Metadata and Reference & Master Data knowledge areas underpin the shared business vocabulary that a semantic layer formalises.

GGartnerAnalyst

Elevated the semantic layer to essential infrastructure in its 2025 BI & Analytics Hype Cycle; its 2026 trends pivot to a "composite semantic layer" and the "year of context".

FForresterAnalyst

In its Wave: Business Intelligence Platforms (Q2 2025), exposing consistent business semantics across analytics and AI emerged as a key differentiator.

MMcKinseyAdvisory

Positions knowledge graphs as the shared semantic foundation that stops agents acting on conflicting data, and data products as reusable AI-ready assets.

AAccentureAdvisory

Its Technology Vision 2025 promotes knowledge graphs for AI trust; with AWS it offers an "Agentic Semantic Layer" for governed natural-language querying.

DDatabricksPlatform

Ships Unity Catalog Metric Views — a governed semantic layer queryable via SQL, API and MCP — and joined the Open Semantic Interchange.

How SCIKIQ helps

SCIKIQ gives your data one meaning. A built-in knowledge graph and metrics layer turn scattered tables into shared, governed definitions — the same truth for every dashboard, copilot and agent.

  • One metric definition reused across every consumer.
  • Business-glossary linkage tying technical fields to business terms.
  • A knowledge graph for 360 views, context and GraphRAG.
  • Governed semantics that ground copilots and agents, cutting hallucination.
  • Consistent, explainable self-service in natural language.

08 Developer lab

Hands-on: define once, serve everywhere

Engineer track

Do it
  1. Define a metric (measure + dimensions) in MetricFlow or Cube and query it via API.
  2. Model a LookML view and explore.
  3. Build a small ontology in Protégé; export OWL.
  4. Write SPARQL over RDF and Cypher over Neo4j.
  5. Wire the semantic layer to an LLM for grounded text-to-SQL.
# dbt / MetricFlow: define a metric once
metrics:
  - name: weekly_active_customers
    type: simple
    label: "Weekly Active Customers"
    type_params:
      measure: distinct_customers
    filter: "{{ Dimension('order__is_active') }}"

Skills you build

Outcome
  1. Declaring governed metrics and serving them headless.
  2. Reading and writing LookML semantic models.
  3. Authoring an OWL ontology from scratch.
  4. Querying both RDF and property graphs.
  5. Building a grounded NL-to-SQL flow that agrees with the dashboards.

Reference implementation

define once, query everywhere
models/semantic/orders.ymldbt / MetricFlow
semantic_models:
  - name: orders
    model: ref('fct_orders')
    entities:
      - { name: order_id, type: primary }
      - { name: customer, type: foreign, expr: customer_id }
    dimensions:
      - name: ordered_at
        type: time
        type_params: { time_granularity: day }
      - { name: status, type: categorical }
    measures:
      - { name: order_total, agg: sum, expr: amount }
      - { name: distinct_customers, agg: count_distinct, expr: customer_id }

metrics:
  - name: weekly_active_customers
    type: simple
    label: "Weekly Active Customers"       # one definition, org-wide
    type_params: { measure: distinct_customers }
revenue_at_risk.cypherNeo4j / Cypher
// Build a tiny knowledge graph...
CREATE (c:Customer {name: 'Acme'})-[:PLACED]->(o:Order {amount: 5200})
       -[:CONTAINS]->(p:Product {line: 'Packaging'});

// ...then answer a multi-hop question the semantic layer can't
MATCH (c:Customer)-[:PLACED]->(o:Order)-[:CONTAINS]->(p:Product)
WHERE p.line = 'Packaging'
RETURN c.name, sum(o.amount) AS revenue_at_risk
ORDER BY revenue_at_risk DESC;
grounded_query.pyPython
# Ground an LLM answer in a governed metric, not guessy SQL
from dbtsl import SemanticLayerClient

client = SemanticLayerClient(environment_id=env, token=token)

# The LLM maps the question -> metric + grain; the layer writes the SQL
df = client.query(
    metrics=["weekly_active_customers"],
    group_by=["metric_time__week"],
    order_by=["metric_time__week"],
)
print(df.head())   # every tool that asks gets the same number

The metric is defined once in YAML, the graph answers relationship questions SQL struggles with, and the Python client lets an agent ask in business terms — all resolving to the same governed definition.

09 Analyst lab

Hands-on: make every metric mean one thing

Analyst track

Do it
  1. Author canonical metric definitions — formula, grain, filters.
  2. Build a metrics dictionary / glossary.
  3. Map business terms to physical columns.
  4. Design a star-schema-to-semantic mapping.
  5. Validate metric consistency across two dashboards and reconcile.

Deliverables

Outcome
  1. A metrics dictionary the whole org can cite.
  2. A term-to-column mapping document.
  3. A semantic mapping from your star schema.
  4. A reconciliation note resolving a metric discrepancy.
  5. Agreed definitions ready to encode as code.

10 Career path

From analyst to data architect

Semantic skills sit at a premium because they bridge business meaning and technical modelling. Bands are indicative US figures and vary by market.

01
BI Analyst / Analytics EngineerEntry
SQL and dimensional modelling; build first metrics and dashboards.
~$110–150k
02
Semantic / BI ModellerPractitioner
LookML / MetricFlow / Cube, metric governance, headless serving.
~$130–170k
03
Ontologist / Knowledge EngineerSpecialist
RDF/OWL, SHACL, graph modelling and inference; grounding for AI.
~$140–190k
04
Data Architect / Head of ModellingLeadership
Semantic strategy, standards and platform choices across the estate.
$160–220k+

11 Skill matrix

Rate yourself, then level up

Find your current row and aim one column right.

SkillBeginnerIntermediateAdvanced
SQLSELECT, JOIN, GROUP BY.Window functions and CTEs.Query optimisation and debugging generated SQL.
RDF / OWL / SPARQLTriples and basic SPARQL.Class hierarchies and SHACL.OWL reasoning and ontology alignment.
Metrics layerReads a metric definition.Authors LookML / MetricFlow / Cube.Designs a headless, governed metric platform.
Dimensional modellingReads a star schema.Designs facts, dims and hierarchies.Conformed dimensions and semantic mapping.
Graph databasesRuns a Cypher query.Models nodes/edges and traversals.Designs graph schemas and multi-hop performance.
Taxonomy / ontology designUses an existing vocabulary.Builds a SKOS taxonomy.Designs reusable ontology patterns.
Metric governanceFollows naming rules.Owns definitions and lineage.Runs semantic-as-code across teams.
Business acumenUnderstands core KPIs.Translates questions into metrics.Aligns semantics to strategy.

12 Glossary

Terms worth knowing

Semantic layer
A business-meaning abstraction over physical data.
Metric
A governed, reusable business measure.
Headless BI
Metrics served via API, independent of any BI tool.
Ontology
A formal model of entities, relations and axioms.
Taxonomy
A hierarchical classification of concepts.
Knowledge graph
Entities and relationships stored as a graph.
RDF
The W3C triple data model (subject–predicate–object).
OWL
An ontology language with formal inference.
SPARQL
The query language for RDF graphs.
SHACL
A language to validate the shape of RDF data.
Property graph
Nodes and edges with properties (Cypher / GQL).
GraphRAG
Retrieval-augmented generation grounded in a knowledge graph.

13 Test yourself

Check your understanding

Four quick questions — instant feedback, nothing saved, no sign-up.

Q1In the BI sense, a semantic layer primarily…

It is a governed business-meaning abstraction over physical data. Users ask for "Revenue", the layer resolves the joins and aggregations.

Q2What is the main benefit of defining a metric once in a metrics layer?

One source of metric truth eliminates conflicting reports. Define it once, consume it everywhere.

Q3Which is the query language for RDF knowledge graphs?

SPARQL queries RDF; SHACL validates it. Property graphs use Cypher or GQL; LookML and MetricFlow are BI semantic tools.

Q4How does a semantic layer help LLMs?

The semantic layer is the reliability layer for BI agents. Benchmarks show far higher natural-language accuracy when queries resolve against governed metrics.