I use dbt BigQuery, I use the regular process of using a Service Account JSON file to establish the connection. I don’t seem to find a way to connect by using GCP Workload Identity.
Workload Identity uses the underlying Service Account in the cluster, without the need of passing a JSON File.
We are hosting a VM running dbt, and my company is migrating to using Workload Identity as a standard for all services connecting to GCP.
This is how I set up my connection in the profiles.yml; which works, but requires a JSON file for my Service Account Key:
my_target:
type: bigquery
method: service-account
keyfile: "{{ env_var('GOOGLE_APPLICATION_CREDENTIALS') }}"
project: "{{ var('gcp_project') }}"
dataset: "{{ env_var('DATASET_PREFIX') }}_"
threads: 4
timeout_seconds: 300
location: US
priority: interactive