{"record":{"id":"a673f9f1f0f340a2","repo":"apache/superset","slug":"longitude-latitude-column-is-required-for-delimite","errorCode":null,"errorMessage":"Longitude/latitude column is required for delimited type","messagePattern":"Longitude/latitude column is required for delimited type","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"superset-frontend/plugins/preset-chart-deckgl/src/layers/spatialUtils.ts","lineNumber":88,"sourceCode":"  [key: string]: unknown;\n}\n\nexport function getSpatialColumns(spatial: SpatialConfiguration): string[] {\n  if (!spatial || !spatial.type) {\n    throw new Error('Bad spatial key');\n  }\n\n  switch (spatial.type) {\n    case 'latlong':\n      if (!spatial.lonCol || !spatial.latCol) {\n        throw new Error(\n          'Longitude and latitude columns are required for latlong type',\n        );\n      }\n      return [spatial.lonCol, spatial.latCol];\n    case 'delimited':\n      if (!spatial.lonlatCol) {\n        throw new Error(\n          'Longitude/latitude column is required for delimited type',\n        );\n      }\n      return [spatial.lonlatCol];\n    case 'geohash':\n      if (!spatial.geohashCol) {\n        throw new Error('Geohash column is required for geohash type');\n      }\n      return [spatial.geohashCol];\n    default:\n      throw new Error(`Unknown spatial type: ${spatial.type}`);\n  }\n}\n\nexport function addSpatialNullFilters(\n  spatial: SpatialConfiguration,\n  filters: QueryObjectFilterClause[],\n): QueryObjectFilterClause[] {","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset-frontend/plugins/preset-chart-deckgl/src/layers/spatialUtils.ts#L70-L106","documentation":"Thrown by getSpatialColumns when spatial.type is 'delimited' but lonlatCol is missing. The delimited encoding uses a single column whose values contain both coordinates joined by a delimiter, so exactly one column name is required. Without it the query cannot reference any coordinate source.","triggerScenarios":"A spatial config { type: 'delimited' } (or with typo'd keys) passed to getSpatialColumns — the delimiter control was configured but the source column left empty, or params were built by hand.","commonSituations":"Switching the spatial encoding to 'delimited' without choosing the combined lon/lat column; dataset column renames; imported params with the column key misspelled.","solutions":["Select the delimited longitude/latitude column in the chart's spatial control and save.","Verify the dataset still exposes that column; rebind after schema drift.","In code, ensure lonlatCol is set whenever type === 'delimited'."],"exampleFix":"// before\ngetSpatialColumns({ type: 'delimited' }); // throws\n\n// after\ngetSpatialColumns({ type: 'delimited', lonlatCol: 'lonlat', delimiter: ',' });","handlingStrategy":"validation","validationCode":"if (spatial.type === 'delimited' && !spatial.lonlatCol) {\n  throw new Error('delimited spatial needs lonlatCol');\n}\ngetSpatialColumns(spatial);","typeGuard":"const isCompleteDelimited = (s: SpatialConfiguration): boolean =>\n  s.type !== 'delimited' || typeof s.lonlatCol === 'string';","tryCatchPattern":"try { getSpatialColumns(spatial); } catch (e) { if (e.message.includes('delimited type')) promptForDelimitedColumn(); else throw e; }","preventionTips":["Validate the single combined column whenever delimited encoding is chosen","Check delimiter and column together when serializing params"],"tags":["deckgl","spatial","delimited","validation"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}