This is great. I keep the following in my bash profile for querying CSVs with SQL, which works OK, but this is probably better:
function csv_to_sqlite() {
echo "used as csv_to_sqlite PATH_TO_CSV TABLE_NAME"
sqlite3 -csv -cmd ".import $1 $2" -cmd ".headers on"
}
Two suggestions:1. It would be a lot more useful if I could link an entire database rather than just tables
2. Sometimes I just want to query a single CSV, so a command line argument where I can just specify the path would be nice