4

bq query has --use_legacy_sql flag that can be set to false to enable standard query.

How to do the same if bq shell is used

I tried below variations and both of those failed with error Unknown command line flag 'use_legacy_sql'.

bq --use_legacy_sql=false shell
bq shell --use_legacy_sql=false
vaichidrewar
  • 9,251
  • 18
  • 72
  • 86

1 Answers1

5

It doesn't look like it's possible currently, so I filed a feature request. The alternative is to pass it to "query" each time, although that feels very verbose. For example:

$ bq shell
myproject> query --use_legacy_sql=false SELECT [1, 2, 3] AS arr
Elliott Brossard
  • 32,095
  • 2
  • 67
  • 99