Logo
Deploy Now

Stars

20493

Forks

2087

Watchers

154

Developer links

CubeJS

Between your databases and everything that consumes data - BI tools, embedded analytics, AI agents - sits Cube (formerly Cube.js), an open-source semantic layer. Metrics, dimensions, joins, and access rules are defined once as code in YAML, JavaScript, or Python, forming a governed data model that every downstream consumer shares, so "revenue" means the same thing in every dashboard. Caching is two-level: an in-memory cache absorbs bursts of identical queries, and declared pre-aggregations - rollup tables built in the warehouse or in Cube Store, Cube's distributed columnar engine, and refreshed in the background - deliver sub-second latency while cutting warehouse compute costs. The query planner routes each request to cache, rollup, or source automatically. Consumers connect through a Postgres-compatible SQL API (any tool that speaks Postgres works), plus REST, GraphQL, and a Meta API for model introspection. Row-level security and multi-tenancy are enforced in the layer itself, upstream of every client. Sources include Snowflake, BigQuery, Databricks, Postgres, MySQL, Presto, and Athena. Headless by design - bring your own UI.

CubeJS

Benefits

  • One Definition of Every Metric
  • Metrics defined once in the model serve every BI tool, embedded dashboard, and AI agent identically - ending the drift where each tool computes revenue differently.
  • Sub-Second Dashboards, Smaller Warehouse Bills
  • Pre-aggregations answer repeated queries from rollup tables instead of rescanning the warehouse, cutting both latency and per-query compute spend.
  • Access Control Above the Data
  • Row-level security and multi-tenant isolation are enforced in the semantic layer, so policies hold across every consumer rather than being re-implemented per tool.
  • Analytics Your Product Can Embed
  • Headless architecture with REST, GraphQL, and SQL APIs makes customer-facing analytics a frontend problem, not a data-infrastructure project per feature.

Features

  • Data Modeling as Code
  • Cubes and views defined in YAML, JavaScript, or Python with measures, dimensions, and joins - versioned in git.
  • Two-Level Caching
  • In-memory cache for hot queries plus background-refreshed pre-aggregations in Cube Store or the warehouse.
  • Postgres-Compatible SQL API
  • Tableau, Power BI, Metabase, or anything that connects to Postgres queries the semantic layer directly.
  • REST, GraphQL, and Meta APIs
  • Programmatic access for custom apps, plus model introspection so tools and AI agents discover what is queryable.
  • Row-Level Security and Multi-Tenancy
  • Query-time policies and per-tenant contexts applied deterministically to every request.
  • Broad Source Support
  • Snowflake, BigQuery, Databricks, Redshift, Postgres, MySQL, Presto, Athena, and more.