Open Source Analytics Framework
A complete open source analytics solution: visualization agnostic frontend SDKs and API backed by analytical server infrastructure.
Sign up for Cube.js Releases and Updates
Awesome product updates; no spam
Built for Developers
We obsess over developer experience. Cube.js gives development teams the building blocks to create a complex, custom-tailored analytics experience.
Bar Chart
Time Series
Table
Date Picker
Bar Chart
Client
import React from 'react';
import cubejs from '@cubejs-client/core';
import { QueryRenderer } from '@cubejs-client/react';
import { Spin } from 'antd';
import { Chart, Axis, Tooltip, Geom } from 'bizcharts';

const HACKER_NEWS_API_KEY = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpIjozODU5NH0.5wEbQo-VG2DEjR2nBpRpoJeIcE_oJqnrm78yUo9lasw';

const Example = <QueryRenderer
  cubejsApi={cubejs(HACKER_NEWS_API_KEY)}
  query={{
    measures: ['Stories.count'], dimensions: ['Stories.category']
  }}
  render={({ resultSet }) => {
    if (!resultSet) return <Spin />;

    return (
      <Chart data={resultSet.chartPivot()} height={400} forceFit>
        <Axis name="category" />
        <Axis name="Stories.count" />
        <Tooltip />
        <Geom type="interval" position="category*Stories.count" />
      </Chart>
    );
  }}
/>;

export default Example;
Cube.js Data Schema
cube(`Stories`, {
  sql: `select * from \`bigquery-public-data\`.hacker_news.stories`,

  measures: {
    count: {
      type: `count`
    }
  },

  dimensions: {
    category: {
      type: `string`,
      case: {
        when: [
          { sql: `STARTS_WITH(${title}, "Show HN")`,
            label: `Show` },
          { sql: `STARTS_WITH(${title}, "Ask HN")`,
            label: `Ask` }
        ],
        else: { label: `Other` }
      }
    },

    time: {
      sql: `time_ts`,
      type: `time`
    },

    title: {
      sql: `title`,
      type: `string`
    }
  }
});
Generated SQL
 
SQL Code Organization
Sooner or later, modeling even a dozen metrics with a dozen dimensions using pure SQL queries becomes a maintenance nightmare, which ends with you building a modeling framework.
Infrastructure
Cube.js provides key components every production-ready analytics solution requires: analytic SQL generation, query results caching and execution orchestration, data pre-aggregation, security, and API for query results fetch.
Performance
Cube.js has necessary infrastructure for every analytic application that heavily relies on its caching and pre-aggregation layer to provide sub-second API response times on a scale of a trillion data points.
Cube Cloud is a toolset that helps you leverage queries insights to improve your Cube.js performance. It identifies problems within your data 
and points out to the solutions.
Performance Tuning
See the full history of executed queries. Find slow queries and speed them up by using database indexes and pre-aggregations.
Trace and Inspect Queries
Inspect the execution time of each query and their lifecycle. Get insights into query queues and background refreshes.
Pre-Aggregations Management
Analyze your pre-aggregations refresh rate and time. Use Cube Cloud suggestions to select best possible pre-aggregation for a given query.
Monitoring & Analytics
Monitor performance of query with metrics such as response time, pre-aggregation refresh rate and more.
Cube Cloud is currently in early access with a select few design partners. Sign up to the waitlist to be in the next cohort of partners.
Cube.js empowers the developers to build custom and large-scale analytics features
Cube.js is designed to work with large-scale data sets and implements various optimization techniques. It takes the pain out of building analytics by providing the required infrastructure.
VISUALIZATION AGNOSTIC
Build Your Custom Look
Focus on what matters—building a great user experience. Cube.js provides data fetch and access utilities as client libraries instead of pre-built data visualizations. Use your native visualization components instead of trying to hack styles of embedded analytics.
CACHING
Advanced Two-Level Caching System
Cube.js comes with a two-level caching system, which allows for building flexible and extremely performant dashboards and reports. The built-in pre-aggregation engine aggregates raw data into roll-up tables and keeps them up to date. Queries, even with different filters, hit the aggregated layer instead of raw data, which allows for a sub-second response on terabytes of underlying data.
SECURITY
Enterprise-Grade Security and Multi-tenancy
Cube.js comes with row-level security, designed to scale to thousands of customers. It uses industry standard and time-proven approaches. Cube.js also supports multi-tenancy out-of-the-box, both for multiple databases and data schemas.
Supported Databases
Getting Started with Cube.js
Start using Cube.js by following the simple steps below.
Or check out the Cube.js examples repository.
1. Install Cube.js CLI with NPM or Yarn

Cube.js CLI is used for various Cube.js workflows.

$ npm install -g cubejs-cli
2. Connect to Your Database

Connect to your existing data warehouse or set up a new one.

$ cubejs create hello-world -d postgres
3. Define Your Data Schema
Use Cube.js Schema to model raw data into meaningful business definitions.
Learn more
4. Visualize Results
Now you can use Cube.js client libraries and API to build analytics features directly into your apps.
Learn more
Get Started