# Cube Core

> Open-source semantic layer engine behind Cube, with metrics, joins, and access rules defined as code, served through APIs to applications, BI tools, and AI agents, under an Apache 2.0 backend and MIT clients.

Source: https://toolsfordata.com/tools/cube-core/ · Updated 2026-12-02

[Website](https://cube.dev) · [Docs](https://docs.cube.dev/) · [GitHub](https://github.com/cube-js/cube) (21.3k stars)

Best for: engineering teams that want to self-host a metrics API and don't need the workbooks, analytics chat, or single sign-on of paid Cube.

## Overview

- Core Strength: Open-source metrics engine with pre-aggregations and APIs
- Best For: Engineering teams that self-host a metrics API
- Deployment Model: Self-hosted with Docker
- Pricing: Free (Apache 2.0 backend, MIT clients)
- Notable Caveat: No AI agent, MCP server, DAX API or monitoring; those are in paid Cube
- Modeling: Full — derived metrics, multi-fact, hierarchies, as code
- Portability: Partial — import
- Query Interfaces: Partial — SQL, REST/GraphQL
- BI & Spreadsheets: Partial — BI tools, embedded
- AI Agents: Not confirmed
- Performance: Full — pre-aggregations, result cache
- Governance: Partial — row security
- Security & Access: Not confirmed

## What it's used for

Cube Core is used to serve metrics from your own infrastructure: applications and BI tools query its SQL, REST or GraphQL APIs instead of writing SQL against the warehouse.

## Semantic models

The same data model as paid Cube: YAML, JavaScript or Python files with measures, dimensions, joins, hierarchies and multi-fact views, on the Tesseract engine (default since v1.7.0).

## Portability

lkml2cube converts LookML, and the cube_dbt package loads dbt models. Ossie and platform exports are documented for paid Cube only.

## Workflows

BI tools connect through the Postgres-compatible SQL API, and JavaScript, React, Vue and Angular SDKs build charts into your app. The DAX API, spreadsheet add-ins, and dashboard or chat embedding are in paid Cube.

## AI

Cube Core has no AI agent, chat or MCP server: those run in paid Cube. Model descriptions are still there for agents you build yourself.

## Query optimizations

Pre-aggregations and the result cache work as in paid Cube: rollups refresh on a schedule and queries go to the smallest one that fits.

## DataOps

The Orchestration API triggers pre-aggregation refreshes from Airflow, Dagster or Prefect. The Content Validator and monitoring dashboards belong to Cube Cloud.

## Governance

Access policies filter rows and hide members, using the security context from the API's JWT authentication.

## Security

Cube Core checks JWTs on its APIs. Single sign-on, roles for model editors, SCIM and the audit log belong to Cube Cloud; who edits the model is set in your Git provider.

## Deployment

You run Cube Core yourself with Docker, one deployment per environment.

## Pricing

Cube Core is free: the backend is Apache 2.0 and the client libraries are MIT. The managed product, Cube, has a free plan and paid plans from $40 per developer per month plus compute.

## Review

Strengths:
- Free and open source, with 21.3k GitHub stars.
- Pre-aggregations, SQL, REST and GraphQL APIs without a license fee.
- The same model files move to paid Cube if you need more.

Caveats:
- No AI agent, MCP server, DAX API or spreadsheet add-ins.
- Monitoring, validation and single sign-on are yours to build.

Recommendation: Use Cube Core to self-host a metrics API for your applications and BI tools. Choose paid Cube for the agent and Power BI, or MetricFlow if your metrics should live in a dbt project.

## Pricing

- Model: per developer, usage-based
- Free: Free plan
- Free self-hosted edition: Cube Core (Apache 2.0 backend, MIT clients)
- Entry team price: $40/developer/month (Starter), plus compute
- Entry enterprise price: Custom
- Source: https://cube.dev/pricing (checked 2026-12-02)

## Features

### Semantic Models

- Metrics & Dimensions: Yes — Cube's core primitive is the "cube," which defines reusable named measures and dimensions once in YAML/JS/Python, distinct from per-report SQL. ([source](https://docs.cube.dev/docs/data-modeling/concepts/syntax))
- Joins & Relationships: Yes — Joins are declared between cubes with an explicit relationship parameter (one_to_one, one_to_many, many_to_one) so consumers never write join SQL themselves. ([source](https://docs.cube.dev/reference/data-modeling/joins))
- Calculated & Derived Metrics: Yes — The number measure type supports arithmetic over other measures (ratios, ratios-to-percent) and multi_stage measures support time-shifted/running calculations like growth rates. ([source](https://docs.cube.dev/reference/data-modeling/measures))
- Hierarchies: Yes — Cubes support a hierarchies parameter that groups dimensions into ordered drill levels (e.g. state to city), configured once and reusable across views. ([source](https://docs.cube.dev/reference/data-modeling/hierarchies))
- Multi-Fact Models: Yes — Multi-fact views run on Tesseract, the engine enabled by default since v1.7.0. ([source](https://docs.cube.dev/docs/data-modeling/multi-fact-views))
- Definitions as Code: Yes — The data model is YAML, JavaScript or Python files in your own repository. ([source](https://docs.cube.dev/docs/data-modeling/concepts/syntax))

### Portability

- Model Import: Yes — lkml2cube converts LookML, and the cube_dbt package reads dbt models. ([source](https://docs.cube.dev/reference/data-modeling/lkml2cube))
- Model Export: Unknown — The Ossie and platform exports are documented for Cube; the docs don't say whether Cube Core can export without it. ([source](https://docs.cube.dev/docs/integrations/apache-ossie))
- Apache Ossie Support: Unknown — Conversion runs in Cube through the Platform API; the docs don't say what Cube Core alone supports. ([source](https://docs.cube.dev/docs/integrations/apache-ossie))

### Workflows

- SQL API: Yes — A Postgres-compatible SQL API lets any SQL client query cubes and views by name as if they were tables. ([source](https://docs.cube.dev/reference/core-data-apis/sql-api/index))
- REST / GraphQL API: Yes — Cube documents both a REST (JSON) API and a GraphQL API for querying metrics and dimensions programmatically. ([source](https://docs.cube.dev/reference/core-data-apis/rest-api/index))
- MDX / DAX API: No — The DAX API is provided by the Cube cloud platform. ([source](https://docs.cube.dev/docs/integrations/power-bi))
- BI Tool Integrations: Yes — BI tools connect through the Postgres-compatible SQL API. ([source](https://docs.cube.dev/reference/core-data-apis/sql-api/index))
- Spreadsheet Integration: No — The Excel and Google Sheets add-ins belong to the paid Cube product. ([source](https://docs.cube.dev/docs/integrations/microsoft-excel))
- Embedded Analytics: Yes — JavaScript, React, Vue and Angular SDKs build charts and query components into an application; dashboards and chat embedding are in paid Cube. ([source](https://docs.cube.dev/reference/javascript-sdk/index))
- Multi-Warehouse Support: Yes — Cube documents 25+ supported data sources including Snowflake, BigQuery, Databricks, Redshift, Postgres, DuckDB, ClickHouse, and Trino. ([source](https://docs.cube.dev/admin/connect-to-data/data-sources/index))
- dbt Integration: Yes — The cube_dbt package loads dbt models into the data model. Automatic dbt pull is a paid feature. ([source](https://docs.cube.dev/reference/data-modeling/cube_dbt))
- Data Catalog Integration: No — A metadata API exists, but the full documentation index has no connector to a data catalog. ([source](https://docs.cube.dev/llms.txt))

### AI & Agents

- MCP Server: No — The MCP server is hosted by Cube, on all plans of the paid platform. ([source](https://docs.cube.dev/docs/integrations/mcp-server))
- Natural Language Query: No — Analytics Chat is part of the paid Cube platform. ([source](https://docs.cube.dev/docs/explore-analyze/analytics-chat))
- AI-Assisted Modeling: Unknown — Cube ships agent skills to model in coding agents; the docs don't say whether they work with Cube Core alone. ([source](https://docs.cube.dev/docs/integrations/agent-skills))
- AI Metadata & Synonyms: No — The model can hold descriptions, but the AI agent that reads them is part of paid Cube. ([source](https://docs.cube.dev/docs/data-modeling/ai-context))
- Verified Queries: No — Certified queries configure the agent that ships with paid Cube deployments. ([source](https://docs.cube.dev/admin/ai/certified-queries))
- AI Memory: No — Memory belongs to the agent in paid Cube. ([source](https://docs.cube.dev/admin/ai/memory-isolation))
- Agent Evaluation: No — Evals run in the paid Cube model IDE. ([source](https://docs.cube.dev/admin/ai/evals))

### Query Optimizations

- Pre-Aggregations: Yes — Pre-aggregations materialize and automatically refresh rollups of measures at defined grains, and Cube routes incoming queries to the smallest matching rollup for sub-second performance. ([source](https://docs.cube.dev/docs/pre-aggregations/index))
- Query Caching: Yes — An in-memory cache of executed query results is active by default as a distinct first-level cache, separate from the scheduled, proactively-maintained pre-aggregation layer. ([source](https://docs.cube.dev/docs/pre-aggregations/index))

### DataOps

- Model Testing & Validation: No — The Content Validator is a Cube Cloud feature. ([source](https://docs.cube.dev/docs/data-modeling/content-validator))
- Orchestration Integration: Yes — The Orchestration API is part of the REST API and works with Airflow, Dagster and Prefect. ([source](https://docs.cube.dev/reference/orchestration-api/index))
- Observability & Monitoring: No — Monitoring dashboards and exports are documented for Cube Cloud deployments. ([source](https://docs.cube.dev/admin/monitoring/monitoring-integrations/index))

### Data Governance

- Row & Column-Level Security: Yes — Access policies apply in Cube Core too, with the security context coming from its API authentication. ([source](https://docs.cube.dev/docs/data-modeling/access-control/index))
- Data Lineage: No — No lineage feature appears in the full documentation index. ([source](https://docs.cube.dev/llms.txt))

### Security

- SSO: No — SAML single sign-on is for Cube Cloud accounts, on the Enterprise plan; Cube Core validates JWTs on its APIs. ([source](https://docs.cube.dev/embedding/authentication/jwt))
- RBAC: No — Roles for who can edit the model are a Cube Cloud feature; editing rights come from your Git provider. ([source](https://docs.cube.dev/docs/data-modeling/access-control/index))
- Audit Log: No — The audit log is turned on in Cube Cloud. ([source](https://docs.cube.dev/admin/monitoring/audit-log))
- Compliance Certifications: Unknown — You run it, so certifications depend on your own environment. ([source](https://docs.cube.dev/cube-core/index))
- SCIM Provisioning: No — SCIM provisions Cube Cloud users. ([source](https://docs.cube.dev/admin/sso/okta/scim))
- Private Networking: Unknown — You run it inside your own network, so this depends on your setup. ([source](https://docs.cube.dev/cube-core/deployment))

### Deployment

- Multi-Environment Support: Unknown — Managed environments are a Cube Cloud feature; with Cube Core you deploy one instance per environment yourself. ([source](https://docs.cube.dev/cube-core/deployment))
- SaaS Deployment: No — Cube Core is self-hosted; the managed service is Cube. ([source](https://docs.cube.dev/cube-core/index))
- Self-Hosted Deployment: Yes — Deployed and managed by you with Docker. ([source](https://docs.cube.dev/cube-core/deployment))
- Cloud-Native App: No — Runs as Docker containers. ([source](https://docs.cube.dev/cube-core/deployment))
- Open Source: Yes — The backend is Apache 2.0 and the client is MIT. ([source](https://github.com/cube-js/cube))

## Integrations

31 integrations, each sourced from the vendor docs.

- Authentication: Auth0, Amazon Cognito
- Data Orchestration: Apache Airflow, Dagster, Prefect
- Data Platform: Databricks
- Data Transformation: dbt
- Data Warehouse: Amazon Redshift, ClickHouse, DuckDB, Google BigQuery, Snowflake, SingleStore, OpenText Analytics Database (Vertica), Firebolt
- Databases: Apache Druid, Apache Pinot, Microsoft SQL Server, MongoDB, MySQL, Oracle DB, PostgreSQL, QuestDB, SQLite
- Query Engine: Amazon Athena, Presto, Trino
- Semantic Layer: LookML
- Streaming: ksqlDB, Materialize, RisingWave

## Alternatives

- [Cube](https://toolsfordata.com/tools/cube/): Consider paid Cube for the same engine plus analytics chat, a hosted MCP server, the DAX API, spreadsheet add-ins and single sign-on.
- [MetricFlow](https://toolsfordata.com/tools/metricflow/): Consider MetricFlow if your models are in dbt and you want metric definitions tested in the project, queried from the command line.
- [Wren AI OSS](https://toolsfordata.com/tools/wren-ai-oss/): Consider Wren AI OSS if the consumers are coding agents rather than applications, with an Ossie-compatible model they can read.
- [Saiku](https://toolsfordata.com/tools/saiku/): Consider Saiku for open-source OLAP cubes with MDX and Excel access, built on Mondrian and Apache Calcite.
- [AtScale](https://toolsfordata.com/tools/atscale/): Consider AtScale for a commercial layer you still run in your own cloud, with Excel and Power BI over XMLA and DAX.
