0

I am trying to run a simple query using the below query:

SELECT *
FROM `mytable`

Before I run the query I get this error: Access Denied: BigQuery BigQuery: Permission denied while getting Drive credentials.

I have BigQuery Data Viewer and Data Editor role for that table.

enter image description here

Sana
  • 463
  • 2
  • 4
  • 22
  • This may be a duplicate ... see if this helps ... https://stackoverflow.com/questions/68064592/bigquery-permission-denied-while-getting-drive-credentials-unable-to-resolve – Kolban Oct 24 '22 at 16:56

2 Answers2

1

The table you are querying is an reference to an External Drive file. You will also need to give the BigQuery account you are using access to Google Drive

Drive permissions At a minimum, to query external data in Drive you must be granted View access to the Drive file linked to the external table.

Daryl Wenman-Bateson
  • 3,870
  • 1
  • 20
  • 37
0

I just realized that I was querying a table that is created from google sheets. That google sheet was not shared with me therefore I was not able to query it however the table was in a project and dataset to which I had data viewer and editor access.

Sana
  • 463
  • 2
  • 4
  • 22