Dmitry Polovinkin
Dmitry Polovinkin

Reputation: 180

How to copy one BigQuery table to the existing dataset in another region?

I'm having a trouble trying to copy the particular table from the dataset (as an example) in US region to the dataset in the south-asia-1 region. But after I try to copy the table using "Copy" button in the UI the error appears, which tells that no such dataset is found (presumably trying to find target table in the US region, or source in asia-south-1).

I don't need to copy the whole dataset anywhere as answers in another questions suggested, just a couple. I couldn't find compelling answers to that problem on SO yet. Thanks!

Upvotes: 1

Views: 2828

Answers (1)

MBHA Phoenix
MBHA Phoenix

Reputation: 2207

Table copy only works when source and destination tables are in the same region. A workaround solution could be:

  1. create a temp_source dataset in the same region as the source table
  2. copy the source table to temp_source dataset
  3. create temp_destination dataset in the same region at the wanted destination (asia-south1 in your case)
  4. use the BigQuery Data Transfer service (Data transfers in BigQuery cloud console)to copy temp_source dataset (containing your one table) to temp_destination
  5. copy temp_destination.your_table to your wanted destination dataset (asia-south1)

Upvotes: 4

Related Questions