Query CSV files in SQL or alike

Jun 21, 2018 11:46

I need a small utility (suitable for embedded Linux) to make complex queries to CSV files, sql-style. Don't bash me, don't gawk on me, shell utilities I used just don't cut it.

Here's my notes - what I found.

* q (I' using it now) Works great, not suitable for embedded b/c Python+libsqlite.
* txt-sushi/tssql: in Haskell, must be pretty OK. ( Read more... )

Leave a comment

Comments 4

_adept_ June 21 2018, 21:58:16 UTC
You can write a small shell script that spins up a new postgres instance and does "\copy into ... from stdin" into it. Then you can use real SQL :)

Reply

vitus_wagner June 22 2018, 04:16:23 UTC
Postgres is about 50 Mb of binaries. If 2Mb is big for topic stater...

Reply


vitus_wagner June 22 2018, 04:16:54 UTC
If Perl is affordable, it has DBD::CSV,

Reply


muwlgr June 22 2018, 17:55:32 UTC
Did you try to look at Lua language ? It has small runtime, can be used standalone or embedded into applications through C API, has high-level 'tables' (similar to Javascript's Objects/Arrays) and quite a lot of open-source libraries of varying purpose and quality.

Reply


Leave a comment

Up