From 88461b508d23c8766e9a04c6c1d32580a6c21675 Mon Sep 17 00:00:00 2001 From: FAQ Bot Date: Mon, 4 May 2026 14:51:04 +0000 Subject: [PATCH 1/2] NEW: How do I authenticate dbt with BigQuery when service account key creatio --- .../066_5b755bf0f5_dbt-bigquery-oauth-auth.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 _questions/data-engineering-zoomcamp/module-4/066_5b755bf0f5_dbt-bigquery-oauth-auth.md diff --git a/_questions/data-engineering-zoomcamp/module-4/066_5b755bf0f5_dbt-bigquery-oauth-auth.md b/_questions/data-engineering-zoomcamp/module-4/066_5b755bf0f5_dbt-bigquery-oauth-auth.md new file mode 100644 index 00000000..2d8320cb --- /dev/null +++ b/_questions/data-engineering-zoomcamp/module-4/066_5b755bf0f5_dbt-bigquery-oauth-auth.md @@ -0,0 +1,54 @@ +--- +id: 5b755bf0f5 +question: How do I authenticate dbt with BigQuery when service account key creation + is disabled and switch to OAuth? +sort_order: 66 +--- + +When running dbt debug with BigQuery, authentication issues can occur if your dbt profile uses method: service-account but Google Cloud enforces iam.disableServiceAccountKeyCreation. In that case, use Google Application Default Credentials / OAuth instead. + +Update profiles.yml from: + +``` +method: service-account +keyfile: "{{ env_var('GOOGLE_APPLICATION_CREDENTIALS') }}" +``` + +to: + +``` +method: oauth +``` + +Example BigQuery profile: + +``` +default: + target: dev + outputs: + dev: + type: bigquery + method: oauth + project: "{{ env_var('GCP_PROJECT_ID') }}" + dataset: "{{ env_var('BIGQUERY_DATASET_GOLD') }}" + threads: 4 + location: "{{ env_var('GCP_REGION', 'europe-west2') }}" + priority: interactive +``` + +Then authenticate locally: + +``` +gcloud auth login +gcloud auth application-default login + +gcloud config set project + +gcloud auth application-default set-quota-project +``` + +Finally test: + +``` +dbt debug +``` \ No newline at end of file From fb5051f0963f68ed0d7b649b5eb34fbb5246f367 Mon Sep 17 00:00:00 2001 From: Alexey Grigorev Date: Tue, 12 May 2026 14:46:40 +0200 Subject: [PATCH 2/2] Fix sort_order conflict: rename to 067 --- ...-oauth-auth.md => 067_5b755bf0f5_dbt-bigquery-oauth-auth.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename _questions/data-engineering-zoomcamp/module-4/{066_5b755bf0f5_dbt-bigquery-oauth-auth.md => 067_5b755bf0f5_dbt-bigquery-oauth-auth.md} (98%) diff --git a/_questions/data-engineering-zoomcamp/module-4/066_5b755bf0f5_dbt-bigquery-oauth-auth.md b/_questions/data-engineering-zoomcamp/module-4/067_5b755bf0f5_dbt-bigquery-oauth-auth.md similarity index 98% rename from _questions/data-engineering-zoomcamp/module-4/066_5b755bf0f5_dbt-bigquery-oauth-auth.md rename to _questions/data-engineering-zoomcamp/module-4/067_5b755bf0f5_dbt-bigquery-oauth-auth.md index 2d8320cb..a175e6a7 100644 --- a/_questions/data-engineering-zoomcamp/module-4/066_5b755bf0f5_dbt-bigquery-oauth-auth.md +++ b/_questions/data-engineering-zoomcamp/module-4/067_5b755bf0f5_dbt-bigquery-oauth-auth.md @@ -2,7 +2,7 @@ id: 5b755bf0f5 question: How do I authenticate dbt with BigQuery when service account key creation is disabled and switch to OAuth? -sort_order: 66 +sort_order: 67 --- When running dbt debug with BigQuery, authentication issues can occur if your dbt profile uses method: service-account but Google Cloud enforces iam.disableServiceAccountKeyCreation. In that case, use Google Application Default Credentials / OAuth instead.