Glossary · Analytics
Semantic Layer
An abstraction layer that translates complex database structures into business-friendly terms and metrics.
A semantic layer (also called a metrics layer or business layer) is an abstraction between raw database tables and end users that maps technical database structures to business-friendly concepts. It defines metrics (how to calculate revenue, churn, etc.), dimensions (how to slice data), and relationships in business terms. For example, it might map the column "amt_usd" to the business metric "Revenue" and define the calculation logic. Semantic layers ensure consistency–everyone calculates "Monthly Active Users" the same way. Tools like dbt metrics, Looker's LookML, AtScale, and Cube.js provide semantic layer capabilities. For AI database interfaces, semantic layers dramatically improve text-to-SQL accuracy by providing business context.
In practice
How AI for Database applies it
Fig — every answer ships with the tables, rows and SQL behind it.
Related terms
See it on your own database
Connect read-only in minutes. Free models included.