Search Ads 360 transfers

The BigQuery Data Transfer Service for Search Ads 360 connector lets you automatically schedule and manage recurring load jobs for Search Ads 360 reporting data.

Supported reports

The BigQuery Data Transfer Service for Search Ads 360 supports Search Ads 360 reporting API v0:

For information about how Search Ads 360 reports are transformed into BigQuery Data Transfer Service tables and views, see Search Ads 360 report transformations.

Reporting option Support
Supported API version

v0

Repeat frequency

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

You can configure the time of day.

Refresh window

Last 7 days (default)

Configurable up to 30 days

Snapshots of match tables are taken once a day and stored in the partition for the last run date. Match Table snapshots are not updated for backfills or for days loaded using the refresh window.

Maximum backfill duration

No limit

Number of Customer IDs per manager account

2,000

The BigQuery Data Transfer Service supports a maximum of 2000 Customer IDs for each Search Ads 360 manager account.

To see the Search Ads 360 transfer guide that uses the old Search Ads 360 reporting API, see Search Ads 360 transfers (Deprecated).

Data ingestion from Search Ads 360 transfers

When you transfer data from Search Ads 360 into BigQuery, the data is loaded into BigQuery tables that are partitioned by date. The table partition that the data is loaded into corresponds to the date from the data source. If you schedule multiple transfers for the same date, BigQuery Data Transfer Service overwrites the partition for that specific date with the latest data. Multiple transfers in the same day or running backfills don't result in duplicate data, and partitions for other dates are not affected.

Refresh windows

A refresh window is the number of days that a data transfer retrieves data when a data transfer occurs. For example, if the refresh window is three days and a daily transfer occurs, the BigQuery Data Transfer Service retrieves all data from your source table from the past three days. In this example, when a daily transfer occurs, the BigQuery Data Transfer Service creates a new BigQuery destination table partition with a copy of your source table data from the current day, then automatically triggers backfill runs to update the BigQuery destination table partitions with your source table data from the past two days. The automatically triggered backfill runs will either overwrite or incrementally update your BigQuery destination table, depending on whether or not incremental updates are supported in the BigQuery Data Transfer Service connector.

When you run a data transfer for the first time, the data transfer retrieves all source data available within the refresh window. For example, if the refresh window is three days and you run the data transfer for the first time, the BigQuery Data Transfer Service retrieves all source data within three days.

Refresh windows are mapped to the TransferConfig.data_refresh_window_days API field.

To retrieve data outside the refresh window, such as historical data, or to recover data from any transfer outages or gaps, you can initiate or schedule a backfill run.

Limitations

  • The maximum frequency that you can configure a Search Ads 360 data transfer for is once every 24 hours. By default, a transfer starts at the time that you create the transfer. However, you can configure the data transfer start time when you create your transfer.
  • The BigQuery Data Transfer Service does not support incremental data transfers during a Search Ads 360 transfer. When you specify a date for a data transfer, all of the data that is available for that date is transferred.

Before you begin

Before you create a Search Ads 360 data transfer:

Required permissions

Ensure that the user creating the data transfer has the following required permissions:

  • BigQuery Data Transfer Service:

    • bigquery.transfers.update permissions to create the data transfer.
    • Both bigquery.datasets.get and bigquery.datasets.update permissions on the target dataset.

    The bigquery.admin predefined IAM role includes bigquery.transfers.update, bigquery.datasets.update and bigquery.datasets.get permissions. For more information on IAM roles in BigQuery Data Transfer Service, see Access control.

  • Google Cloud:

    • serviceusage.services.use permissions to download data from Search Ads 360 on the project.

    The editor, owner and serviceusage.serviceUsageConsumer predefined IAM roles include serviceusage.services.use permissions. For more information on IAM roles in Service Usage, see Access control reference.

  • Search Ads 360:

    • Read access to the Search Ads 360 Customer ID or manager account that is used in the transfer configuration.

Create a Search Ads 360 data transfer

To create a data transfer for Search Ads 360 reporting, you need either your Search Ads 360 Customer ID or manager account. Select one of the following options:

