Skip to content

Conversation

luispedroemg
Copy link

@luispedroemg luispedroemg commented Aug 29, 2025

resolves dbt-labs/dbt-bigquery#358
docs dbt-labs/docs.getdbt.com/#

Related PR: #1045

Note: Even though issue dbt-labs/dbt-bigquery#358 has been marked as resolved, it is only partially resolved. PR #1045 added the api_endpoint config, but in order to use (at least some) of the bigquery emulators, we need to be able to use Anonymous credentials.

Problem

BigQuery users need a way to connect without credentials (e.g., BigQuery emulator or public/read-only endpoints). Today, dbt-bigquery requires an authenticated method, which blocks these scenarios.

Solution

Add a new connection method, ANONYMOUS, to BigQueryConnectionMethod.
When method=anonymous, create google.auth.credentials.AnonymousCredentials.
Add a unit test that validates the anonymous config and connection acquisition.
No changes to default behavior; this is opt-in and limited to the BigQuery adapter.

This in conjunction with #1045, will allow users to setup dbt to connect to an emulator like https://github.com/goccy/bigquery-emulator

Alternatives Considered

  • Implicitly falling back to anonymous when no credentials are provided (risk of surprising behavior).
  • Adding flags to oauth or service-account methods (less clear than an explicit method).

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

Note: This introduces a new profile method value: "anonymous"

…tials\n\n- Add BigQueryConnectionMethod.ANONYMOUS\n- Create AnonymousCredentials when method is anonymous\n- Add unit test covering anonymous config validation and open behavior\n\nRefs: CONTRIBUTING guidelines; tests pass via hatch unit-tests
Copy link

cla-bot bot commented Aug 29, 2025

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @luispedroemg

@cla-bot cla-bot bot added the cla:yes The PR author has signed the CLA label Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes The PR author has signed the CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-1391] [Feature] Add support for BigQuery emulator
1 participant