8/23/2020 YouTube Channel transfers | BigQuery Data Transfer Service
YouTube Channel transfers
The BigQuery Data Transfer Service for YouTube allows you to automatically schedule and manage recurring load jobs for YouTube Channel reports.
Suppo ed Repo s
The BigQuery Data Transfer Service for YouTube Channel reports currently supports the following reporting options:
Channel Reports (https://developers.google.com/youtube/reporting/v1/reports/channel_reports) (automatically loaded into BigQuery)
For information on how YouTube Channel reports are transformed into BigQuery tables and views, see YouTube Channel report transformations (/bigquery-transfer/docs/youtube-channel-transformation).
Reporting Support option
SupportedJune 18, 2018 (https://developers.google.com/youtube/reporting/revision_history#june-18-2018) API version
Schedule Daily, approximately 14:10 UTC
You can con gure the time of day
Refresh Last 1 day window Not con gurable.
Maximum 30 days back ll duration As of July 2018, YouTube reports containing historical data are available for 30 days from the time that they are generated. (Reports that contain non-historical data are available for 60 days.) For more information, see Historical data (https://developers.google.com/youtube/reporting/v1/reports/#historical-data) in the YouTube Reporting API documentation.
https://cloud.google.com/bigquery-transfer/docs/youtube-channel-transfer/ 1/6 8/23/2020 YouTube Channel transfers | BigQuery Data Transfer Service
Before you begin
Before you create a YouTube Channel transfer:
Verify that you have completed all actions required to enable the BigQuery Data Transfer Service (/bigquery-transfer/docs/enable-transfer-service).
Create a BigQuery dataset (/bigquery/docs/datasets) to store the YouTube data.
If you intend to create transfers using the classic BigQuery web UI, allow pop-ups from bigquery.cloud.google.com so you can view the permissions window. You must allow the BigQuery Data Transfer Service permission to manage your YouTube reporting data for the transfer to succeed.
If you intend to setup transfer run noti cations for Pub/Sub, you must have pubsub.topics.setIamPolicy permissions. Pub/Sub permissions are not required if you just set up email noti cations. For more information, see BigQuery Data Transfer Service run noti cations (/bigquery-transfer/docs/transfer-run-noti cations).
Required permissions
Ensure that the person creating the transfer has the following required permissions:
BigQuery:
bigquery.transfers.update permissions to create the transfer
bigquery.datasets.update permissions on the target dataset
The bigquery.admin prede ned, project-level IAM role includes bigquery.transfers.update and bigquery.datasets.update permissions. For more information on IAM roles in BigQuery Data Transfer Service, see Access control reference (/bigquery-transfer/docs/reference/access-control).
YouTube: Owner of a YouTube channel.
Se ing up a YouTube Channel transfer
Setting up a YouTube Channel transfer requires a:
https://cloud.google.com/bigquery-transfer/docs/youtube-channel-transfer/ 2/6 8/23/2020 YouTube Channel transfers | BigQuery Data Transfer Service
Table Su x: A user-friendly name for the channel provided by you when you set up the transfer. The su x is appended to the job ID to create the table name, for example reportTypeId_su x. The su x is used to prevent separate transfers from writing to the same tables. The table su x must be unique across all transfers that load data into the same dataset, and the su x should be short to minimize the length of the resulting table name.
If you currently use the YouTube Reporting API (https://developers.google.com/youtube/reporting/v1/reference/rest/) and have existing reporting jobs, the BigQuery Data Transfer Service loads your report data. If you do not have existing reporting jobs, setting up the transfer automatically enables YouTube reporting jobs.
To create a YouTube Channel transfer:
ConsoleClassic UI (#classic-ui)bq (#bq)API (#api)
1. Go to the BigQuery web UI in the Cloud Console.
Go to the Cloud Console (https://console.cloud.google.com/bigquery)
2. Click Transfers.
3. Click Create Transfer.
4. On the Create Transfer page:
In the Source type section, for Source, choose YouTube Channel.
In the Transfer con g name section, for Display name, enter a name for the transfer such as My Transfer. The transfer name can be any value that allows you to easily identify the transfer if you need to modify it later.
https://cloud.google.com/bigquery-transfer/docs/youtube-channel-transfer/ 3/6 8/23/2020 YouTube Channel transfers | BigQuery Data Transfer Service
In the Schedule options section, for Schedule, leave the default value (Start now) or click Start at a set time.
For Repeats, choose an option for how often to run the transfer.
Daily (default)
Weekly
Monthly
Custom
On-demand
For Start date and run time, enter the date and time to start the transfer. If you choose Start now, this option is disabled.
In the Destination settings section, for Destination dataset, choose the dataset you created to store your data.
In the Data source details section:
For Table su x, enter a su x such as MT.
Check the box Con gure jobs to allow the BigQuery Data Transfer Service to manage YouTube reporting jobs for you. If there are YouTube reports that don't currently exist for your account, new reporting jobs are created to enable them.
https://cloud.google.com/bigquery-transfer/docs/youtube-channel-transfer/ 4/6 8/23/2020 YouTube Channel transfers | BigQuery Data Transfer Service
(Optional) In the Noti cation options section:
Click the toggle to enable email noti cations. When you enable this option, the transfer administrator receives an email noti cation when a transfer run fails.
For Select a Pub/Sub topic, choose your topic (/pubsub/docs/overview#types) name or click Create a topic. This option con gures Pub/Sub run noti cations (/bigquery-transfer/docs/transfer-run-noti cations) for your transfer.
5. Click Save.
If you are setting up YouTube reporting jobs for the rst time, you will experience a delay of up to 48 hours befo rst reports are ready. For more information, see Create a reporting job s://developers.google.com/youtube/reporting/v1/reports/#step-3-create-a-reporting-job) in the YouTube Repo ocumentation.
Querying your data
When your data is transferred to BigQuery, the data is written to ingestion-time partitioned tables. For more information, see Introduction to partitioned tables (/bigquery/docs/partitioned-tables).
If you query your tables directly instead of using the auto-generated views, you must use the _PARTITIONTIME pseudo-column in your query. For more information, see Querying partitioned tables (/bigquery/docs/querying-partitioned-tables).
Troubleshooting YouTube Channel transfer setup
If you are having issues setting up your transfer, see YouTube transfer issues (/bigquery-transfer/docs/transfer-troubleshooting#youtube_transfer_issues) in Troubleshooting
https://cloud.google.com/bigquery-transfer/docs/youtube-channel-transfer/ 5/6 8/23/2020 YouTube Channel transfers | BigQuery Data Transfer Service
BigQuery Data Transfer Service transfer setup (/bigquery-transfer/docs/transfer-troubleshooting).
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License (https://creativecommons.org/licenses/by/4.0/), and code samples are licensed under the Apache 2.0 License (https://www.apache.org/licenses/LICENSE-2.0). For details, see the Google Developers Site Policies (https://developers.google.com/site-policies). Java is a registered trademark of Oracle and/or its a liates.
Last updated 2020-07-21 UTC.
https://cloud.google.com/bigquery-transfer/docs/youtube-channel-transfer/ 6/6