0

First things first:

  • Operating System: Windows 10
  • R version: 4.2.2

Story I am trying to import data from Google BigQuery to R. I am using bigrquery package. However any operations after creating DBI connection results in the same way - I get error message saying Access Denied.

Here is the code:

# libs
library(bigrquery)
library(DBI)

# connection
con <- dbConnect(
  bigrquery::bigquery(),
  project = "project-nmae",
  dataset = "dataset",
  billing = "project-for_billing"
)

dbListTables(con)

Error I get:

Error in signal_reason(): ! Access Denied: Dataset x:y: Permission bigquery.tables.list denied on >dataset x:y (or it may not exist). [accessDenied]

Problem So OK. I have got multiple google accounts so I would like to force bigrquery to reauthenticate to make sure I am using proper one.

So as described in the documentation I am calling bq_auth(email=NA) and I expect that R should open browser with authentication page but nothing happens. No errors and totally no action.

I have also manually removed all tokens stored by gargle package. When I check tokens using gargle::gargle_oauth_sitrep() I get info that 0 tokens have been found. However it has not helped.

Question Does anyone know how to force bigrquery to reauthenticate and why bq_auth(email = NA) doesn't work?

Adrian Gasiński
  • 23
  • 1
  • 1
  • 4
  • Hi @Adrian Gasinski, Can you provide the full query which you are using to authenticate using bq_auth(email=NA)? You can refer to [link1](https://cloud.google.com/vertex-ai/docs/workbench/user-managed/use-r-bigquery) and [link2](https://github.com/r-dbi/bigrquery) for more information. – Shipra Sarkar Jan 17 '23 at 14:03
  • having this exact issue as well on bigquery 1.4.1 and M1 mac – Ricky Apr 21 '23 at 09:56

0 Answers0