Console

  1. Go to the Data transfers page in the Google Cloud console.

    Go to Data transfers

  2. Click Create transfer.

  3. In the Source type section, for Source, choose Search Ads 360.

  4. In the Transfer config name section, for Display name, enter a name for the data transfer such as My 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:

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

    1. In the Data source details section:

    2. For Customer ID, enter your Search Ads 360 customer ID:

    3. Optional: Enter both an Agency ID and Advertiser ID to retrieve ID mapping tables.

    4. Optional: In the Custom Floodlight Variables field, enter any custom Floodlight variables to include in the data transfer. The custom floodlight variables have to be owned by the Search Ads 360 account specified by the Customer ID in the transfer config. This parameter takes string inputs in JSON array format and can support multiple custom Floodlight variables. In each item of the JSON array, the following parameters are required:

      • id: the numeric ID of the custom Floodlight variable. This ID is assigned when a custom Floodlight variable is created in Search Ads 360. If you have specified an id, then a name is not required.
      • name: the user-defined name of the custom floodlight variables in Search Ads 360. If you have specified a name, then a id is not required.
      • cfv_field_name: the exact custom Floodlight variable field name based on your use case. The supported values are conversion_custom_metrics, conversion_custom_dimensions, raw_event_conversion_metrics and raw_event_conversion_dimensions.
      • destination_table_name: a list of BigQuery tables to include the custom floodlight variables in. When the BigQuery Data Transfer Service retrieves data for these tables, the transfer includes the custom Floodlight variables in the query.
      • bigquery_column_name_suffix: the user-defined friendly column name. The BigQuery Data Transfer Service appends the suffix after the standard field name to differentiate different custom Floodlight variables. Depending on the use case, the BigQuery Data Transfer Service generates a BigQuery column name as follows:

        Custom Floodlight variables as metrics and segments Custom Floodlight variables as Raw Event Attributes in the Conversion Resource
        metrics metrics_conversion_custom_metrics_bigquery_column_name_suffix metrics_raw_event_conversion_metrics_bigquery_column_name_suffix
        dimension segments_conversion_custom_dimensions_bigquery_column_name_suffix segments_raw_event_conversion_dimensions_bigquery_column_name_suffix

      The following is an example Custom Floodlight Variable entry that specifies two custom Floodlight variables:

      [{
        "id": "1234",
        "cfv_field_name": "raw_event_conversion_metrics",
        "destination_table_name": ["Conversion"],
        "bigquery_column_name_suffix": "suffix1"
      },{
        "name": "example name",
        "cfv_field_name": "conversion_custom_metrics",
        "destination_table_name": ["AdGroupConversionActionAndDeviceStats","CampaignConversionActionAndDeviceStats"],
        "bigquery_column_name_suffix": "suffix2"
      }]
    5. Optional: In the Custom Columns field, enter any custom columns to include in the data transfer. The custom columns have to be owned by the Search Ads 360 account specified by the Customer ID in the transfer config. This field takes string inputs in JSON array format and can support multiple columns. In each item of the JSON array, the following parameters are required:

      • id: the numeric ID of the custom column. This ID is assigned when a custom column is created. If you have specified an id, then a name is not required.
      • name: the user-defined name of the custom column in Search Ads 360. If you have specified a name, then a id is not required.
      • destination_table_name: a list of BigQuery tables to include the custom column in. When the BigQuery Data Transfer Service retrieves data for these tables, the transfer includes the custom column field in the query.
      • bigquery_column_name: the user-defined friendly column name. This is the field name of the custom column in the destination tables specified in destination_table_name. The column name has to follow the format requirements for BigQuery column names and must be unique to other fields in the table's standard schema or other custom columns.

      The following is an example Custom Columns entry that specifies two custom columns:

        [{
          "id": "1234",
          "destination_table_name": ["Conversion"],
          "bigquery_column_name": "column1"
        },{
          "name": "example name",
          "destination_table_name": ["AdGroupStats","CampaignStats"],
          "bigquery_column_name": "column2"
        }]
        

    6. Optional: In the Table Filter field, enter a comma-separated list of tables to include, for example Campaign, AdGroup. Prefix this list with the - character to exclude certain tables, for example -Campaign, AdGroup. All tables are included by default.

    7. Optional: For Refresh window, enter a value between 1 and 30. If not set, the refresh window defaults to 7 days.

  7. In the Service Account menu, select a service account from the service accounts associated with your Google Cloud project. You can associate a service account with your transfer instead of using your user credentials. For more information about using service accounts with data data transfers, see Use service accounts.

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

  9. Click Save.

