{"record":{"id":"abd100527a00a030","repo":"apache/superset","slug":"start-and-end-spatial-configurations-are-required","errorCode":null,"errorMessage":"Start and end spatial configurations are required for Arc charts","messagePattern":"Start and end spatial configurations are required for Arc charts","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"superset-frontend/plugins/preset-chart-deckgl/src/layers/Arc/buildQuery.ts","lineNumber":43,"sourceCode":"  getSpatialColumns,\n  addSpatialNullFilters,\n  SpatialFormData,\n} from '../spatialUtils';\nimport { addTooltipColumnsToQuery } from '../buildQueryUtils';\n\nexport interface DeckArcFormData extends SqlaFormData {\n  start_spatial: SpatialFormData['spatial'];\n  end_spatial: SpatialFormData['spatial'];\n  dimension?: string;\n  tooltip_contents?: unknown[];\n  tooltip_template?: string;\n}\n\nexport default function buildQuery(formData: DeckArcFormData) {\n  const { start_spatial, end_spatial, dimension, tooltip_contents } = formData;\n\n  if (!start_spatial || !end_spatial) {\n    throw new Error(\n      'Start and end spatial configurations are required for Arc charts',\n    );\n  }\n\n  return buildQueryContext(formData, baseQueryObject => {\n    const startSpatialColumns = getSpatialColumns(start_spatial);\n    const endSpatialColumns = getSpatialColumns(end_spatial);\n\n    let columns = [\n      ...(baseQueryObject.columns || []),\n      ...startSpatialColumns,\n      ...endSpatialColumns,\n    ];\n\n    if (dimension) {\n      columns = [...columns, dimension];\n    }\n","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset-frontend/plugins/preset-chart-deckgl/src/layers/Arc/buildQuery.ts#L25-L61","documentation":"Thrown by the deck.gl Arc layer's buildQuery when form data lacks start_spatial or end_spatial. An arc needs two endpoints, each defined by a spatial configuration (latlong pair, delimited column, or geohash); without both, no meaningful SQL columns can be derived and query building stops. It is a chart-configuration guard, not a runtime/network failure.","triggerScenarios":"Building the query for a Deck.gl Arc chart whose 'Start latitude/longitude' or 'End latitude/longitude' spatial control is unset, or whose saved form params (imported dashboard, API-created chart) omit start_spatial/end_spatial.","commonSituations":"Half-configured arc charts saved before both endpoints were chosen; dashboards imported from another instance where spatial controls did not serialize; dataset column renames leaving the spatial config empty after re-binding.","solutions":["Open the Arc chart in Explore and configure both the start and end spatial controls (latlong columns, delimited column, or geohash), then save.","Verify the saved slice params JSON actually contains start_spatial and end_spatial objects (check via chart GET /api/v1/chart).","For programmatic use, populate both fields in formData before calling buildQuery."],"exampleFix":"// before\nbuildQuery({ ...formData, end_spatial: undefined }); // throws\n\n// after\nif (!formData.start_spatial || !formData.end_spatial) {\n  return showConfigWarning('Arc chart needs start and end spatial controls');\n}\nbuildQuery(formData);","handlingStrategy":"validation","validationCode":"if (!formData.start_spatial || !formData.end_spatial) {\n  // mark chart misconfigured; do not build query\n}\nbuildQuery(formData);","typeGuard":"const hasBothSpatial = (fd: DeckArcFormData): boolean =>\n  Boolean(fd.start_spatial?.type) && Boolean(fd.end_spatial?.type);","tryCatchPattern":"try { buildQuery(formData); } catch (e) { if (e.message.includes('Start and end spatial')) showExploreWarning(e.message); else throw e; }","preventionTips":["Block 'Run' until both arc endpoints are configured","Check saved params include start_spatial/end_spatial after imports"],"tags":["deckgl","arc","spatial","buildquery","validation"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}