is it possible to set a custom reservation(other than project reservation) ex: if i have a MV in project A , is it possible to make use of slots from Project from B for this MV refresh jobs?
Solved! Go to Solution.
While it's possible to share BigQuery slots from Project B with Project A for various jobs and queries, directly controlling the reservation used for the automatic refreshes of materialized views managed by BigQuery is not straightforward. By default, automatic refreshes rely on the project's default reservation settings or fall back on on-demand slots if necessary.
For those requiring specific control over the reservation usage for MV refreshes, the following methods offer a workaround:
REFRESH MATERIALIZED VIEW
SQL statement to manually refresh your MV.REFRESH MATERIALIZED VIEW
statement according to your preferred schedule.bigquery.resourceUser
role on the reservation in Project B. This grants them the necessary permissions to use the reserved slots.Yes, it is possible to utilize BigQuery slots from Project B to refresh a materialized view (MV) in Project A, as long as the appropriate permissions and configurations are in place. Here's a possible solution:
Step 1: Create a Reservation in Project B
project-b-shared
) to aid in tracking and management.Step 2: Grant IAM Permissions
roles/bigquery.resourceUser
role to the relevant entities in Project A. This authorizes them to use the shared reservation.Step 3: Configure Jobs in Project A
Key Considerations
Thanks for the detailed explanation. This works for manual refresh. But how can we make use of reserved slots in case of automatic refreshing enabled?
While it's possible to share BigQuery slots from Project B with Project A for various jobs and queries, directly controlling the reservation used for the automatic refreshes of materialized views managed by BigQuery is not straightforward. By default, automatic refreshes rely on the project's default reservation settings or fall back on on-demand slots if necessary.
For those requiring specific control over the reservation usage for MV refreshes, the following methods offer a workaround:
REFRESH MATERIALIZED VIEW
SQL statement to manually refresh your MV.REFRESH MATERIALIZED VIEW
statement according to your preferred schedule.bigquery.resourceUser
role on the reservation in Project B. This grants them the necessary permissions to use the reserved slots.