Semantic Layer
AI Engineer path · lesson 68 of 124Define a business metric once; a dashboard, a SQL API, and an LLM analyst all read the same governed definition. Change it once and every consumer updates — the source of truth for AI analytics.
Net Revenue = SUM(orders.amount) - SUM(refunds.amount)
SUM(tax)=$80
Key insight
Toggle the definition once and the dashboard, SQL API, and LLM analyst all change together — one governed definition, zero drift. Raw tables flow up through the layer; consumers never touch them directly.
Where the semantic layer sits
Fill in the missing stages between the warehouse and the answer.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
"What was revenue?"
Warehouse tables
Test your knowledge
What does a semantic layer centralize?
The short version
The semantic layer is the official recipe card for "Net Revenue". The dashboard chef, the SQL chef, and the AI chef all cook from the same card — change the card and every kitchen serves the new dish.
Interview Questions
References & Further Reading
Love this visualization?
Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.
100% free • No credit card required