如何BigQuery中经由R个
问题描述:
使用standardSQL我想用standardSQL通过R.如何BigQuery中经由R个
library(bigrquery)
sql = paste("#StandardSQL\n SELECT SUM(copies) ",
" FROM `bigquery-public-data.github_repos.sample_contents` ",
" WHERE NOT binary", sep="")
# Execute the query and store the result
sample_contents <- query_exec(sql, project = "###", useLegacySql = NULL)
执行bigquery
但我得到以下错误:
ERROR: Query text specifies use_legacy_sql:false, while API options specify:true
我找不到在哪里设置API选项。
谢谢。
答
而不是useLegacySql = NULL
,请指定false
。您可以跟踪请求以更改this GitHub issue中bigrquery的默认方言。同时,您需要为useLegacySql
设置适当的值。