Cube (headless semantic layer)
Cube is an open-source headless semantic (metrics) layer that defines dimensions and measures once in a data model and serves consistent metrics to BI tools, apps, and notebooks through SQL, REST, and GraphQL APIs, with caching. This page describes its data model and privacy posture even-handedly, without ranking it against other tools.
What this means
Cube is a headless semantic layer: metrics and dimensions are defined once in a data model, and Cube serves them to any consumer — BI tools, apps, notebooks — through SQL, REST, and GraphQL APIs.
'Headless' means it has no built-in dashboards; it provides consistent metrics for other front-ends, with caching to speed repeated queries.
Data model and posture
The model declares measures, dimensions, and joins that compile to warehouse SQL, with a caching layer (pre-aggregations) to accelerate queries. Consumers all read the same definitions, so metrics stay consistent across tools.
Because Cube queries the warehouse, access governance lives there, and Cube's security context can scope queries per user or tenant. Posture depends on warehouse grants and how the security context is set.
- Headless metrics layer, no built-in UI
- SQL, REST, and GraphQL APIs
- Pre-aggregations for caching
- Security context scopes per user/tenant
How it appears in analytics and logs
Cube in a stack means metric definitions live in a shared semantic layer that compiles queries to the warehouse, so different front-ends get consistent numbers from one source of truth.
Diagnostic use case
Use Cube to centralize metric definitions in a headless layer so multiple BI tools and applications query the same consistent metrics through standard APIs.
What WebmasterID can help detect
WebmasterID event data modeled in a warehouse can be exposed through a semantic layer like Cube; the layer is downstream of WebmasterID's collection.
Common mistakes
- Redefining metrics in each front-end instead of in Cube.
- Skipping the security context, exposing all rows to every consumer.
- Expecting dashboards from a headless layer.
Privacy and accuracy notes
Cube queries the underlying warehouse, so its access and any row-level security rules govern exposure. This is educational, not legal advice.
Related pages
- Lightdash (BI on dbt metrics)
Lightdash is an open-source business-intelligence tool that turns dbt models and their metric definitions into explorable dashboards, so metrics live in version-controlled code rather than the BI tool. This page describes its data model and privacy posture even-handedly, without ranking it against other BI tools.
- Holistics (modeled SQL BI)
Holistics is a business-intelligence platform built around a reusable data-modeling layer, where datasets, relationships, and metrics are defined (including as code) so business users can explore consistent definitions. This page describes its data model and privacy posture even-handedly, without ranking it against other BI tools.
- dbt and the analytics stack
dbt (data build tool) is a transformation framework that runs SQL SELECT statements as version-controlled models inside your data warehouse, turning raw loaded tables into clean, documented, tested datasets. It handles the 'T' in ELT — it does not move data in or visualize it. It adds software-engineering practices (testing, lineage, docs) to analytics SQL.
- WebmasterID docs
Event data you can expose through a metrics layer.
Sources and verification notes
- Cube — DocumentationOpen-source docs on the semantic layer and APIs.
Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.