3 ms·
I added a new feature to my sqlite-utils CLI tool in June which covers similar ground: it now lets you load CSV, TSV and JSON data into an in-memory SQLite data
by simonw 5y ago
I added a new feature to my sqlite-utils CLI tool in June which covers similar ground: it now lets you load CSV, TSV and JSON data into an in-memory SQLite database and execute SQL queries against it: https://simonwillison.net/2021/Jun/19/sqlite-utils-memory/ https://simonwillison.net/2021/Jun/19/sqlite-utils-memory/
Example usage:
sqlite-utils memory example.csv "select * from t order by color, shape"
# Defaults to outputting JSON, you can add
# --csv or --tsv for those formats or
# --table to output as a rendered table
More docs here: https://sqlite-utils.datasette.io/en/stable/cli.html#querying-data-directly-using-an-in-memory-database https://sqlite-utils.datasette.io/en/stable/cli.html#queryin...