Our Posit Workbench is installed in a VM in GCP. I am trying to connect to BigQuery from Workbench but have not been successful so far. I was connecting via the following method:
library(bigrquery)
library(DBI)
con <- dbConnect(
bigrquery::bigquery(),
project = "my_project",
dataset = "my_dataset",
billing = "my_project"
)
dbListTables(con)
The connection works smoothly from my local RStudio IDE. But when it comes to Workbench, I keep getting the following error.
<error/bigrquery_accessDenied>
Error in `bq_post()`:
! Access Denied: Project my_project: User does not have bigquery.jobs.create permission in project
gcp-gu-enterprise-dw-integ-prd. [accessDenied]
---
Backtrace:
▆
1. ├─dbGetQuery(con, sql) %>% clean_names()
2. ├─janitor::clean_names(.)
3. ├─DBI::dbGetQuery(con, sql)
4. └─DBI::dbGetQuery(con, sql)
5. └─DBI (local) .local(conn, statement, ...)
6. ├─DBI::dbSendQuery(conn, statement, ...)
7. └─bigrquery::dbSendQuery(conn, statement, ...)
8. └─bigrquery (local) .local(conn, statement, ...)
9. └─bigrquery:::BigQueryResult(...)
10. └─bigrquery::bq_perform_query(...)
11. └─bigrquery:::bq_post(url, body = bq_body(body, ...), query = list(fields = "jobReference"))
12. └─bigrquery:::process_request(req)
13. └─bigrquery:::bq_check_response(...)
14. └─bigrquery:::gargle_abort(...)
15. └─cli::cli_abort(message, class = class, call = call)
16. └─rlang::abort(...)
Would really appreciate your thoughts/ideas on this.