feat(bigquery): Add support for flexible job reservations - #1229
Open
dejii wants to merge 2 commits into
Open
Conversation
This was referenced Jul 25, 2025
dejii
force-pushed
the
feat/bq-flexible-job-reservation
branch
from
July 25, 2025 13:19
cd2ed30 to
d8831f1
Compare
|
Just in case anyone else is anxiously awaiting this to be merged but don't want to bundle this feature branch into prod, you can also monkey-patch this in if you're using the python runner rather than the dbt CLI. This looks like then you can use |
|
I believe this is an incomplete solution. After using this method in production for about a month, it looks like only about half of our dbt query activity in BigQuery is being called with this method and put on the slot reservation. dbt seems to be using another method for a substantial portion of its query activity. |
k-wolski
pushed a commit
to thescalableway/dbt-adapters
that referenced
this pull request
Dec 3, 2025
…DENTIFIERS_IGNORE_CASE (dbt-labs#1229) * Reproduce. Test fail. Fix. Test green. * Add changelog. * Make a test that tests the actual behavior without hardcoding the quoted flag. * I can't believe how elegant a solution this is. Use a session-only configuration. * Fix test. * Simplify logic for this by moving this away from a quoting situation. Columns that unquoted are capitalized regardless of the quoting ignore flag. So we let it be uppercase and then normalize it down to lowercase in Python. * edit comments. --------- Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com>
3 tasks
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #1228
Problem
BigQuery recently introduced the ability to assign reservations at query runtime. Previously, dbt did not expose any way to specify a reservation when submitting a query job.
Solution
This PR adds support for setting the reservation field on a BigQuery job if one is provided in the adapter credentials. The value is optional and does not change default behaviour for existing users.
This unlocks the ability to define multiple targets in
profiles.yml, each configured with a different reservation. This allows teams to route different workloads such as business-critical vs. non-critical jobs to separate slot reservations within the same project.Checklist