[MUSIC PLAYING]
SPEAKER: If you have a dataset in BigQuery
that you wish to copy within a region or from one region
to another, you can do so without needing to extract,
move, and reload the data.
In this video, you will learn two ways
to copy a BigQuery dataset using the cloud console.
Both options require three preparation steps.
First, review the required permissions
in the documentation page linked below
to ensure you have the roles needed for the source
dataset, destination dataset, and for creating transfers.
Second, you must create the destination dataset
where you would like the copy to live.
In this tutorial, we will create the destination dataset
in the same project.
However, this is not required.
Third, you must enable the BigQuery Data Transfer
Service in the same project as the source dataset.
From the Navigation menu, choose APIs & Services and Dashboard.
Click to enable APIs & Services.
Search for BigQuery Data Transfer API,
then click Enable.
Navigate back to BigQuery using the search bar.
Now, we are ready to see the two options
for copying your dataset.
Option one is using the Copy Dataset icon.
This method is simple, quick, and perfect for a one time
dataset copy.
Select the dataset name of the source
dataset that you want to copy.
Click the Copy Dataset icon.
In the Copy Dataset dialog, select the project ID
and destination dataset ID.
Optionally, check the Overwrite Destination Table box,
if you want to refresh or overwrite
the data and schema of the tables
in the destination dataset.
Click Copy.
A Permissions window may appear to give the BigQuery Data
Transfer Service permission to manage your dataset copy.
If so, click to allow.
You can see the progress and view
details of the dataset copy under Transfers.
Back in the BigQuery console, you
will see the tables populate under your destination dataset,
once the transfer completes.
Consider deleting the old dataset
to avoid additional storage costs,
if that makes sense for your use case.
Now, let's see option number two, using the transfers UI.
This option is best if you want to copy
a dataset on a scheduled basis.
In the left-hand nav, click Transfers.
Click CREATE TRANSFER.
In the source dropdown, choose Dataset Copy.
Give the transfer a name.
In the Schedule Options section, you
can choose when the transfer will execute.
And also, you may set the transfer
to repeat at regular intervals.
We will choose to start the transfer immediately
and schedule it to execute weekly.
Now, choose your destination dataset in the dropdown.
You must copy in the name of your source dataset and project
ID.
Remember to use your project ID, not your project name.
Check the Overwrite Destination Table
box, if you want to refresh all data in the destination data
set.
You can also receive email notifications if and when
a transfer fails.
Click Save.
You can see progress and view details of the dataset
in the transfers UI.
Once the transfer completes, you will
see the tables populate under your destination data set.
Back in the transfers UI, make sure you
use the three dots to delete or disable the recurring transfer,
to avoid ongoing charges.
There you have it-- two different ways
to copy data sets, depending on your needs.
At general availability, data copied between regions
is billed at the same rates as pricing
for compute engine network egress between regions.
BigQuery sends compressed data for copying across regions,
so the gigabytes build may actually be less
than the size of your dataset.
All standard BigQuery usage charges
for storage and querying will apply on the copied data.
More information on copying datasets and pricing
is linked in the description below.
Happy analyzing.
[MUSIC PLAYING]