Skip to content

NORMALIZE_NAMES scope needs reviewing #16788

@munkeholler

Description

@munkeholler

according to the documentation
"""
normalize_names Normalize column names. This removes any non-alphanumeric characters from them. Column names that are reserved SQL keywords are prefixed with an underscore character (_).
"""

example: (I would have expected **_commit** and **_rollback** as they are (typically) seen as reserved keywords 
REFERENCE: https://en.wikipedia.org/wiki/List_of_SQL_reserved_words

create table places as select * from read_csv("pop.csv", normalize_names=True);
select * from places;
┌───────────┬───────────────┬────────┬──────────┐
│  _select  │     _join     │ commit │ rollback │
│  varchar  │    varchar    │ int64  │ varchar  │
├───────────┼───────────────┼────────┼──────────┤
│ Amsterdam │ North Holland │ 905234 │ NULL     │
│ Rotterdam │ South Holland │ 656050 │ NULL     │
│ The Hague │ South Holland │ 552995 │ NULL     │
│ Utrecht   │ Utrecht       │ 361924 │ NULL     │
│ Eindhoven │ North Brabant │ 238478 │ NULL     │
...

thoughts ....

rgds

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions