Bigquery can only handle legacy SQL
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'`, https://github.com/tpope/vim-dadbod/blob/e95afed23712f969f83b4857a24cf9d59114c2e6/autoload/db/adapter/bigquery.vim#L25
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'`
Please see below comparisons

<<=============**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.

1 条评论