cube-js/cube · error · Error
The ${keyByDataSource('CUBEJS_DB_DATABRICKS_URL', dataSource
Error message
The ${keyByDataSource('CUBEJS_DB_DATABRICKS_URL', dataSource)} is required and missing. What it means
Required-config guard in env.ts databricksUrl: the Databricks JDBC connection URL environment variable (CUBEJS_DB_DATABRICKS_URL, per data source if suffixed) is empty or unset. It fires when the Databricks driver is used but its mandatory connection URL was never configured.
Source
Thrown at packages/cubejs-backend-shared/src/env.ts:1079
// It's true in schema-compiler integration tests
.default('false')
.asBool()
),
/** ****************************************************************
* Databricks Driver *
***************************************************************** */
/**
* Databricks jdbc-connection url.
*/
databricksUrl: ({
dataSource,
preAggregations,
}: DataSourceOpts) => {
const val = get(keyByDataSource('CUBEJS_DB_DATABRICKS_URL', dataSource, preAggregations)).asString();
if (!val) {
throw new Error(
`The ${
keyByDataSource('CUBEJS_DB_DATABRICKS_URL', dataSource)
} is required and missing.`
);
}
return val;
},
/**
* Databricks jdbc-connection token.
*/
databricksToken: ({
dataSource,
preAggregations,
}: DataSourceOpts) => (
get(keyByDataSource('CUBEJS_DB_DATABRICKS_TOKEN', dataSource, preAggregations)).asString()
),
View on GitHub (pinned to 7d981676b3)
Solutions
- Set CUBEJS_DB_DATABRICKS_URL to your Databricks JDBC URL (e.g. databricks://host?httpPath=...).
- If multiple data sources are used, set the suffixed variant CUBEJS_DB_DATABRICKS_URL_<dataSource>.
- Verify the env file is actually loaded by the Cube process (correct directory, restart after changes).
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/cubejs-backend-shared/src/env.ts:1079 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/30ac5e9f84b38117.
Report an issue: GitHub.