bq

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

  • --data_source
  • --target_dataset
  • --display_name
  • --params

The following flags are optional:

  • --project_id: Specifies which project to use. If the flag is not specified, the default project is used.
  • --service_account_name: Specifies a service account to use for Search Ads 360 transfer authentication instead of your user account.
bq mk \
--transfer_config \
--project_id=PROJECT_ID \
--target_dataset=DATASET \
--display_name=NAME \
--data_source=DATA_SOURCE \
--service_account_name=SERVICE_ACCOUNT_NAME \
--params='{PARAMETERS,"custom_columns":"[{\"id\": \"CC_ID\",\"destination_table_name\": [\"CC_DESTINATION_TABLE\"],\"bigquery_column_name\": \"CC_COLUMN\"}]","custom_floodlight_variables":"[{\"id\": \"CFV_ID\",\"cfv_field_name\": [\"CFV_FIELD_NAME\"],\"destination_table_name\": [\"CFV_DESTINATION_TABLE\"],\"bigquery_column_name_suffix\": \"CFV_COLUMN_SUFFIX\"}]"}'

Where:

  • PROJECT_ID (Optional): specifies which project to use. If the flag is not specified, the default project is used.
  • DATASET: the target dataset for the transfer configuration.
  • NAME: the display name for the transfer configuration. The data transfer name can be any value that lets you identify the transfer if you need to modify it later.

  • DATA_SOURCE: the data source — search_ads.

  • SERVICE_ACCOUNT_NAME (Optional): the service account name used to authenticate your data transfer. The service account should be owned by the same project_id used to create the transfer and it should have all of the required permissions.

  • PARAMETERS: the parameters for the created transfer configuration in JSON format. For example: --params='{"param":"param_value"}'. You must supply the customer_id parameter.

    • table_filter: Specifies which tables to include in the data transfer. If the flag is not specified, all tables are included. To include only specific tables, use a comma-separated list of values (for example, Ad, Campaign, AdGroup). To exclude specific tables, prefix the excluded values with a hyphen (-) (for example, using -Ad, Campaign, AdGroup excludes all three values.)
    • custom_columns: specifies custom columns to your reports. This parameter takes string inputs in JSON array format and can support multiple columns. In each item of the JSON array, the following parameters are required:
      • CC_ID: the numeric ID of the custom column. This ID is assigned when a custom column is created.
      • CC_DESTINATION_TABLE: a list of BigQuery tables to include the custom column in. When the BigQuery Data Transfer Service retrieves data for these tables, the data transfer includes the custom column field in the query.
      • CC_COLUMN: the user-defined friendly column name. This is the field name of the custom column in the destination tables specified in destination_table_name. The column name has to follow the format requirements for BigQuery column names and must be unique to other fields in the table's standard schema or other custom columns.
    • custom_floodlight_variables: Specifies custom Floodlight variables in your transfer. This parameter takes string inputs in JSON array format and can support multiple custom Floodlight variables. In each item of the JSON array, the following parameters are required:
      • CFV_ID: the numeric ID of the custom Floodlight variable. This ID is assigned when a custom Floodlight variable is created in Search Ads 360.
      • CFV_FIELD_NAME: the exact custom Floodlight variable field name based on your use case. The supported values are conversion_custom_metrics, conversion_custom_dimensions, raw_event_conversion_metrics and raw_event_conversion_dimensions. For more information, see Custom Floodlight metrics.
      • CFV_DESTINATION_TABLE: a list of BigQuery tables to include the custom floodlight variables in. When the BigQuery Data Transfer Service retrieves data for these tables, the data transfer includes the custom Floodlight variables in the query.
      • CFV_COLUMN_SUFFIX: the user-defined friendly column name. The BigQuery Data Transfer Service appends the suffix after the standard field name to differentiate different custom Floodlight variables. Depending on the use case, the BigQuery Data Transfer Service generates a BigQuery column name as follows:
    Custom Floodlight variables as metrics and segments Custom Floodlight variables as Raw Event Attributes in the Conversion Resource
    metrics metrics_conversion_custom_metrics_bigquery_column_name_suffix metrics_raw_event_conversion_metrics_bigquery_column_name_suffix
    dimension segments_conversion_custom_dimensions_bigquery_column_name_suffix segments_raw_event_conversion_dimensions_bigquery_column_name_suffix

