Live data from Hacker News

TextQL: Execute SQL Against CSV or TSV

github.com

1–10 of 95 posts

Re: TextQL: Execute SQL Against CSV or TSV

#4
For 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.

Re: TextQL: Execute SQL Against CSV or TSV

#7
post #5

In 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?

It's discussed in the README: https://github.com/dinedal/textql#key-differences-between-te...

> 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

#8
post #5

In 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?

From the README:

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

#9
post #4

For 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.

[deleted]
Post reply on HN