Hacker News new | past | comments | ask | show | jobs | submit login
[dupe] Q – Run SQL Directly on CSV or TSV Files (github.com/harelba)
18 points by gorgas on Nov 5, 2014 | hide | past | favorite | 8 comments



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

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



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

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.


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?


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

http://code.kx.com/wiki/JB:QforMortals2/contents


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


From the q file on github:

# Name : q (With respect to The Q Continuum)


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: