-
-
Notifications
You must be signed in to change notification settings - Fork 156
Description
Bigquery now is mainly non-legacy SQL, so it should include --use_legacy_sql=false parameter (https://cloud.google.com/bigquery/docs/bq-command-line-tool).
my current url is bigquery:?project_id=xxx&dataset_id=xxxx&use_legacy_sql=false
currently, dadbod wrap the final command as
bq --project_id=xxx --dataset_id=xxxx --use_legacy_sql=false query 'actual SELECT clause',
| return cmd + [a:subcmd] |
but this will throw an error: FATAL Command 'use_legacy_sql=false' unknown.
According to the official document above, the bq command should be with query together and then other parameters, like
bq query --project_id=xxx --use_legacy_sql=false 'actual SELECT'
<<=============Edit=================>>
https://cloud.google.com/bigquery/docs/bq-command-line-tool#positioning_flags_and_arguments
For bq command, there are global flags and command-specific flags.
--use_legacy_sql=false is command-specific flag (for query command) so it should be put after query command.

