SQL¶
Run SQL against text files¶
There are many tools that allow you to run SQL queries against text (csv) files.
Q¶
SQLite¶
sqlite3 mydatabase.db
.mode csv
.import asdf.txt mytable
SELECT min(col2), max(col3) FROM mytable GROUP BY col1;
CSVkit¶
TextQL¶
OctoSQL¶
Supports: .csv, .json, Excel, Parquet.
DSQ¶
It supports a wide range of file formats, including .csv, JSON, .tsv, Excel, Parquet, and .ods.