You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would be interested in running this in batch mode; i.e. specifying the query on stdin or in a file. I could then make csv-sql part of shell pipelines and run it in continuous integration.
Something like this syntax comes to mind:
$ echo'.export(results.csv) SELECT COUNT(*) from t;'| csvsql file.csv
Alternatively, reading the query from a file would also be useful:
I think what I'd go with is --query which takes a SQL string (not a path to a file). One can easily specify do csvsql file.csv --query $(cat foo.sql) then.
Thanks for this project; very useful.
I would be interested in running this in batch mode; i.e. specifying the query on
stdin
or in a file. I could then makecsv-sql
part of shell pipelines and run it in continuous integration.Something like this syntax comes to mind:
Alternatively, reading the query from a file would also be useful:
If
--load-query-from
would accept-
as a symbol forstdin
, the line would look like this:Personally, the first option (read query from
stdin
if it's not a TTY) would be my preference.The text was updated successfully, but these errors were encountered: