Allows you to easily execute SQL against structured text like CSV or TSV.
593
Allows you to easily execute SQL against structured text like CSV or TSV.
Example session:

Since there has been some time since the initial release of textql, I've made some improvements as well as made the project much more modular. There's also been a additional performance tweaks and added functionality, but this comes at the cost of breaking the original command line flags and changing the install command.
Additions:
FROM [table] can be dropped from the query.SELECT keyword can be dropped from the query.textql -sql "select * from tbl" -source some_file.csv can be shortened to textql -sql "*" some_file.csvChanges:
Removals:
Bug fixes:
Latest release on Homebrew (OS X)
brew install textql
Build from source
go get -u github.com/dinedal/textql/...
First build the image.
docker build -t textql .
Now use that image mounting your current directory into the container.
docker run --rm -it $(pwd):/tmp textql [rest_of_command]
You can add the following alias to your system to provide quick access to TextQL:
alias textql='docker run --rm -it -v $(pwd):/tmp textql '
textql [-console] [-save-to path path] [-output-file path] [-output-dlm delimter] [-output-header] [-pretty] [-quiet] [-header] [-dlm delimter] [-sql sql_statements] [path ...]
-console
After all statements are run, open SQLite3 REPL with this data
-dlm string
Input delimiter character between fields -dlm=tab for tab, -dlm=0x## to specify a character code in hex (default ",")
-header
Treat input files as having the first row as a header row
-output-dlm string
Output delimiter character between fields -output-dlm=tab for tab, -dlm=0x## to specify a character code in hex (default ",")
-output-file file
Filename to write output to, if empty no output is written (default "stdout")
-output-header
Display column names in output
-quiet
Surpress logging
-pretty
Pretty print output
-save-to file
SQLite3 db is left on disk at this file
-sql string
SQL Statement(s) to run on the data
-version
Print version and exit
New MIT License - Copyright (c) 2015, 2016 Paul Bergeron http://pauldbergeron.com/
See LICENSE for details
Content type
Image
Digest
Size
299.8 MB
Last updated
over 8 years ago
docker pull danstreeter/textql