Knowledge Drop

Access Denied: BigQuery BigQuery: Permission denied while getting Drive credentials

  • 7 May 2021
  • 7 replies
  • 11057 views

Userlevel 5

Last tested: Jan 20, 2021

If you're seeing this error, check to see if the table that is being queried is a google sheet that's stored in Drive.

If that's the case, make sure that the Service Account for BQ that Looker is using has access to the Drive.

 

This content is subject to limited support.                

 

 

 


7 replies

How to give this access,

i am facing the same issue “Permission denied while getting Drive credentials.”

my both spreadsheet and bigquery is in same account but i dont know how to provide access

How to give this access,

i am facing the same issue “Permission denied while getting Drive credentials.”

my both spreadsheet and bigquery is in same account but i dont know how to provide access

Did You find the answer? I am having the same issue.

I am facing the same issue here

I fix this issue by creating a new tabel and query the old tabel and insert the results in to my new tabel and use the new tabel. 

 

 

I fix this issue by creating a new tabel and query the old tabel and insert the results in to my new tabel and use the new tabel. 

 

 

can you please explain how did you do that?

 

I fix this issue by creating a new tabel and query the old tabel and insert the results in to my new tabel and use the new tabel. 

 

 

can you please explain how did you do that?

 

you can run a scheduled query daily/hourly etc. and use something with the following structure 

create table database.new_table as select * from database.old_table

then just schedule that query to run however often you want the data updated and then just create a view from your new_table

instead making a new table, you can try this: service_account.Credentials.from_service_account_info(json_file,scopes = ['https://www.googleapis.com/auth/cloud-platform',            
                                                                                       "https://www.googleapis.com/auth/drive",
                                                                                       "https://www.googleapis.com/auth/bigquery",])

Reply