

Q – Run SQL Directly on CSV or TSV Files - gorgas
https://github.com/harelba/q

======
fdik
On Windoze, ADO lets you use SQL directly on any data source for many years
now, including CSV, TSV, Exchange Microsoft, and many more.

Here's a sample how this can be done:
[http://fdik.org/ado.zip](http://fdik.org/ado.zip)

Such database middleware is missing on many other platforms. Could be an
option to think about it.

~~~
CHY872
Postgres can do it.
[https://wiki.postgresql.org/wiki/Foreign_data_wrappers](https://wiki.postgresql.org/wiki/Foreign_data_wrappers)

------
ClashTheBunny
If you want to just drop CSV files into MySQL, go for it with using the CSV
file backing: [http://dev.mysql.com/doc/refman/5.0/en/csv-storage-
engine.ht...](http://dev.mysql.com/doc/refman/5.0/en/csv-storage-engine.html)

As the comments say, create the table with a CSV storage backing and then
delete the file and symlink any file to the same location. You are now
querying your quicken export or your excel file.

------
codeulike
On windows, Logparser 2.2 is a fast implementation of a similar idea.

Does Q handle typical aggravated CSV symptoms such as commas in speechmark
delimited strings, speechmarks in speechmark delimited strings, strings that
contain carriage returns, etc?

------
easytiger
is this deliberately named to confuse people with the kdb q language?

[http://code.kx.com/wiki/JB:QforMortals2/contents](http://code.kx.com/wiki/JB:QforMortals2/contents)

~~~
papercrane
I doubt it was deliberate. Q isn't exactly a well-known language outside of
the financial sector.

------
urlwolf
csvtools have had a tool to do this for a while. Not directly though, it goes
through sqlite.

