From 9953c3767d05f5859b50cd7f84645990f6595fa3 Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 18 Dec 2024 20:15:43 +0000 Subject: [PATCH] Added docs for quota project (#6054) ## What are you changing in this pull request and why? References dbt-labs/dbt-bigquery#1343 dbt-labs/dbt-bigquery#1344 Adding docs to detail changes in PR dbt-labs/dbt-bigquery#1345 This adds detail about how to override the `quota_project` through the dbt profile. It also updates the information regarding the execution project. I believe that the execution project just sets where the BQ job is created and doesn't actually impact where it's billed from (I could be wrong on this, but from my testing I can see that the quota project is set from the environment not from the execution project override currently detailed in the docs). ## Checklist - [x] I have reviewed the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. - [ ] The topic I'm writing about is for specific dbt version(s) and I have versioned it according to the [version a whole page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version) and/or [version a block of content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content) guidelines. - [ ] I have added checklist item(s) to this list for anything anything that needs to happen before this PR is merged, such as "needs technical review" or "change base branch." --------- Co-authored-by: Leona B. Campbell <3880403+runleonarun@users.noreply.github.com> Co-authored-by: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> --- .../connect-data-platform/bigquery-setup.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/website/docs/docs/core/connect-data-platform/bigquery-setup.md b/website/docs/docs/core/connect-data-platform/bigquery-setup.md index 8b1867ef620..bfa99f21a6d 100644 --- a/website/docs/docs/core/connect-data-platform/bigquery-setup.md +++ b/website/docs/docs/core/connect-data-platform/bigquery-setup.md @@ -388,6 +388,28 @@ my-profile: execution_project: buck-stops-here-456 ``` +### Quota project + +By default, dbt will use the `quota_project_id` set within the credentials of the account you are using to authenticate to BigQuery. + +Optionally, you may specify `quota_project` to bill for query execution instead of the default quota project specified for the account from the environment. + +This can sometimes be required when impersonating service accounts that do not have the BigQuery API enabled within the project in which they are defined. Without overriding the quota project, it will fail to connect. + +If you choose to set a quota project, the account you use to authenticate must have the `Service Usage Consumer` role on that project. + +```yaml +my-profile: + target: dev + outputs: + dev: + type: bigquery + method: oauth + project: abc-123 + dataset: my_dataset + quota_project: my-bq-quota-project +``` + ### Running Python models on Dataproc import BigQueryDataproc from '/snippets/_bigquery-dataproc.md';