Move datasets
While you cannot relocate a dataset after it is created, this document describes how you can manually recreate a dataset in another location. You can also make a copy of the dataset. The BigQuery Data Transfer Service can transfer data to a BigQuery dataset in many regions.
Move a dataset
To manually move a dataset from one location to another, follow this process:
-
Export the data from your BigQuery tables to a Cloud Storage bucket in either the same location as your dataset or in a location contained within your dataset's location. For example, if your dataset is in the
EU
multi-region location, you could export your data to theeurope-west1
Belgium location, which is part of the EU.There are no charges for exporting data from BigQuery, but you do incur charges for storing the exported data in Cloud Storage. BigQuery exports are subject to the limits on export jobs.
-
Copy or move the data from your export Cloud Storage bucket to a new bucket you created in the destination location. For example, if you are moving your data from the
US
multi-region to theasia-northeast1
Tokyo region, you would transfer the data to a bucket you created in Tokyo. For information on transferring Cloud Storage objects, see Copying, renaming, and moving objects in the Cloud Storage documentation.Note that transferring data between regions incurs network egress charges in Cloud Storage.
-
After you transfer the data to a Cloud Storage bucket in the new location, create a new BigQuery dataset (in the new location). Then, load your data from the Cloud Storage bucket into BigQuery.
You are not charged for loading the data into BigQuery, but you will incur charges for storing the data in Cloud Storage until you delete the data or the bucket. You are also charged for storing the data in BigQuery after it is loaded. Loading data into BigQuery is subject to the limits on load jobs.
You can also use Cloud Composer to move and copy large datasets programmatically.
For more information on using Cloud Storage to store and move large datasets, see Using Cloud Storage with big data.
Transfer data into BigQuery datasets
The BigQuery Data Transfer Service transfers (copies) data from a source to a destination dataset in BigQuery. Like BigQuery, the BigQuery Data Transfer Service is a multi-regional resource.
A BigQuery dataset's locality is specified when you create a destination dataset to store the data transferred by the BigQuery Data Transfer Service. When you set up a transfer, the transfer configuration itself is set to the same location as the destination dataset. The BigQuery Data Transfer Service processes and stages data in the same location as the target BigQuery dataset.
The data you want to transfer to BigQuery can also have a region. In most cases, the region where your data is stored and the location of the destination dataset in BigQuery are irrelevant. In other kinds of transfers, the dataset and the source data must be colocated in the same region, or a compatible region.
For detailed information about transfers and region compatibility, see Data location and transfers.