Skip to content

Add reservation DSN param to BigQuery driver#8

Open
junyahondarubrik wants to merge 1 commit intomasterfrom
ubuntu-dsn-reservation-priority
Open

Add reservation DSN param to BigQuery driver#8
junyahondarubrik wants to merge 1 commit intomasterfrom
ubuntu-dsn-reservation-priority

Conversation

@junyahondarubrik
Copy link
Copy Markdown
Collaborator

@junyahondarubrik junyahondarubrik commented Mar 26, 2026

Summary

Why

BQ priority-based resource management (SPARK-755723) uses a 2-reservation-pool
approach where foreground and background queries are routed to separate BigQuery
reservations. This requires the ability to set QueryConfig.Reservation on
BigQuery jobs via the DSN connection string.

What

Add support for a reservation query parameter in the BigQuery DSN URI. When
present, the reservation value is applied to every query executed through the
connection.

How

  • Add reservation field to bigQueryConfig
  • Parse it from DSN query param in configFromUri()
  • Apply it in buildQuery() to set query.Reservation
  • Bump cloud.google.com/go/bigquery from v1.12.0 to v1.68.0 (required for
    the QueryConfig.Reservation field added in v1.68.0)

Example DSN

bigquery://my-project/US/my-dataset?reservation=projects/p/locations/US/reservations/bg

Test Plan

  • Added table-driven unit tests for DSN parsing covering: basic URI, reservation,
    reservation with other params, invalid scheme, missing host
  • All 5 tests pass

Related

  • Depends on: scaledata/sdmain#173378 (BQ client upgrade to v1.68.0 in sdmain)
  • Required by: SPARK-755723 (BQ priority-based resource management)

Parse reservation query parameter from the BigQuery DSN URI and apply it
to queries. This enables job-level reservation routing via the connection
string for the 2-reservation-pool resource management approach.

- Add reservation field to bigQueryConfig
- Parse it from DSN query param in configFromUri()
- Apply it in buildQuery() as query.Reservation
- Bump cloud.google.com/go/bigquery from v1.12.0 to v1.68.0 (required
  for QueryConfig.Reservation field)
- Add table-driven tests for DSN parsing with reservation param
@junyahondarubrik junyahondarubrik force-pushed the ubuntu-dsn-reservation-priority branch from cfbb560 to d1e7c7e Compare March 26, 2026 22:58
@junyahondarubrik junyahondarubrik changed the title Add reservation and priority DSN params to BigQuery driver Add reservation DSN param to BigQuery driver Mar 26, 2026
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.

1 participant