Semantic Layer

The semantic layer is powered by drizzle-cube. It sits between your queries and the database, translating cube queries to SQL with security context enforcement.
How It Works
Section titled “How It Works”- Define schemas — Write Drizzle ORM table definitions or introspect them from your database with drizzle-kit.
- Create cubes — Define dimensions, measures, and joins that describe your business logic.
- Query anywhere — Dashboards, AI notebooks, the Cube API, and MCP clients all query through the semantic layer.
Benefits
Section titled “Benefits”- Consistent metrics — Define a measure once, get the same result everywhere.
- Security context — Row-level security enforced at the query layer.
- AI-friendly — Semantic metadata helps AI agents generate accurate queries.