I have a BigQuery table connected to a Google Sheet located in my google Drive. I can query the table on BigQuery but I can't access it with Metabase. I get this error message when trying:
Access Denied: BigQuery BigQuery: Permission denied while getting Drive credentials.
I have added my service account email to the Google sheet as editor, but it still doesn't work. It seems like I need to add some additional rights to my service account but I can't figure out how to do it.
Thanks @flamber for your reply. I had a look a the workaround you mentioned. I have enabled the Google Drive API in my project but It still doesn't work.
It seems like I can't enable the Google Workspace Domain-wide Delegation. I get an error when trying to do so:
The request has been classified as abusive and was not allowed to proceed
Moreover, I don't see how I can add scopes to an existing service account using google cloud console.
@jsaadani The workaround I posted is for the old OAuth, not Service Accounts. But I guess it doesn't work then, and then you'll have to wait until the issue is fixed or try to find another workaround.
i'm still getting a 403 with a service account + sharing permissions + json file. the git thread looks to have not been updated in a bit. could you please advise?
Hi All
I'm facing the same problem. My Metabase version is 0.44. 3 the latest.
I have a BigQuery table connected to a Google Sheet located in my google Drive as well. I can query the table on BigQuery. then success to add Bigquery database to Metabase, No error message during connecting the bigquery to metabase. However when I try to add question, only the database from bigquery name appears with not any single table to access.
I try to check the metabase log and find word bigquery this is what I found :
[eab1e4d9-e2a1-4b82-b562-c888bc00e8f3] 2022-09-28T08:41:11+07:00 ERROR metabase.driver.bigquery-cloud-sdk Exception caught in :bigquery-cloud-sdk can-connect?
com.google.cloud.bigquery.BigQueryException: java.lang.InterruptedException
at com.google.cloud.bigquery.BigQueryException.translateAndThrow(BigQueryException.java:122)
at com.google.cloud.bigquery.BigQueryImpl.listDatasets(BigQueryImpl.java:475)
at com.google.cloud.bigquery.BigQueryImpl.listDatasets(BigQueryImpl.java:441)
at metabase.driver.bigquery_cloud_sdk$list_tables.invokeStatic(bigquery_cloud_sdk.clj:67)
at metabase.driver.bigquery_cloud_sdk$list_tables.invoke(bigquery_cloud_sdk.clj:56)
at metabase.driver.bigquery_cloud_sdk$list_tables.invokeStatic(bigquery_cloud_sdk.clj:61)
at metabase.driver.bigquery_cloud_sdk$list_tables.invoke(bigquery_cloud_sdk.clj:56)
at metabase.driver.bigquery_cloud_sdk$fn__82510.invokeStatic(bigquery_cloud_sdk.clj:96)
at metabase.driver.bigquery_cloud_sdk$fn__82510.invoke(bigquery_cloud_sdk.clj:93)
at clojure.lang.MultiFn.invoke(MultiFn.java:234)
at metabase.driver.util$can_connect_with_details_QMARK_$fn__33135.invoke(util.clj:138)
What is the problem and what is the solution?
Thank you for all your attention and help
@flamber
Thank you for your quick response.
Do you have any special trouble shooting guide that spesific for bigquery table. because the reference you gave is not specific for bigquery
@taufik When Metabase cannot see a table, then it's usually a permission problem, which is similar for most databases.
Run a SQL query in Metabase against select * from `dataset.table` limit 1
Check the logs during sync, just like the troubleshooting also says.
@flamber
thank you very much for your answer..
after I try your advise, now I get error message :
403 Forbidden POST https://www.googleapis.com/bigquery/v2/projects/bifbi-humantechno/queries { "code" : 403, "errors" : [ { "domain" : "global", "message" : "Access Denied: Project bifbi-humantechno: User does not have bigquery.jobs.create permission in project bifbi-humantechno.", "reason" : "accessDenied" } ], "message" : "Access Denied: Project bifbi-humantechno: User does not have bigquery.jobs.create permission in project bifbi-humantechno.", "status" : "PERMISSION_DENIED" }
@flamber
Try creating new service in metabase? or in bigquery
do you think i have to setup new metabase with gmail email instead of my company email? since bigquery can't give permission to company email ?
@taufik You are misunderstanding how permissions works on BigQuery. A "Service Account" is the credentials used to connect to BigQuery https://cloud.google.com/bigquery/docs/authentication
Contact the person who managed your BigQuery and ask them for help.
Your login on Metabase has no influence on database connection credentials.
@Flamber
Thank you very much for your guidance.
Now I have success to read the table from bigquery.
I'm really satisfied that very easy to work from excel sheet to bigquery to Metabase.
Really grateful and enjoy exploring the new version of metabase that I just upgraded.