SQL CSV query

Is there a tool that will automatically provide me with a SQL interface on top of CSV files?

+4
source share
3 answers

You can use http://harelba.imtqy.com/q/

Example (from their README ):

q "SELECT COUNT(*) FROM ./my_file.csv WHERE c3 > 32.3"

There is also a Python module and program: https://pythonhosted.org/querycsv/

Or in Go: https://github.com/dinedal/textql

You can also use this PowerShell script: Invoke-CsvSqlcmd

Many other tools can be found here .

+2
source

http://harelba.imtqy.com/q/, :

q"SELECT COUNT(*) FROM ./clicks_file.csv WHERE c3 > 32.3"
+1

Oracle External Table .
You can use the local installation of Oracle -
Oracle Database Express Edition 11g Release 2 ( Download )


This may require more work than other tools, but the data processing capabilities are endless.


create directory c_temp as 'c:\Temp';

create table myfile (c1 int,c2 int,c3 int) 
organization external (type oracle_loader default directory c_temp location ('myfile.csv'));

select * from myfile;
0
source

Source: https://habr.com/ru/post/1659841/


All Articles