Feature request
read_csv supports a normalize_names option that lowercases column names and replaces special characters with underscores. It would be useful if ST_Read supported the same option.
Motivation
Many geospatial datasets (shapefiles, GeoPackages, etc.) use mixed-case column names — e.g. RC_Name, Region_NM, H3_count, pctCloneTown. When loading these into DuckDB alongside other tables that use snake_case, users must manually alias every column:
SELECT
rc.RC_ID AS rc_id,
rc.RC_Name AS rc_name,
rc.Region_NM AS region_nm,
...
FROM ST_Read('data.gpkg') rc
With normalize_names := true this would become:
SELECT * FROM ST_Read('data.gpkg', normalize_names := true)
-- columns: rc_id, rc_name, region_nm, ...
Proposed behaviour
Consistent with read_csv:
- Lowercase all column names
- Replace spaces and special characters with
_
- Default to
false for backwards compatibility
Feature request
read_csvsupports anormalize_namesoption that lowercases column names and replaces special characters with underscores. It would be useful ifST_Readsupported the same option.Motivation
Many geospatial datasets (shapefiles, GeoPackages, etc.) use mixed-case column names — e.g.
RC_Name,Region_NM,H3_count,pctCloneTown. When loading these into DuckDB alongside other tables that use snake_case, users must manually alias every column:With
normalize_names := truethis would become:Proposed behaviour
Consistent with
read_csv:_falsefor backwards compatibility