{"record":{"id":"72dc02a0b4dd1ee7","repo":"apache/superset","slug":"line-column-is-required-for-path-charts","errorCode":null,"errorMessage":"Line column is required for Path charts","messagePattern":"Line column is required for Path charts","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"superset-frontend/plugins/preset-chart-deckgl/src/layers/Path/buildQuery.ts","lineNumber":58,"sourceCode":"  line_width_multiplier?: number;\n  min_width?: number;\n  max_width?: number;\n  dimension?: string;\n  breakpoint_metric?: QueryFormMetric;\n}\n\nexport default function buildQuery(formData: DeckPathFormData) {\n  const {\n    line_column,\n    metric,\n    tooltip_contents,\n    line_width,\n    dimension,\n    breakpoint_metric,\n  } = formData;\n\n  if (!line_column) {\n    throw new Error('Line column is required for Path charts');\n  }\n\n  return buildQueryContext(formData, {\n    buildQuery: baseQueryObject => {\n      const columns = ensureIsArray(\n        baseQueryObject.columns || [],\n      ) as QueryFormColumn[];\n      let metrics = ensureIsArray(baseQueryObject.metrics || []);\n      const groupby = ensureIsArray(\n        baseQueryObject.groupby || [],\n      ) as QueryFormColumn[];\n\n      if (baseQueryObject.metrics?.length || metric) {\n        if (metric && !metrics.includes(metric)) {\n          metrics.push(metric);\n        }\n        if (!groupby.includes(line_column)) {\n          groupby.push(line_column);","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset-frontend/plugins/preset-chart-deckgl/src/layers/Path/buildQuery.ts#L40-L76","documentation":"Thrown by the deck.gl Path layer's buildQuery when line_column is missing. Each row's path is read from this single column (a polyline/WKT string), so the query cannot be assembled without it. Pure form-data validation raised before buildQueryContext runs.","triggerScenarios":"Building the query for a Deck.gl Path chart whose 'Path Column' (line_column) control is empty — unconfigured chart, imported dashboard with incomplete params, or a programmatic query context missing the key.","commonSituations":"Saved path charts whose source column was renamed/dropped; charts created by copying a template before setting the path column; API-driven chart creation with partial params.","solutions":["Open the Path chart in Explore and set the path column (line_column) control, then save.","Verify the underlying dataset still has the column; re-create or rename it if schema drifted.","Include line_column in params when creating the chart programmatically."],"exampleFix":"// before\nbuildQuery(formData); // line_column undefined -> throws\n\n// after\nif (!formData.line_column) {\n  throw new Error('Select a path column before running the query');\n}\nbuildQuery(formData);","handlingStrategy":"validation","validationCode":"if (!formData.line_column) {\n  throw new Error('Path chart requires a path column');\n}\nbuildQuery(formData);","typeGuard":"const hasPathColumn = (fd: DeckPathFormData): boolean => Boolean(fd.line_column);","tryCatchPattern":"try { buildQuery(formData); } catch (e) { if (e.message.includes('Line column')) showExploreWarning(e.message); else throw e; }","preventionTips":["Set the path column before enabling the layer on a dashboard","Include line_column in programmatic chart params"],"tags":["deckgl","path","buildquery","validation"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}