TextQL: Execute SQL Against CSV or TSV
github.com
TextQL: Execute SQL Against CSV or TSV
1–10 of 95 posts
Re: TextQL: Execute SQL Against CSV or TSV
#2Re: TextQL: Execute SQL Against CSV or TSV
#3Are there any differences with using this instead of CSVKit?
https://csvkit.readthedocs.io/en/1.0.3/
It includes a tool called csvsql.
Example usage -
csvsql --query "select name from data where age > 30" data.csv > new.csvRe: TextQL: Execute SQL Against CSV or TSV
#4 .mode csv
.headers on
.import my.csv tablename
This does look extremely convenient, though; being able to use UNIX pipes will be a huge improvement to my workflow.Re: TextQL: Execute SQL Against CSV or TSV
#5 sqlite> .import myfile.csv mytable
sqlite> select ...
What does this tool give you that SQLite doesn't do out of the box?Re: TextQL: Execute SQL Against CSV or TSV
#6In SQLite you can just do sqlite> .import myfile.csv mytable sqlite> select ... What does this tool give you that SQLite doesn't do out of the box?
Re: TextQL: Execute SQL Against CSV or TSV
#7In SQLite you can just do sqlite> .import myfile.csv mytable sqlite> select ... What does this tool give you that SQLite doesn't do out of the box?
> sqlite import will not accept stdin, breaking unix pipes. textql will happily do so.
> textql supports quote escaped delimiters, sqlite does not.
> textql leverages the sqlite in memory database feature as much as possible and only touches disk if asked.
Re: TextQL: Execute SQL Against CSV or TSV
#8In SQLite you can just do sqlite> .import myfile.csv mytable sqlite> select ... What does this tool give you that SQLite doesn't do out of the box?
Key differences between textql and sqlite importing
sqlite import will not accept stdin, breaking unix pipes. textql will happily do so.
textql supports quote escaped delimiters, sqlite does not.
textql leverages the sqlite in memory database feature as much as possible and only touches disk if asked.
Re: TextQL: Execute SQL Against CSV or TSV
#9For anyone looking to do this with plain SQLite, one can import a CSV by running (in the REPL) .mode csv .headers on .import my.csv tablename This does look extremely convenient, though; being able to use UNIX pipes will be a huge improvement to my workflow.