To use the BigQuery Data Transfer Service, you must complete the following steps as a project Owner:
- Create a project and enable the BigQuery API
- Enable the BigQuery Data Transfer Service
For more information on Cloud IAM roles, see Understanding roles.
Creating a project and enabling the BigQuery API
Before using the BigQuery Data Transfer Service, you must create a project and, in most cases, enable billing on that project. You can use an existing project with the BigQuery Data Transfer Service, or you can create a new one. If you are using an existing project, you may also need to enable the BigQuery API.
To create a project and enable the BigQuery API:
In the GCP Console, go to the project selector page.
Select or create a GCP project.
- You will need to enable billing on your project if you want to
transfer data from any of these sources:
- Campaign Manager
- Google Ad Manager
- Google Ads
- Google Play (beta)
- YouTube - Channel Reports
- YouTube - Content Owner Reports
Make sure that billing is enabled for your Google Cloud Platform project.
- BigQuery is automatically enabled in new projects. To activate BigQuery in an existing project, Enable the BigQuery API.
Enabling the BigQuery Data Transfer Service
Before you can create a transfer, you must enable the BigQuery Data Transfer Service. To enable the BigQuery Data Transfer Service, you must be granted the Owner role for your project.
To enable the BigQuery Data Transfer Service:
Go to the classic BigQuery web UI.
Click Enable to grant permissions to the BigQuery Data Transfer Service. The first time you enable transfers in a project, you are required to grant permissions to the BigQuery Data Transfer Service. After permissions are granted, you are not prompted again.
All users that will create transfers must be granted the
predefined IAM role. The
bigquery.admin role includes the following
BigQuery Data Transfer Service permissions:
bigquery.adminrole also includes the permission:
bigquery.datasets.updatepermission is required to write data to the transfer's destination dataset.
To grant the
bigquery.admin role to a user or Google group:
Open the Cloud IAM page in the GCP Console
Click Select a project.
Select a project and click Open.
Click Add to add new members to the project and set their permissions.
In the Add members dialog:
- For Members, enter the email address of the user or group.
- In the Select a role drop-down, click BigQuery > BigQuery Admin.
You can use the gcloud command-line tool to grant a user or group the
To add a single binding to your project's Cloud IAM policy, type
the following command. To add a user, supply the
--member flag in the
user:email@example.com. To add a group, supply the
in the format
gcloud projects add-iam-policy-binding project_id \ --member group/user:address \ --role roles/bigquery.admin
- project_id is your project ID.
- group/user is either
- address is the user or group's email address.
gcloud projects add-iam-policy-binding myproject \ --member group:firstname.lastname@example.org \ --role roles/bigquery.admin
The command outputs the updated policy:
bindings: - members: - group:email@example.com role: roles/bigquery.admin
For more information on Cloud IAM roles in BigQuery, see Access control.
After enabling the BigQuery Data Transfer Service, create a transfer for your data source.