For example, the following command creates a Search Ads 360 data transfer named My Transfer using Customer ID 6828088731 and target dataset mydataset. The transfer also specifies a custom floodlight variable. The data transfer is created in the default project:

bq mk \
--transfer_config \
--target_dataset=mydataset \
--display_name='My Transfer' \
--data_source=search_ads \
--params='{"customer_id":"6828088731", "custom_floodlight_variables":"[{\"id\": \"9876\", \"cfv_field_name\": \"raw_event_conversion_metrics\", \"destination_table_name\": [\"Conversion\"],\"bigquery_column_name_suffix\": \"suffix1\" }]"}'

The first time you run 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.

Manually trigger a Search Ads 360 transfer

When you manually trigger a transfer for Search Ads 360, snapshots of match tables are taken once a day and stored in the partition for the last run date. When you trigger a manual transfer, Match Table snapshots for the following tables are not updated:

  • Account
  • Ad
  • AdGroup
  • AdGroupCriterion
  • Any ID mapping table
  • Asset
  • BidStrategy
  • Campaign
  • CampaignCriterion
  • ConversionAction
  • Keyword
  • NegativeAdGroupKeyword
  • NegativeAdGroupCriterion
  • NegativeCampaignKeyword
  • NegativeCampaignCriterion
  • ProductGroup

Support for Search Ads 360 manager accounts

Using Search Ads 360 manager accounts provides several benefits over using individual Customer IDs:

  • You don't need to manage multiple data transfers to report on multiple Customer IDs.
  • Cross-customer queries are simpler to write because all Customer IDs are stored in the same table.
  • Using manager accounts alleviates BigQuery Data Transfer Service load quota issues because multiple Customer IDs are loaded in the same job.

For existing customers who have multiple Customer ID-specific Search Ads 360 data transfers, we recommend that you switch to a Search Ads 360 manager account instead. You can do this with the following steps:

  1. Set up a single Search Ads 360 data transfer at the manager or sub-manager account level.
  2. Schedule a backfill.
  3. Disable individual Customer ID-specific Search Ads 360 transfers.

For more information about Search Ads 360 manager accounts, see About manager accounts in the new Search Ads 360 and See how accounts are linked to your manager account.

Example

The following list shows the Customer IDs linked to particular Search Ads 360 manager accounts:

  • 1234567890 — root manager account
    • 1234 — sub-manager account
      • 1111 — Customer ID
      • 2222 — Customer ID
      • 3333 — Customer ID
      • 4444 — Customer ID
      • 567 — sub-manager account
        • 5555 — Customer ID
        • 6666 — Customer ID
        • 7777 — Customer ID
    • 89 — sub-manager account
      • 8888 — Customer ID
      • 9999 — Customer ID
    • 0000 — Customer ID

Each Customer ID is linked to a manager account appears in each report. For more information about the Search Ads 360 reporting structure in BigQuery Data Transfer Service, see Search Ads 360 report transformation.

Transfer configuration for Customer ID 1234567890

A transfer configuration for the root manager account (Customer ID 1234567890) generates data transfer runs that include the following Customer IDs:

  • 1111 (via sub-manager account 1234)
  • 2222 (via sub-manager account 1234)
  • 3333 (via sub-manager account 1234)
  • 4444 (via sub-manager account 1234)
  • 5555 (via sub-manager account 567 and sub-manager account 1234)
  • 6666 (via sub-manager account 567 and sub-manager account 1234)
  • 7777 (via sub-manager account 567 and sub-manager account 1234)
  • 8888 (via sub-manager account 89)
  • 9999 (via sub-manager account 89)
  • 0000 (individual Customer ID)

Transfer configuration for Customer ID 1234

A transfer configuration for sub-manager account 123 (Customer ID 1234) generates data transfer runs that include the following Customer IDs:

  • 1111
  • 2222
  • 3333
  • 4444
  • 5555 (via sub-manager account 567)
  • 6666 (via sub-manager account 567)
  • 7777 (via sub-manager account 567)

Transfer configuration for Customer ID 567

A transfer configuration for sub-manager account 567 (Customer ID 567) generates data transfer runs that include the following Customer IDs:

  • 5555
  • 6666
  • 7777

Transfer configuration for Customer ID 89

A transfer configuration for sub-manager account 89 (Customer ID 89) generates data transfer runs that include the following Customer IDs:

  • 8888
  • 9999

