I had a reservation that I use for a current pipeline job and for feed one Metabase. I want to create a new reservation in this project to point out all these queries from Metabase, but I can't find how to set this like in the docs below. I'd like to know if it is possible or if I need to create a new project with a new reservation to get the role bigquery.jobs and run all the queries from this new project.
Solved! Go to Solution.
Yes, you can create a new project with a new reservation and use it to run Metabase queries, even if the old project has another reservation.
To do this, you will need to:
Once you have done this, all Metabase queries will be run using the new reservation in the new project.
Here is a step-by-step guide:
Go to the IAM & Admin page in the Google Cloud Platform Console.
Click Create Service Account.
Enter a name and description for the service account.
Select the BigQuery Data Viewer and BigQuery Job User roles.
Click Create.
Click Create Key and select JSON as the key type.
Click Create.
Download the JSON key file and save it to a secure location.
Go to the Metabase Admin page.
Click + Add Database.
Select BigQuery as the database type.
Enter the following information:
Click Save.
Now, when you run a Metabase query, it will use the new reservation in the new project.
Note: If you have any existing Metabase queries that are pointing to the old reservation, you will need to update them to point to the new reservation. To do this, go to the query settings and select the new reservation from the Reservation drop-down menu.
To point a job in BigQuery to a specific reservation, you need to create an assignment between the project or folder that contains the job and the reservation.
Steps:
Once you have created an assignment, all jobs of the selected job type that are started from the project or folder will use the specified reservation.
To point all the queries from Metabase to a new reservation in the same project, you can follow these steps:
Additional tips:
So if I create a new project with a new reservation and insert in Metabase a service account with a Data Viewer role in the old project and jobsUser role in the new project can I run queries in Metabase and use this new reservation even if the old project has another reservation?
Yes, you can create a new project with a new reservation and use it to run Metabase queries, even if the old project has another reservation.
To do this, you will need to:
Once you have done this, all Metabase queries will be run using the new reservation in the new project.
Here is a step-by-step guide:
Go to the IAM & Admin page in the Google Cloud Platform Console.
Click Create Service Account.
Enter a name and description for the service account.
Select the BigQuery Data Viewer and BigQuery Job User roles.
Click Create.
Click Create Key and select JSON as the key type.
Click Create.
Download the JSON key file and save it to a secure location.
Go to the Metabase Admin page.
Click + Add Database.
Select BigQuery as the database type.
Enter the following information:
Click Save.
Now, when you run a Metabase query, it will use the new reservation in the new project.
Note: If you have any existing Metabase queries that are pointing to the old reservation, you will need to update them to point to the new reservation. To do this, go to the query settings and select the new reservation from the Reservation drop-down menu.