Schedule a Display & Video 360 transfer

The BigQuery Data Transfer Service for Display & Video 360 lets you automatically schedule and manage recurring load jobs for Display & Video 360 reporting and configuration data.

Supported reports

The BigQuery Data Transfer Service for Display & Video 360 supports the following reporting option:

For information about how Display & Video 360 reports are transformed into BigQuery tables and views, see Display & Video 360 data transformation.

Display & Video 360 retains data transfer files for up to 60 days.

Reporting option Support
Schedule

Daily, at the time the transfer is first created (default)

You can configure the time of day.

Refresh window

Last 2 days

Not configurable

Maximum backfill duration

Last 60 days

Supported configuration data

In addition to the reporting data, BigQuery Data Transfer Service also transfers the following configuration data from Display & Video 360. Configuration data is retrieved from Display & Video 360 API v3.

For more information about each type of configuration data, see the following links:

Before you begin

Review the following prerequisites and information before you create a Display & Video 360 transfer.

Prerequisites

  • Verify that you have completed all actions required to enable the BigQuery Data Transfer Service.
  • Create a BigQuery dataset to store Display & Video 360 data.
  • Ensure that you have either your Display & Video 360 Partner ID or Advertiser ID. The partner ID is the parent in the hierarchy.
  • Ensure that you have read permissions to access partner or advertiser data from the Display and Video API.
  • Ensure that your organization has access to Display & Video 360 Data Transfer v2 (Display & Video 360 DTv2) files. These files are delivered by the Display & Video 360 team in a Cloud Storage bucket. Requesting access to the Display & Video 360 DTv2 files depends on whether or not you have a direct contract with Display & Video 360. In both cases, additional charges might apply.

    • If you have a contract with Display & Video 360, contact Display & Video 360 support to set up Display & Video 360 DTv2 files.
    • If you don't have a contract with Display & Video 360, contact your agency for access to Display & Video 360 DTv2 files.
    • After completing this step, you will receive either of the following Cloud Storage bucket name, depending if your setup is for a partner or an advertiser:
      • gs://dcdt_-dbm_partnerPARTNER_ID
      • gs://dcdt_-dbm_advertiserADVERTISER_ID
  • To set up transfer run notifications for Pub/Sub, you must have pubsub.topics.setIamPolicy permissions. For more information, see BigQuery Data Transfer Service run notifications.

Find your Display & Video 360 ID

To retrieve your Display & Video 360 ID, navigate to the Cloud Storage Buckets page in the Google Cloud console and examine the files in your Display & Video 360 data transfer Cloud Storage bucket. The Display & Video 360 ID is used to match files in the provided Cloud Storage bucket. The ID is embedded in the filename, not the Cloud Storage bucket name. For example:

  • In a file named dbm_partner123_activity_*, the ID is 123.
  • In a file named dbm_advertiser567_activity_*, the ID is 567.

Finding your filename prefix

In some cases, the files in your Cloud Storage bucket might have custom, nonstandard file names that were set up for you by the Google Marketing Platform services team. For example:

In a file named dbm_partner123456custom_activity_*, the prefix is dbm_partner123456custom.

For any assistance regarding filename prefixes, contact Display & Video 360 support.

Set up a Display & Video 360 data transfer

Select one of the following options:

Console

  1. In the Google Cloud console, go to the BigQuery page.

    Go to BigQuery

  2. In the BigQuery navigation menu, click Data transfers.

  3. Click Create transfer.

  4. On the Create transfer page, do the following:

    • In the Source type section, for Source, choose Display & Video 360 - Preview.
    • In the Transfer config name section, for Display name, enter a name for the transfer. The transfer name can be any value that lets you identify the transfer if you need to modify it later.
  5. In the Schedule options section:

    • Select either Start now or Start at set time, then provide a start date and run time.
    • For Repeats, choose an option for how often to run the transfer. If you select Days, provide a valid time in UTC.
      • Hours
      • Days
      • On-demand
  6. In the Destination settings section, in the Destination dataset menu, select the dataset that you created to store your data.

  7. In the Data source details section:

    • In the Display & Video 360 ID field, enter the Partner ID or Advertiser ID.
    • Optional: In the Notification options section:
      • Click the toggle to enable email notifications. When you enable this option, the transfer administrator receives an email notification when a transfer run fails.
      • Click the toggle to enable Pub/Sub notifications. For Select a Cloud Pub/Sub topic, choose your topic name or click Create a topic. This option configures Pub/Sub run notifications for your transfer.
  8. Click Save.

bq

Enter the bq mk command and supply the transfer creation flag — --transfer_config. The following flags are required:

  • --data_source
  • --target_dataset
  • --display_name
  • --params
  bq mk --transfer_config \
  --project_id=PROJECT_ID \
  --target_dataset=DATASET \
  --display_name=NAME \
  --params='PARAMETERS' \
  --data_source=DATA_SOURCE

Where:

  • PROJECT_ID: your project ID.
  • DATASET: the target dataset for the transfer configuration.
  • NAME: the display name for the transfer configuration. The transfer name can be any value that lets you identify the transfer if you need to modify it later.
  • PARAMETERS: the parameters for the created transfer configuration in JSON format. For example—--params='{"param":"param_value"}'. For Display & Video 360 transfers, the bucket and displayvideo_id parameters are required. The file_name_prefix parameter is optional and used for rare, custom file names only.
  • DATA_SOURCE: the data source — displayvideo.

For example, the following command creates a Display & Video 360 transfer named My Transfer using Display & Video 360 ID 123456, Cloud Storage bucket dcdt_-dbm_partner123456, and target dataset mydataset.

The transfer is created in the default project:

  bq mk --transfer_config \
  --target_dataset=mydataset \
  --display_name='My Transfer' \
  --params='{"bucket":"dcdt_-dbm_partner123456","displayvideo_id": "123456","file_name_prefix":"YYY"}' \
  --data_source=displayvideo

After running the command, you receive a message like the following:

[URL omitted] Please copy and paste the above URL into your web browser and follow the instructions to retrieve an authentication code.

Follow the instructions in the message and paste the authentication code on the command line.

API

Use the projects.locations.transferConfigs.create method and supply an instance of the TransferConfig resource.

Query 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.

We recommend that you query the auto-generated views instead of querying the tables directly. However, if you want to query your tables directly, you must use the _PARTITIONTIME pseudo-column in your query. For more information, see Querying partitioned tables.