How to join multiple BigQuery tables from different GCP projects

Hello,
While writing dbt models, is it possible to JOIN multiple BigQuery tables from different GCP projects?
Currenlty in profiles.yaml and dbt_project.yaml we enter only one GCP project and dataset name.
Please advise how to use multiple tables from different GCP projects in a dbt model?

Hello @dbt101 ,

Please have a look profile.yml file to find the method.

Eg:
my-profile:
target: dev
outputs:
dev:
type: bigquery
method: oauth
project: abc-123
dataset: my_dataset
priority: interactive

if you are using OAUTH for running dbt locally, then your gcp profile/user-id should have access bq tables across the gcp projects.
When you use a Service Account, this SA should have access to all bq tables across your GCP projects.

Regards.
Minhaj

1 Like

Thanks Minaj, I tried oauth approach and it works.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.