0

我想bigquery通过 R 使用标准 SQL执行。

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)

但我得到以下错误:

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

我找不到在哪里设置 API 选项。

谢谢你。

4

1 回答 1

0

而不是useLegacySql = NULL,指定false您可以在此 GitHub 问题中跟踪更改 bigrquery 的默认方言的请求。同时,您需要为 设置适当的值useLegacySql

于 2017-05-19T04:05:06.180 回答