Skip to main content
Cube is a semantic layer that sits in front of a data warehouse or database, letting teams model “cubes” of measures and dimensions on top of their data. This connector is fully generic: it has no knowledge of any specific data model, and instead discovers a client’s cubes and views at runtime, from whichever Cube Core or Cube Cloud deployment it’s pointed at.

Configuring Cube as a Source

In the Sources tab, click on the “Add source” button located on the top right of your screen. Then, select the Cube option from the list of connectors. Click Next and you’ll be prompted to add your access.

1. Add account access

Cube exposes two separate APIs, and this connector needs credentials for both: the Meta API (used to discover the data model) and the SQL API (used to extract data). The following configurations are available:
  • Meta API Base URL: Base URL of Cube’s REST API, used for schema discovery. For example, https://my-deployment.cubecloudapp.dev for Cube Cloud, or http://localhost:4000 for a self-hosted Cube Core. Do not include the /cubejs-api/v1/meta suffix.
  • Authorization Header: Value sent as the Authorization header when calling the Meta API. Use the raw Cube API token, or Bearer <token> if your deployment issues a JWT that requires the Bearer scheme.
  • SQL API Host: Hostname of Cube’s SQL API (Postgres-compatible protocol). For Cube Cloud, this is a different host than the Meta API’s, typically something like my-deployment.sql.gcp-us-central1.cubecloudapp.dev.
  • SQL API Port: (Optional, default 5432) Port of Cube’s SQL API. Self-hosted Cube Core deployments set this via CUBEJS_PG_SQL_PORT and commonly use a different port.
  • Database: (Optional, default cube) Database name for the SQL API connection. Cube accepts any non-empty string here — it doesn’t correspond to a real database.
  • SQL API User: Username for the SQL API connection (CUBEJS_SQL_USER).
  • SQL API Password: Password for the SQL API connection (CUBEJS_SQL_PASSWORD).
  • Use SSL: (Optional, default enabled) Whether to require SSL for the SQL API connection.
  • Start Date: (Optional) Earliest value to sync for cubes that expose a time dimension. Cubes without a time dimension are always synced in full.
Cube Cloud typically serves the Meta API and SQL API on different hosts — make sure you provide the SQL-specific host, not the Meta API’s.
Once you’re done, click Next.

2. Select streams

The connector automatically discovers every cube and view exposed by the Meta API. Choose which ones you want to sync. Select the streams and click Next.

3. Configure data streams

Customize how you want your data to appear in your catalog. Select the desired layer, a folder to organize it, a name for each table, and the type of sync.
Sync type is decided automatically per cube, not configured manually: cubes with a time-typed dimension sync incrementally on that dimension; cubes without one sync as full table.
Once you are done configuring, click Next.

4. Configure data source

Describe your data source for easy identification within your organization. Define your Trigger based on how often you need data updated. Once you are ready, click Next to finalize the setup.

5. Check your new source

You can view your new source on the Sources page. If needed, manually trigger the source extraction by clicking on the arrow button.
For you to be able to see it on your Catalog, you need at least one successful source run.

Streams and Fields

Cube is a semantic-layer connector — streams are dynamically discovered from your Cube deployment’s own data model. Each cube or view becomes a stream, with one field per measure and dimension it defines.

Supported Data Types

Cube TypeMapped Type
stringString
numberNumber
booleanBoolean
timeDateTime

Primary Keys and Replication

  • Primary key: Cube’s Meta API doesn’t expose an explicit primary-key flag for regular cubes, so the full set of dimensions is used as the primary key — every row is a GROUP BY of all dimensions, so that combination is the row’s natural key.
  • Replication: If a cube has a time-typed dimension, it’s synced incrementally, filtered on that dimension using the Start Date (or the bookmark from a previous run). Cubes without a time dimension are always synced in full.
Data freshness for incremental streams also depends on the cube’s own pre-aggregation refresh configuration on the Cube deployment itself — this connector has no control over that.

Known Limitations

  • Cube’s SQL API decides on its own, per query, whether to answer from cache/pre-aggregations or push the query down to the underlying data source. This connector sends plain, portable SQL and does not force or detect either path.
  • Cube Cloud’s separate Metadata API exposes richer schema information (an explicit primary-key flag, table lineage), but it requires a JWT obtained through the Cube Cloud Control Plane API and is Cube-Cloud-only. It is not used, so that discovery behaves identically on Cube Core and Cube Cloud.
  • Very large result sets may require Cube’s CUBESQL_STREAM_MODE to be enabled on the deployment side.