jqnatividad / qsv

Blazing-fast Data-Wrangling toolkit
https://qsv.dathere.com
The Unlicense
2.5k stars 71 forks source link

[Feature Request] safer safenames #1921

Open terefang opened 4 months ago

terefang commented 4 months ago

while the current safename option are many and database column-name safe, actual naming schema might not be what the user wants.

my proposal would be the (s)afe mode as defined be the following steps:

(s)afe mode should operate in ascii-chars-only mode, (S)afe mode should work in unicode-chars mode.

jqnatividad commented 4 months ago

FYI - I originally designed safenames to help with real-world data ingestion using Datapusher+ for CKAN - especially with spreadsheet header names.

That's why its defaults are heavily informed by CKAN requirements.

I can certainly make it "safer" using your proposal, though I have to prioritize CKAN data ingestion.

Perhaps, I can just add a new command called safernames, so as not to perturb safenames which is working quite well in our pipelines.

terefang commented 4 months ago

hmm .. would the creation of a new subcommand with similar functionality be counter-intuitive ?

jqnatividad commented 4 months ago

Point taken...

I'll just have to add it to safenames then in a way that doesn't have breaking API changes...

terefang commented 4 months ago

how about --mode "s" and --mode "S" ?

jqnatividad commented 4 months ago

Yes... that's the easy part...

The part that I'm thinking about is how the JSON output formats will work...