{"record":{"id":"bac09df52cc20711","repo":"cube-js/cube","slug":"warehouse-is-unhealthy-data-health-summary-d","errorCode":null,"errorMessage":"Warehouse is unhealthy: ${data.health?.summary}. Details: ${data.health?.details}","messagePattern":"Warehouse is unhealthy: (.+?)\\. Details: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"packages/cubejs-databricks-jdbc-driver/src/DatabricksDriver.ts","lineNumber":409,"sourceCode":"    }\n\n    const res = await fetch(`https://${this.parsedConnectionProperties.host}/api/2.0/sql/warehouses/${this.parsedConnectionProperties.warehouseId}`, {\n      headers: { Authorization: token },\n    });\n\n    if (!res.ok) {\n      throw new Error(`Databricks API error: ${res.statusText}`);\n    }\n\n    const data = await res.json();\n\n    if (['DELETING', 'DELETED'].includes(data.state)) {\n      throw new Error(`Warehouse is being deleted (current state: ${data.state})`);\n    }\n\n    // There is also DEGRADED status, but it doesn't mean that cluster is 100% not working...\n    if (data.health?.status === 'FAILED') {\n      throw new Error(`Warehouse is unhealthy: ${data.health?.summary}. Details: ${data.health?.details}`);\n    }\n  }\n\n  public override async loadPreAggregationIntoTable(\n    preAggregationTableName: string,\n    loadSql: string,\n    params: unknown[],\n    _options: any,\n  ) {\n    if (this.config.catalog) {\n      const [schema] = preAggregationTableName.split('.');\n      return super.loadPreAggregationIntoTable(\n        preAggregationTableName,\n        loadSql.replace(\n          new RegExp(`(?<=\\\\s)${schema}\\\\.(?=[^\\\\s]+)`, 'g'),\n          `${this.config.catalog}.${schema}.`\n        ),\n        params,","sourceCodeStart":391,"sourceCodeEnd":427,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-databricks-jdbc-driver/src/DatabricksDriver.ts#L391-L427","documentation":"testConnection rejects the connection test when the warehouse reports health.status === 'FAILED' with a summary and details from Databricks. DEGRADED is deliberately tolerated, so this error means Databricks itself says the warehouse is fully failing health checks.","triggerScenarios":"testConnection inspects data.health?.status from the warehouse describe API and it is exactly 'FAILED'.","commonSituations":"Warehouse failing to start (cloud instance capacity, IAM/instance-profile problems, storage access misconfiguration); oversized min-cluster config; regional capacity issues on AWS/Azure.","solutions":["Read data.health.summary/details (reproduced in the error message) and fix the underlying warehouse issue in the Databricks UI","Reduce warehouse size / min-clusters or switch to serverless to avoid capacity limits","Check the Databricks workspace for failed cluster start logs (instance profile, subnet, storage credentials)","Retry later if the cause is regional capacity unavailability"],"exampleFix":"// before\n// e.g. health FAILED due to capacity\n// warehouse size: 4X-Large, min_clusters: 4\n// after\n// smaller, serverless warehouse config in Databricks UI\n// type: serverless, size: Medium","handlingStrategy":"try-catch","validationCode":"const data = await (await fetch(`https://${host}/api/2.0/sql/warehouses/${warehouseId}`, { headers: { Authorization: `Bearer ${token}` } })).json();\nif (data.health?.status === 'FAILED') throw new Error(`Warehouse unhealthy: ${data.health?.summary}`);","typeGuard":null,"tryCatchPattern":"try {\n  await driver.testConnection();\n} catch (e) {\n  if (e.message.startsWith('Warehouse is unhealthy')) {\n    // read summary/details, page the platform team; health may recover so a delayed retry is reasonable\n  }\n  throw e;\n}","preventionTips":["Monitor warehouse health via Databricks system tables/alerts","Size warehouses within cloud capacity limits; prefer serverless where available","Check instance profiles/subnets/storage credentials on warehouse creation"],"tags":["databricks","warehouse","health","infrastructure"],"backgroundTag":"warehouse-unhealthy","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}