4 ms·
Hi cube2222! Just today I tried octosql for the first time when I wanted to correlate a handful of CSV files based on identifiers present in roughly equal form
by aargh_aargh 4y ago
Hi cube2222!
Just today I tried octosql for the first time when I wanted to correlate a handful of CSV files based on identifiers present in roughly equal form. Great idea but I immediately ran into many rough edges in what I think was a simple use case. Here are my random observations.
Missing FULL JOIN (this was a dealbreaker for me). LEFT/RIGHT join gave me "panic: implement me".
It took me a while to figure out how to quote CSV column names with non-ASCII characters and spaces. It's not documented as far as I've seen (please document quoting rules). This worked:
octosql 'SELECT `tablename.Mötley Crüe` FROM tablename.csv'
replace() is documented [1] as replace(old, new, text) but actually is replace(text, old, new) just like in postgres and mysql.
index() is documented [1] as index(substring, text)
(postgresql equivalent: position ( substring text IN string text ) → integer)
octosql "SELECT index('y', 'Mötley Crüe')"
Error: couldn't parse query: invalid argument syntax error at position 13 near 'index'
octosql "SELECT index('Mötley Crüe', 'y')"
Error: couldn't parse query: invalid argument syntax error at position 13 near 'index'
Hope this helps and I wish you all the best.
[1] https://github.com/cube2222/octosql/wiki/Function-Documentation#replace https://github.com/cube2222/octosql/wiki/Function-Documentat...
- cube2222 4y agoHey! Thanks a lot for this writeup! > but I immediately ran into many rough edges OctoSQL is definitely not in a stable state yet, so depending on the use case, there definitely are rough edges and occasional regressions. > Missing FULL JOIN (this was a dealbreaker for me). LEFT/RIGHT join gave me "panic: implement me". Indeed, right now only inner join is implemented. The others should be available soon. > replace() is documented [1] as replace(old, new, text) but actually is replace(text, old, new) just like in postgres and mysql. index() is documented [1] as index(substring, text) I've removed the offending docs pages, they were documenting a very old version of OctoSQL. The way to browse the available functions right now is built-in to OctoSQL: octosql "SELECT * FROM docs.functions" > invalid argument syntax error at position 13 near 'index' Looks like a parser issue which I can indeed replicate, will look into it. Thanks again, cheers!
- cube2222 4y agoJust to update this response, I've just released a new version that contains a new `position` function, as well as the capability to execute SELECT statements without a FROM part. So i.e. the above octosql "SELECT position('hello', 'ello')"
- cube2222 4y agoTo add another update here: left, right and outer joins have been added.