LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

textql

Execute SQL queries on CSV files

TLDR

Query CSV
$ textql -sql "[SELECT * FROM file]" [data.csv]
copy
With header
$ textql -header -sql "[SELECT name FROM file]" [data.csv]
copy
Custom delimiter
$ textql -dlm=";" -sql "[query]" [data.csv]
copy
Save to SQLite
$ textql -save-to [output.db] [data.csv]
copy
Output to file
$ textql -output-file [result.csv] -sql "[query]" [data.csv]
copy

SYNOPSIS

textql [-sql query] [-header] [-dlm delim] [options] files

DESCRIPTION

textql allows running SQL queries against structured text files such as CSV and TSV. It loads files into an in-memory SQLite database, treating each file as a table, and executes standard SQL queries against them.When -header is specified, the first row is used for column names; otherwise columns are named c0, c1, etc. Multiple files can be loaded simultaneously and joined using SQL JOIN syntax. The -save-to option persists the imported data to a SQLite database file for further analysis. Custom delimiters are supported with the -dlm flag.

PARAMETERS

-sql QUERY

SQL query.
-header
First row is header.
-dlm CHAR
Field delimiter.
-save-to FILE
Save to SQLite.
-output-file FILE
Output file.
-output-dlm CHAR
Output delimiter.

INSTALL

sudo apt install textql
copy
nix profile install nixpkgs#textql
copy

CAVEATS

Memory for large files. SQLite limitations. Go-based tool.

HISTORY

textql was created to execute SQL queries against structured text files like CSV using SQLite.

SEE ALSO

sqlite3(1), csvq(1), q(1), miller(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid