Skip to content

Add BigQuery reservation configuration#2096

Merged
kolina merged 12 commits intodataform-co:mainfrom
max-ostapenko:witty-lynx
Mar 7, 2026
Merged

Add BigQuery reservation configuration#2096
kolina merged 12 commits intodataform-co:mainfrom
max-ostapenko:witty-lynx

Conversation

@max-ostapenko
Copy link
Contributor

@max-ostapenko max-ostapenko commented Feb 24, 2026

This pull request introduces support for specifying BigQuery reservations at both the project and action level, allowing more granular control over query resource allocation. The changes span CLI flags, project configuration, action builders, and test coverage to ensure correct application and precedence of reservation settings.

BigQuery reservation support:

  • Added a new --default-reservation CLI flag and corresponding defaultReservation project config option, enabling users to set a default BigQuery reservation for all actions in a project.
  • Updated IBigQueryExecutionOptions and BigQueryDbAdapter to accept and propagate a reservation parameter, ensuring reservation information is passed through to BigQuery job execution.

Action-level reservation configuration:

  • Extended action builders (Assertion, Table, IncrementalTable, Operation, View) to support an optional reservation config property, storing it in the action descriptor for runtime precedence over project-level reservations.

Test coverage and validation:

  • Added and updated tests to verify correct application of project-level and action-level reservations, including precedence rules and propagation to compiled outputs.

Project configuration precedence:

  • Ensured that action-level reservation overrides the project-level defaultReservation at runtime, with tests confirming the correct behavior.

These changes provide users with flexible reservation management for Dataform workload.

Related to #1981

@max-ostapenko max-ostapenko requested a review from a team as a code owner February 24, 2026 21:13
@max-ostapenko max-ostapenko requested review from Ceridan and removed request for a team February 24, 2026 21:13
@kolina kolina requested review from kolina and removed request for Ceridan March 2, 2026 20:05
@kolina
Copy link
Contributor

kolina commented Mar 2, 2026

/gcbrun

@max-ostapenko
Copy link
Contributor Author

@kolina there were some disable-assertions tests failing in main, so they were inherited here.
Or I didn't understand how to run tests properly...

Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
@kolina
Copy link
Contributor

kolina commented Mar 2, 2026

/gcbrun

…urations, protos, and related code

Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
… config assertions

Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
@kolina
Copy link
Contributor

kolina commented Mar 5, 2026

/gcbrun


// Optional. The default BigQuery reservation to use for execution.
// If unset, default BigQuery behavior applies.
string default_reservation = 14;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add a comment that it'll be supported by the Dataform CLI only for now (support in GCP Dataform will require about to the GCP Dataform executor to use this value), same for action fields below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😔
So cloud Dataform executor has its own version of cli/api/dbadapters/bigquery.ts?
Then all the action reservation attributes will not impact anything in GCP Dataform.

How often does it catch up?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the GCP Dataform executor is different.

We were planning to implement it later this year (Q2-Q3 timeframe), we may do it sooner taking your contribution.

@kolina
Copy link
Contributor

kolina commented Mar 7, 2026

/gcbrun


// Optional. The default BigQuery reservation to use for execution.
// If unset, default BigQuery behavior applies.
string default_reservation = 14;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the GCP Dataform executor is different.

We were planning to implement it later this year (Q2-Q3 timeframe), we may do it sooner taking your contribution.

@kolina kolina merged commit 9f99149 into dataform-co:main Mar 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants