我想創建一個閃亮的應用程序,它利用bigrquery連接到BigQuery API並運行查詢。 我使用下面的代碼來執行查詢:在閃亮的應用程序中使用bigrquery auth
library(bigrquery)
project <- "PROJECT_ID" # put your project ID here
sql <- 'QUERY '
test <- query_exec(sql, project = project)
不過在此之前沒有在bigrquery包的認證過程,如:
google <- oauth_endpoint(NULL, "auth", "token",
base_url = "https://accounts.google.com/o/oauth2")
bigqr <- oauth_app("google",
"465736758727.apps.googleusercontent.com",
"fJbIIyoIag0oA6p114lwsV2r")
cred <- oauth2.0_token(google, bigqr,
scope = c(
"https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform"))
我怎麼能在我的應用程序的身份驗證過程集成了
- 過程不需要交互或
- 過程中可與給定的應用程序鍵和祕密s(我在哪裏得到它們? )或
- auth進程在另一個瀏覽器窗口中打開。
問候