q
q copied to clipboard
q - Run SQL directly on delimited files and multi-file sqlite databases
Failures in field formatting might lead to tracebacks instead of well defined error behaviour.
Would be nice not needing to specify `-d,` each time.
Reported by @mikaelgrave : Empty fields are sometimes not enclosed within double quotes even when -W all is specified. Example (qtest.csv): ``` city,distance,foo,bar london,1000,56, paris,,76,45 madrid,1400,89,32 berlin,,87,78 london,1000,56, paris,1200,76,45 madrid,1400,,...
``` $ cat > temp.csv 1,\\ 2,\ 3,\ ``` ``` $ cat temp.csv | q -d ',' -D ',' 'select * from -' 1,\ 2, 3, ``` Apparently, `\` is...
Example CSV: ``` columnOne,columnTwo,columnThree testA,one one,aaa testB,"two two",bbb testC,"three, three",ccc ``` Running: ``` bash $ q -HOd, "select * from test.csv" ``` ``` columnOne,columnTwo,columnThree testA,one one,aaa testB,two two,bbb testC,"three, three",ccc...
Hello, I love your q package, great idea! Yet, I am trying to process a CSV file where the decimal separator is ',' instead of '.' (my locale is fr_FR)....
Hello, thanks for your time and efforts maintaining q I was hurted by #62 so here is my patch Sorry, it breaks test_one_row_of_data_with_header_param Also does not produce 'Warning - data...
``` $ q "INSERT INTO a VALUES (44, 55)" query error: no such table: a $ q "DELETE FROM a" $ cat a 1 2 3 4 5 6 ```...
Something like that: ``` q "SELECT A,B FROM(-H -d,) qqq.csv WHERE B NOT IN (SELECT c1 FROM(-d@ -c1) lines.txt)" ```