
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.devfor Cube Cloud, orhttp://localhost:4000for a self-hosted Cube Core. Do not include the/cubejs-api/v1/metasuffix. -
Authorization Header: Value sent as the
Authorizationheader when calling the Meta API. Use the raw Cube API token, orBearer <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 viaCUBEJS_PG_SQL_PORTand 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.
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.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.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 Type | Mapped Type |
|---|---|
| string | String |
| number | Number |
| boolean | Boolean |
| time | DateTime |
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 BYof 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_MODEto be enabled on the deployment side.