Glossary/Semantic Layer & Metrics

Semantic Layer

A semantic layer is a centralized abstraction that translates technical data structure into business-friendly definitions, enabling consistent metric and dimension access across analytics tools.

A semantic layer sits between raw data and end-user tools, mapping database tables, columns, and joins to business concepts. Instead of requiring analysts to write complex SQL joining multiple tables, a semantic layer pre-defines relationships and calculations so users interact with intuitive business terms.

The semantic layer solves fragmentation: when metrics are defined in spreadsheets, BI tool logic, and SQL files independently, different teams get different answers. A centralized semantic layer enforces a single source of truth. It accelerates analytics by eliminating repetitive table joins and calculations. It also reduces errors by codifying business rules once rather than embedding them in hundreds of queries.

In modern data stacks, the semantic layer often includes a metrics store, dimension tables, business logic, and governance controls. Tools access metrics through APIs or query directly against defined models rather than raw tables. This abstraction makes analytics more agile: changes to underlying table schemas don't break downstream reports if the semantic layer contracts remain stable.

Key Characteristics

  • Abstracts physical database structure from business logic
  • Defines reusable metrics, dimensions, and their relationships
  • Enforces consistent definitions across all query tools
  • Enables version control and governance of metric definitions
  • Supports multiple query interfaces: SQL, API, BI tool connectors
  • Decouples analytics consumption from data warehouse architecture

Why It Matters

  • Consistency: Single definition of revenue, churn rate, customer segments used everywhere
  • Speed: Analysts query business terms instead of writing complex JOINs
  • Governance: Control metric changes centrally; track usage and lineage
  • Flexibility: Swap physical tables without breaking downstream analytics
  • Self-service: Non-technical users access governed metrics without SQL knowledge

Example

Without semantic layer: Analysts write distinct SQL to calculate monthly recurring revenue (MRR), each query touching 5+ tables and implementing different subscription logic.

With semantic layer: Users select "MRR" metric and filter by date; the semantic layer handles subscription logic, currency conversion, and aggregation automatically across all tools.

Coginiti Perspective

Coginiti provides a semantic layer built on two components: SMDL for defining the model and Semantic SQL for querying it. SMDL files declare entities, dimensions (typed as text, number, date, datetime, or bool), measures (with 12 aggregation types), and relationships between entities. Semantic SQL queries run through Apache DataFusion and translate automatically to platform-specific SQL for Snowflake, BigQuery, Redshift, PostgreSQL, and Yellowbrick. An ODBC driver exposes the semantic layer to Power BI and Excel, so the same definitions serve both SQL-writing analysts and BI tool users.

See Semantic Intelligence in Action

Coginiti operationalizes business meaning across your entire data estate.