{"record":{"id":"91071fe0daed062e","repo":"cube-js/cube","slug":"missing-httppath-in-jdbc-url","errorCode":null,"errorMessage":"Missing httpPath in JDBC URL","messagePattern":"Missing httpPath in JDBC URL","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"packages/cubejs-databricks-jdbc-driver/src/helpers.ts","lineNumber":74,"sourceCode":"\nexport function parseDatabricksJdbcUrl(jdbcUrl: string): ParsedConnectionProperties {\n  const jdbcPrefix = 'jdbc:databricks://';\n  const urlWithoutPrefix = jdbcUrl.slice(jdbcPrefix.length);\n\n  const [hostPortAndPath, ...params] = urlWithoutPrefix.split(';');\n  const [host] = hostPortAndPath.split(':');\n\n  const paramMap = new Map<string, string>();\n  for (const param of params) {\n    const [key, value] = param.split('=');\n    if (key && value) {\n      paramMap.set(key, value);\n    }\n  }\n\n  const httpPath = paramMap.get('httpPath');\n  if (!httpPath) {\n    throw new Error('Missing httpPath in JDBC URL');\n  }\n\n  const warehouseMatch = httpPath.match(/\\/warehouses\\/([a-zA-Z0-9]+)/);\n  if (!warehouseMatch) {\n    throw new Error('Could not extract warehouseId from httpPath');\n  }\n\n  const warehouseId = warehouseMatch[1];\n\n  return { host, warehouseId };\n}\n","sourceCodeStart":56,"sourceCodeEnd":86,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-databricks-jdbc-driver/src/helpers.ts#L56-L86","documentation":"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.","triggerScenarios":"Driver constructed with a JDBC URL lacking ;httpPath=/sql/1.0/warehouses/<id> (or an all_clusters_path), so paramMap.get('httpPath') is undefined.","commonSituations":"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.","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"],"exampleFix":"// before\njdbc:databricks://dbc-xxxx.cloud.databricks.com;transportMode=http;ssl=1\n// after\njdbc:databricks://dbc-xxxx.cloud.databricks.com;transportMode=http;ssl=1;httpPath=/sql/1.0/warehouses/abc123","handlingStrategy":"validation","validationCode":"const url = process.env.CUBEJS_DB_URL;\nif (!url || !url.includes('httpPath=')) {\n  throw new Error('CUBEJS_DB_URL must contain ;httpPath=/sql/1.0/warehouses/<id>');\n}","typeGuard":null,"tryCatchPattern":"try {\n  const driver = new DatabricksDriver(config);\n} catch (e) {\n  if (e.message === 'Missing httpPath in JDBC URL') {\n    // fix the JDBC URL to include httpPath before constructing again\n  }\n  throw e;\n}","preventionTips":["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"],"tags":["configuration","jdbc","url-parsing"],"backgroundTag":"missing-jdbc-url-parameter","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}