Transfer configuration for Customer ID 0000

A transfer configuration for Customer ID 0000 generates data transfer runs that include only the individual Customer ID:

  • 0000

Query your data

When your data is transferred to BigQuery Data Transfer Service, the data is written to ingestion-time partitioned tables. For more information, see Introduction to partitioned tables.

If you query your tables directly instead of using the auto-generated views, you must use the _PARTITIONTIME pseudocolumn in your query. For more information, see Querying partitioned tables.

Search Ads 360 sample queries

You can use the following Search Ads 360 sample queries to analyze your transferred data. You can also view the queries in a visualization tool such as Looker Studio.

The following queries are examples to get started querying your Search Ads 360 data with BigQuery Data Transfer Service. For additional questions about what you can do with these reports, contact your Search Ads 360 technical representative.

If you query your tables directly instead of using the auto-generated views, you must use the _PARTITIONTIME pseudocolumn in your query. For more information, see Querying partitioned tables.

Campaign performance

The following sample query analyzes Search Ads 360 campaign performance for the past 30 days.

SELECT
  c.customer_id,
  c.campaign_name,
  c.campaign_status,
  SUM(cs.metrics_clicks) AS Clicks,
  (SUM(cs.metrics_cost_micros) / 1000000) AS Cost,
  SUM(cs.metrics_impressions) AS Impressions
FROM
  `DATASET.sa_Campaign_CUSTOMER_ID` c
LEFT JOIN
  `DATASET.sa_CampaignStats_CUSTOMER_ID` cs
ON
  (c.campaign_id = cs.campaign_id
  AND cs._DATA_DATE BETWEEN
  DATE_ADD(CURRENT_DATE(), INTERVAL -31 DAY) AND DATE_ADD(CURRENT_DATE(), INTERVAL -1 DAY))
WHERE
  c._DATA_DATE = c._LATEST_DATE
GROUP BY
  1, 2, 3
ORDER BY
  Impressions DESC

Replace the following:

  • DATASET: the name of the dataset
  • CUSTOMER_ID: the Search Ads 360 customer ID

Count of keywords

The following sample query analyzes keywords by campaign, ad group, and keyword status.

  SELECT
    c.campaign_status AS CampaignStatus,
    a.ad_group_status AS AdGroupStatus,
    k.ad_group_criterion_status AS KeywordStatus,
    k.ad_group_criterion_keyword_match_type AS KeywordMatchType,
    COUNT(*) AS count
  FROM
    `DATASET.sa_Keyword_CUSTOMER_ID` k
    JOIN
    `DATASET.sa_Campaign_CUSTOMER_ID` c
  ON
    (k.campaign_id = c.campaign_id AND k._DATA_DATE = c._DATA_DATE)
  JOIN
    `DATASET.sa_AdGroup_CUSTOMER_ID` a
  ON
    (k.ad_group_id = a.ad_group_id AND k._DATA_DATE = a._DATA_DATE)
  WHERE
    k._DATA_DATE = k._LATEST_DATE
  GROUP BY
    1, 2, 3, 4

Replace the following:

  • DATASET: the name of the dataset
  • CUSTOMER_ID: the Search Ads 360 customer ID

ID mapping tables

Entities in the new Search Ads 360, such as customers, campaigns, and ad groups, have a different ID space than the old Search Ads 360. For existing Search Ads 360 transfer users who want to combine data from the old Search Ads 360 with the new Search Ads 360 API, you can use the BigQuery Data Transfer Service to transfer ID mapping tables if you provide a valid agency ID and advertiser ID in the transfer configuration.

Supported entities contain two columns, legacy_id and new_id, which specifies the ID mapping for entities in old and new versions of Search Ads 360 respectively. For the AD, CAMPAIGN_CRITERION, and CRITERION entities, a new_secondary_id is also provided as these entities don't have globally unique ids in the new Search Ads 360. The following is a list of ID mapping tables.

  • IdMapping_AD
  • IdMapping_AD_GROUP
  • IdMapping_CAMPAIGN
  • IdMapping_CAMPAIGN_CRITERION
  • IdMapping_CAMPAIGN_GROUP
  • IdMapping_CAMPAIGN_GROUP_PERFORMANCE_TARGET
  • IdMapping_CRITERION
  • IdMapping_CUSTOMER
  • IdMapping_FEED_ITEM
  • IdMapping_FEED_TABLE

