Serverless Analytics Framework
A complete analytics platform for your apps: frontend SDKs and API backed by a fully managed analytics infrastructure.
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
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
 
Get Started Quickly
Forget about developing and maintaining complex analytics infrastructure. Get up and running with just a few lines of code and deploy your first application to production on day one.
Completely Custom Look
Focus on what matters - building a great user experience. Customize the look and feel of charts and dashboard for your app.
Reduce Overhead
Building scalable and fast analytics backend is complex and time-consuming. We’ve done it for you - so you can build only things that are the core of your company business.
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 maintaining the infrastructure and the query engine.
Data Schema
ORM for your analytics
Cube.js makes it easy for developers and data experts to collaboratively model the analytics domain. Being extremely flexible, it allows you to express everything from simple counts to cohort retention and funnel analysis.
cube(‘CheckoutFunnel‘, {
  extends: Funnels.eventFunnel({
    userId: { sql: user_id },
    time: { sql: timestamp },
    steps: [{
      name: `signup`,
      eventsView: { sql: `select * from sign_ups` }
    }, {
      name: `purchase`,
      eventsView: { sql: `select * from purchases` }
    }, {
      name: `checkout`,
      eventsView: { sql: `select * from checkouts` }
    }]
  })
});
Data Schema
ORM for your analytics
Cube.js makes it easy for developers and data experts to collaboratively model the analytics domain. Being extremely flexible, it allows you to express everything from simple counts to cohort retention and funnel analysis.
Query Engine
Query cache and database connection handler optimized for high load
The Cube.js query engine handles all the complexity of caching and managing database connections, letting you focus on building a great user experience.
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. Create Free Account
Create free Cube.js Cloud account.
Sign up now
2. Connect Your Database
Connect to your existing data warehouse or set up a new one.
3. Define Your Data Schema
Use Cube.js to model raw data into meaningful business definitions.
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