Cube Semantic Layer

repository·master·Indexed 12 days ago

https://github.com/cube-js/cube

An open-source, headless semantic layer that allows developers to define metrics, dimensions, and business logic in code and expose them via SQL, REST, and GraphQL APIs. It features high-performance caching and supports various database drivers including PostgreSQL, BigQuery, AWS Athena, and ClickHouse, as well as clients for React and Angular.

Tokens
726.3K
Snippets
1.8K
Records
3.4K
Agent score
96%

What's inside Cube

  1. Overview of Cube Embed APIs

    master

    Embed APIs allow you to integrate Cube's analytics capabilities directly into your own applications. They provide a secure, session-based authentication mechanism to ensure that users can interact with your data without exposing sensitive API keys.

    There are two primary API types available:

    1. Chat API: An API-first approach for building custom, AI-powered Analytics Chat experiences within your application.
    2. Generate Session API: Used to create secure, temporary sessions required for signed embedding, allowing you to authenticate users for embedded content safely.
  2. Overview of the DAX API

    master
    The DAX (Data Analysis Expressions) API in Cube allows you to perform complex data analysis using a functional language similar to Microsoft's DAX. It provides a wide range of functions for aggregations, date/time manipulation, filtering, financial calculations, and logical operations. This API is used to extend the analytical capabilities of your data models within Cube.
  3. Overview of the GraphQL API

    master

    The GraphQL API allows Cube to deliver data over HTTP to GraphQL-enabled applications, such as front-end applications and embedded analytics use cases. It is exposed via the /graphql endpoint of the REST API.

    Current Limitations compared to the REST API:

    • No support for WebSockets transport.
    • No support for subscriptions to changes.
    • No support for referencing segments in queries.
    • No support for compare date range queries.
    • No support for querying data model metadata.
    • No ability to apply a pivot config on the front-end.
  4. Overview of the MDX API

    master

    The MDX API allows Microsoft Excel (on Windows) to connect directly to Cube Cloud using standard XMLA protocols. This enables users to use Cube data within native Excel PivotTables and execute sophisticated OLAP queries using Multidimensional Data Expressions (MDX).

    Key Features:

    • Direct connectivity: Connect Excel to Cube Cloud via XMLA.
    • Advanced analytical functions: Supports slicing, dicing, drilling down, and rolling up.
    • Real-time access: Fetches live data from Cube Cloud.

    Requirements & Limitations:

    • Plan: Available on Enterprise and above plans.
    • Deployment: Requires the M deployment tier.
    • Platform: Works only with Excel on Microsoft Windows.
    • Scope: The MDX API works with views, not cubes.
  5. Overview of the Cube.js Druid Database Driver

    master

    The @cubejs-backend/druid-driver is a pure JavaScript driver designed to allow Cube.js to connect to and query Apache Druid databases.

    Note on Support: This package is community-supported and is not actively developed by the Cube Dev team. It should be used at your own risk. The team is open to reviewing community contributions and is actively looking for maintainers via their Slack channel.

  6. Overview of the Cube SQL API

    master
    The SQL API allows Cube to deliver data using a Postgres-compatible protocol. This enables seamless integration with a wide range of data visualization tools and applications that are designed to connect to PostgreSQL databases. In the SQL API, each cube or view from your data model is represented as a table, where measures, dimensions, and segments appear as columns.
  7. Overview of Cube.js Query Orchestrator

    master
    The Cube.js Query Orchestrator is a multi-stage querying engine designed to manage complex data retrieval workflows. It functions by receiving an array of pre-aggregation SQL queries followed by a final query that fetches the actual data. The engine executes these in a specific order to ensure that the data structure remains up-to-date and that data freshness is maintained throughout the execution lifecycle.