In datalab I'm using the datalab.bigquery module. I'd like to set the default dialect to SQL.
I tried the following but it didn't work.
import datalab.bigquery as datalab_bq
dialect=datalab_bq.Dialect.default()
dialect.set_bq_dialect('sql')
But it doesn't seem to have changed the dialect.
You can use the global
set_datalab_bq_dialect
method to set the dialect, it accepts eitherstandard
orlegacy
.Please note that Datalab is moving away from supporting the
datalab
package in favor of the newgoogle.datalab
package, which only supports standard BigQuery dialect and does not use this global method.