Skip to content

Semantic Layer

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.

  1. Define schemas — Write Drizzle ORM table definitions or introspect them from your database with drizzle-kit.
  2. Create cubes — Define dimensions, measures, and joins that describe your business logic.
  3. Query anywhere — Dashboards, AI notebooks, the Cube API, and MCP clients all query through the semantic layer.
  • 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.