Example queries

The following query makes use of ID mapping tables to aggregate per-campaign metrics across tables from previous and new Search Ads 360 data transfers in the new ID space.

SELECT CustomerID, CampaignID, Sum(Clicks), Sum(Cost) FROM
(SELECT
  cs.customer_id AS CustomerID,
  cs.campaign_id AS CampaignID,
  cs.metrics_clicks AS Clicks,
  cs.metrics_cost_micros / 1000000 AS Cost
FROM
  `DATASET.sa_CampaignStats_CUSTOMER_ID` cs
WHERE cs._DATA_DATE = 'NEW_DATA_DATE'
UNION ALL
SELECT
  customer_id_mapping.new_id AS CustomerID,
  campaign_id_mapping.new_id AS CampaignID,
  cs.clicks AS Clicks,
  cs.cost AS Cost
FROM
  `DATASET.CampaignStats_ADVERTISER_ID` cs
LEFT JOIN
  `DATASET.IdMapping_CUSTOMER_ADVERTISER_ID` customer_id_mapping
ON cs.accountId = customer_id_mapping.legacy_id
LEFT JOIN
  `DATASET.IdMapping_CAMPAIGN_ADVERTISER_ID` campaign_id_mapping
ON cs.campaignId = campaign_id_mapping.legacy_id
WHERE cs._DATA_DATE = 'OLD_DATA_DATE')
GROUP BY
1, 2
ORDER BY
1, 2

Replace the following:

  • DATASET: the name of the dataset
  • CUSTOMER_ID: the Search Ads 360 customer ID
  • ADVERTISER_ID: the Search Ads 360 advertiser ID
  • NEW_DATA_DATE: the data date for the new Search Ads 360 table
  • OLD_DATA_DATE: the data date for the previous Search Ads 360 table

The following query makes use of ID mapping tables to aggregate per-campaign metrics across tables from previous and new Search Ads 360 data transfers in the old ID space.

SELECT CustomerID, CampaignID, Sum(Clicks), Sum(Cost) FROM
(SELECT
  customer_id_mapping.legacy_id AS CustomerID,
  campaign_id_mapping.legacy_id AS CampaignID,
  cs.metrics_clicks AS Clicks,
  cs.metrics_cost_micros / 1000000 AS Cost
FROM
  `DATASET.sa_CampaignStats_CUSTOMER_ID` cs
LEFT JOIN
  `DATASET.IdMapping_CUSTOMER_ADVERTISER_ID` customer_id_mapping
ON cs.customer_id = customer_id_mapping.new_id
LEFT JOIN
  `DATASET.IdMapping_CAMPAIGN_ADVERTISER_ID` campaign_id_mapping
ON cs.campaign_id = campaign_id_mapping.new_id
WHERE cs._DATA_DATE = 'NEW_DATA_DATE'
UNION ALL
SELECT
  CAST(accountId AS INT) AS CustomerID,
  CAST(campaignId AS INT) AS CampaignID,
  cs.clicks AS Clicks,
  cs.cost AS Cost
FROM
  `DATASET.CampaignStats_ADVERTISER_ID` cs
WHERE cs._DATA_DATE = 'OLD_DATA_DATE')
GROUP BY
1, 2
ORDER BY
1, 2

Replace the following:

  • DATASET: the name of the dataset
  • CUSTOMER_ID: the Search Ads 360 customer ID
  • ADVERTISER_ID: the Search Ads 360 advertiser ID
  • NEW_DATA_DATE: the data date for the new Search Ads 360 table
  • OLD_DATA_DATE: the data date for the previous Search Ads 360 table

Potential quota issues

The Search Ads 360 reporting API assigns a daily quota for the number of requests that the Google project can send. If you are using one project for the BigQuery Data Transfer Service and other services, all services share the same quota and can potentially reach the quota limit in any service.

To prevent this potential issue without affecting existing workflows, consider these options:

  • Set up a separate project for the BigQuery Data Transfer Service. A cross project table join might look like the following:

      #standardSQL
      select count(a.item1)
      from (select item1, item2 from project-A.data_set_a.table_name_a) a
      inner join
      (select item3, item4 from project-B.data_set_b.table_name_b) b
      on a.item1 = b.item3

  • Contact Search Ads 360 support and request additional quota.