In SQLite you can just do sqlite> .import myfile.csv mytable sqlite> select ... What does this tool give you that SQLite doesn't do out of the box?
You skipped the line to create the bare table first in SQLite: https://www.sqlite.org/cvstrac/wiki?p=ImportingFiles
TextQL: Execute SQL Against CSV or TSV
91–95 of 95 posts
Re: TextQL: Execute SQL Against CSV or TSV
#92If you work with CSV a lot, then also check out xsv, "a command line program for indexing, slicing, analyzing, splitting and joining CSV files", from Andrew Gallant (burntsushi of Go and Rust fame): https://github.com/BurntSushi/xsv
My main hesitation: Its another DSL to learn, there is a big benefit to keeping this kind of work within the SQL world for me (or R, python, etc depending on the user).
On the other hand, getting table stats and frequencies right from the shell is a huge time saver over SQL.
Re: TextQL: Execute SQL Against CSV or TSV
#93Earlier quoted context omitted.
You skipped the line to create the bare table first in SQLite: https://www.sqlite.org/cvstrac/wiki?p=ImportingFiles
Link is to a page that says obsolete since 2009. I wasn't able to find similar page in the docs, can you help?
Re: TextQL: Execute SQL Against CSV or TSV
#94Plus you can access all this programmatically and not just through the dbish command. Since this is a central part of Perl infrastructure, there are a ton of tools that extend the DBI, from a variety of ORMs like DBIx::Class, to data export and even DDL delta management.
Generalized Database Interface: https://metacpan.org/pod/DBI DBI Shell program: https://metacpan.org/pod/DBI::Shell CSV driver: https://metacpan.org/pod/DBD::CSV
Re: TextQL: Execute SQL Against CSV or TSV
#95Does this have any benefits over lnav[1]? [1] https://www.lnav.org -- a feature-rich, powerful, flexible "mini-ETL" with an embedded sqlite engine -- is one of my all-time favorite CLI tools that somehow remains under the radar