Skip to content

impl(bigquery): support default project_id on ClientBuilder - #6293

Merged
haphungw merged 2 commits into
googleapis:mainfrom
haphungw:feat-bq-client-project-id
Aug 7, 2026
Merged

impl(bigquery): support default project_id on ClientBuilder#6293
haphungw merged 2 commits into
googleapis:mainfrom
haphungw:feat-bq-client-project-id

Conversation

@haphungw

@haphungw haphungw commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Add support for configuring a default GCP project_id on ClientBuilder, which is stored on the BigQuery client and automatically used as the billing project when running queries or attaching to jobs.

For #6198

@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the BigQuery API. label Aug 5, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for configuring a default Google Cloud project ID on the BigQuery client using the builder pattern, which is then automatically applied to executed queries. The feedback identifies a compilation error in BigQuery::query where a &String is passed to a method expecting Into<String>, and suggests using .as_str() to resolve the trait bound issue.

Comment thread src/bigquery/src/client.rs Outdated
@haphungw
haphungw force-pushed the feat-bq-client-project-id branch 2 times, most recently from 502a514 to 86fb162 Compare August 5, 2026 21:34
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.26%. Comparing base (2a8ee0c) to head (69e486f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6293   +/-   ##
=======================================
  Coverage   96.25%   96.26%           
=======================================
  Files         283      283           
  Lines       72936    72982   +46     
=======================================
+ Hits        70203    70253   +50     
+ Misses       2733     2729    -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@haphungw
haphungw force-pushed the feat-bq-client-project-id branch from 86fb162 to d43440a Compare August 5, 2026 21:54
@haphungw
haphungw marked this pull request as ready for review August 5, 2026 21:54
@haphungw
haphungw requested a review from a team as a code owner August 5, 2026 21:54
Comment thread src/bigquery/src/client.rs Outdated

@alvarowolfx alvarowolfx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can add a example section on the new with_project_id method.

Comment thread src/bigquery/src/client_builder.rs
@haphungw
haphungw enabled auto-merge (squash) August 6, 2026 18:35
@haphungw
haphungw force-pushed the feat-bq-client-project-id branch from 1c22312 to eba0005 Compare August 6, 2026 19:19
@haphungw
haphungw disabled auto-merge August 7, 2026 15:58
@haphungw
haphungw force-pushed the feat-bq-client-project-id branch from eba0005 to 69e486f Compare August 7, 2026 17:18
@haphungw
haphungw merged commit e71018a into googleapis:main Aug 7, 2026
41 checks passed
@haphungw
haphungw deleted the feat-bq-client-project-id branch August 7, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants