cube-js/cube · critical
Missing httpPath in JDBC URL
Error message
Missing httpPath in JDBC URL
What it means
parseDatabricksJdbcUrl extracts query params from the JDBC URL and requires an httpPath parameter, which identifies the Databricks compute endpoint (SQL warehouse or cluster). Without it the driver cannot route to any warehouse, so the constructor fails fast.
Source
Thrown at packages/cubejs-databricks-jdbc-driver/src/helpers.ts:74
export function parseDatabricksJdbcUrl(jdbcUrl: string): ParsedConnectionProperties {
const jdbcPrefix = 'jdbc:databricks://';
const urlWithoutPrefix = jdbcUrl.slice(jdbcPrefix.length);
const [hostPortAndPath, ...params] = urlWithoutPrefix.split(';');
const [host] = hostPortAndPath.split(':');
const paramMap = new Map<string, string>();
for (const param of params) {
const [key, value] = param.split('=');
if (key && value) {
paramMap.set(key, value);
}
}
const httpPath = paramMap.get('httpPath');
if (!httpPath) {
throw new Error('Missing httpPath in JDBC URL');
}
const warehouseMatch = httpPath.match(/\/warehouses\/([a-zA-Z0-9]+)/);
if (!warehouseMatch) {
throw new Error('Could not extract warehouseId from httpPath');
}
const warehouseId = warehouseMatch[1];
return { host, warehouseId };
}
View on GitHub (pinned to 7d981676b3)
Solutions
- Add ;httpPath=/sql/1.0/warehouses/<warehouseId> to the JDBC URL, copying the path exactly from the Databricks warehouse Connection details tab
- Ensure JDBC URL params are separated with ';' and the whole URL is correctly quoted in env vars (no shell mangling)
- Log/echo the resolved CUBEJS_DB_URL (minus secrets) to confirm the driver sees the httpPath
Example fix
// before jdbc:databricks://dbc-xxxx.cloud.databricks.com;transportMode=http;ssl=1 // after jdbc:databricks://dbc-xxxx.cloud.databricks.com;transportMode=http;ssl=1;httpPath=/sql/1.0/warehouses/abc123
Defensive patterns
Strategy: validation
Validate before calling
const url = process.env.CUBEJS_DB_URL;
if (!url || !url.includes('httpPath=')) {
throw new Error('CUBEJS_DB_URL must contain ;httpPath=/sql/1.0/warehouses/<id>');
} Try / catch
try {
const driver = new DatabricksDriver(config);
} catch (e) {
if (e.message === 'Missing httpPath in JDBC URL') {
// fix the JDBC URL to include httpPath before constructing again
}
throw e;
} Prevention
- Copy the full JDBC URL from the Databricks warehouse Connection details tab
- Validate env vars (presence of httpPath) at app startup
- Quote JDBC URLs in shell/env files so ';' params are not stripped
When it happens
Trigger: Driver constructed with a JDBC URL lacking ;httpPath=/sql/1.0/warehouses/<id> (or an all_clusters_path), so paramMap.get('httpPath') is undefined.
Common situations: Copy-pasting a host-only JDBC string; URL separator typos (':' vs ';') so params never parse; forgetting httpPath entirely when switching from other databases; httpPath present but HTML-escaped or mangled by env-var interpolation.
Related errors
- Could not extract warehouseId from httpPath
- drivername is required property
- url is required property
- A user-defined contextToApiScopes function returns an incons
- A user-defined contextToApiScopes function returns a wrong s
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/91071fe0daed062e.
Report an issue: GitHub.