【发布时间】:2017-07-13 14:29:18
【问题描述】:
我已经能够使用与 googleAuth 和 bigQueryR 的服务帐户关联的 json 文件进行身份验证。
# Load Packages
global.packages <- c("bigQueryR", "googleAuthR")
### Apply require on the list of packages; load them quietly
lapply(global.packages, require, character.only = TRUE, quietly = TRUE)
Sys.setenv("GCS_AUTH_FILE" = "json_file_location")
#Authenticate Google BQ
googleAuthR::gar_attach_auto_auth("https://www.googleapis.com/auth/bigquery",
environment_var = "GCS_AUTH_FILE")
这行得通,我可以开始使用来自bigQueryR 的函数。
现在假设我仅限于 bigrquery 包,我如何使用服务帐户和这个包进行身份验证?
我查看了这里的文档无济于事: https://cran.r-project.org/web/packages/bigrquery/bigrquery.pdf
我在互联网上遇到的资源建议使用
bigQueryR 包代替 bigrquery。
例如这个相关的 stackoverflow 问题: Use bigrquery auth in shiny application.
但我需要仅在 bigrquery 中可用的功能。
【问题讨论】:
标签: r authentication server google-bigquery