Skip to content

feat: Add ability to change client project_id#20767

Merged
kodiakhq[bot] merged 3 commits intomainfrom
feature/eng-1182-bug-bigquery-destination-job-creation-permission-error
May 15, 2025
Merged

feat: Add ability to change client project_id#20767
kodiakhq[bot] merged 3 commits intomainfrom
feature/eng-1182-bug-bigquery-destination-job-creation-permission-error

Conversation

@przste-go
Copy link
Copy Markdown

Summary

⚠️ If you're contributing to a plugin please read this section of the contribution guidelines 🧑‍🎓 before submitting this PR ⚠️

In some scenarios users want to execute queries in context of different project than referenced in the query itself. I.e executing pricinipal has permissions to access table in project B only when executing within context of project A. This wasn't possible using only project_id spec. Now default project for execution can also be fetched from the environment/credentials by using *detect-project-id* variable.

@cq-bot
Copy link
Copy Markdown
Contributor

cq-bot commented May 15, 2025

@przste-go przste-go force-pushed the feature/eng-1182-bug-bigquery-destination-job-creation-permission-error branch from 4284ba1 to 47d0833 Compare May 15, 2025 08:21
@maaarcelino
Copy link
Copy Markdown
Contributor

maaarcelino commented May 15, 2025

Can you please add docs for this to docs/_configuration.md including an example usage of *detect-project-id*?

@przste-go przste-go added the automerge Automatically merge once required checks pass label May 15, 2025
@kodiakhq kodiakhq bot merged commit 8b9eb98 into main May 15, 2025
17 checks passed
@kodiakhq kodiakhq bot deleted the feature/eng-1182-bug-bigquery-destination-job-creation-permission-error branch May 15, 2025 08:49
* `DATASET_ID` - The Google Cloud BigQuery Dataset ID

`client_project_id` variable can be used to run BigQuery queries in a project different from where the destination table is located.
If you set client_project_id to `*detect-project-id*`, it will automatically detect the project ID from the environment variable or application default credentials. No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@przste-go why not set the default to this? 🤔

Copy link
Copy Markdown
Author

@przste-go przste-go May 15, 2025

Choose a reason for hiding this comment

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

Because that'd change previous behaviour. I.e I'm logged to gcp using user principal which doesn't have project_id set, that'd cause plugin to start failing. Now it is backwards compatible with an option to reconfigure that in spec.

kodiakhq bot pushed a commit that referenced this pull request May 15, 2025
🤖 I have created a release *beep* *boop*
---


## [4.3.0](plugins-destination-bigquery-v4.2.18...plugins-destination-bigquery-v4.3.0) (2025-05-15)


### Features

* Add ability to change client project_id ([#20767](#20767)) ([8b9eb98](8b9eb98))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/plugin/destination/bigquery automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants