Query text specifies use_legacy_sql:false, while API options specify:true

3.1k views Asked by At

I'm using standardSQL with bigrquery:

library(bigrquery)
project <- "</project-name>"


sql <- "
#standardSQL
SELECT
</sql-query>;"


result <- query_exec(sql, project = project, useLegacySql = FALSE)

When I run the R script I get the following error:

 "Error: Query text specifies use_legacy_sql:false, while API options specify:true"

Any ideas what might be going on here?

2

There are 2 answers

0
Graham Polley On

I think it's use_legacy_sql = FALSE (note the underscores, not camelcase)

See here.

1
Kostyantyn Yakymyshyn On

You just need to uncheck of "use legacy sql" at the "hide options". Here is the screenshot:

enter image description here