1
我已經能夠使用與服務帳戶關聯的json文件使用googleAuth
和bigQueryR
進行身份驗證。如何使用服務帳戶和bigrquery包進行身份驗證?
# 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
我所遇到在互聯網上提出代替bigrquery
使用 bigQueryR
包中的資源。
例如這個相關的stackoverflow問題: Use bigrquery auth in shiny application。
但我需要的功能只在bigrquery
。