1
votes

I have two datasets which I want to join, but when I try to join them GCP gives me an error that it cannot find the other table within the same region which is correct because it is hosted in a different region. So one is hosted at EU and the other one is hosted at europe-west1.

I thought of changing the region of one dataset but that is not possible and the documentation also mentions that:

Moving BigQuery data between locations

You cannot change the location of a dataset after it is created, but you can make a copy of the dataset. You cannot move a dataset from one location to another, but you can manually move (recreate) a dataset. The BigQuery Data Transfer Service can transfer data to a BigQuery dataset in many regions.

Ideally I would like to specify the region within the query editor when specifying the dataset/table path but I couldn't find such a thing. So I wanted to ask if there is a way to still join the tables without the need of migration one dataset to the same region.

1

1 Answers

2
votes

Currently, there is no way you can join 2 tables from different regions. Moving the dataset into same region is the only way.

Regarding the dataset location, BigQuery knows location of each dataset. So if you don't do cross region join, your query is always routed to the region where your data sits.