Search code examples
sqlgoogle-bigqueryetl

BigQuery: INSERT INTO datasets in another server location


I have a project called project-a, and datasets called product_eu (EU Server), and table name called table_eu.

I have another dataset called product_us (US Server) and table in that dataset called table_us.

The SQL queries of the 2 tables are almost the same with the only difference in source tables.

If I want to join table_us in EU location, what will you do? I tried to ETL directly to the EU location:

INSERT INTO  `project-a.product_eu.table_us`
SEL *
FROM abc

But I found the following error:

Not found: Dataset project-a:product_eu was not found in location US

Solution

  • You cannot do this.

    You need to transfer the EU dataset to US, and copy from table_EU to table_US.

    See ways you can accomplish copy/transfer.