apache/superset · error · Error
Longitude/latitude column is required for delimited type
Error message
Longitude/latitude column is required for delimited type
What it means
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.
Source
Thrown at superset-frontend/plugins/preset-chart-deckgl/src/layers/spatialUtils.ts:88
[key: string]: unknown;
}
export function getSpatialColumns(spatial: SpatialConfiguration): string[] {
if (!spatial || !spatial.type) {
throw new Error('Bad spatial key');
}
switch (spatial.type) {
case 'latlong':
if (!spatial.lonCol || !spatial.latCol) {
throw new Error(
'Longitude and latitude columns are required for latlong type',
);
}
return [spatial.lonCol, spatial.latCol];
case 'delimited':
if (!spatial.lonlatCol) {
throw new Error(
'Longitude/latitude column is required for delimited type',
);
}
return [spatial.lonlatCol];
case 'geohash':
if (!spatial.geohashCol) {
throw new Error('Geohash column is required for geohash type');
}
return [spatial.geohashCol];
default:
throw new Error(`Unknown spatial type: ${spatial.type}`);
}
}
export function addSpatialNullFilters(
spatial: SpatialConfiguration,
filters: QueryObjectFilterClause[],
): QueryObjectFilterClause[] {View on GitHub (pinned to f4587218dd)
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'.
Example fix
// before
getSpatialColumns({ type: 'delimited' }); // throws
// after
getSpatialColumns({ type: 'delimited', lonlatCol: 'lonlat', delimiter: ',' }); Defensive patterns
Strategy: validation
Validate before calling
if (spatial.type === 'delimited' && !spatial.lonlatCol) {
throw new Error('delimited spatial needs lonlatCol');
}
getSpatialColumns(spatial); Type guard
const isCompleteDelimited = (s: SpatialConfiguration): boolean => s.type !== 'delimited' || typeof s.lonlatCol === 'string';
Try / catch
try { getSpatialColumns(spatial); } catch (e) { if (e.message.includes('delimited type')) promptForDelimitedColumn(); else throw e; } Prevention
- Validate the single combined column whenever delimited encoding is chosen
- Check delimiter and column together when serializing params
When it happens
Trigger: 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.
Common situations: Switching the spatial encoding to 'delimited' without choosing the combined lon/lat column; dataset column renames; imported params with the column key misspelled.
Related errors
- Start and end spatial configurations are required for Arc ch
- Spatial configuration is required for Scatter charts
- Bad spatial key
- Longitude and latitude columns are required for latlong type
- Geohash column is required for geohash type
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/a673f9f1f0f340a2.
Report an issue: GitHub.