Product Partition Report Migration Problem

41 views
Skip to first unread message

Pete Lavetsky (AdWords API Guru)

unread,
Mar 31, 2020, 1:18:11 PM3/31/20
to AdWords API and Google Ads API Forum
Hi All,

I am attempting to migrate our Product Partition report but running into a few problems. I'm referencing the fields here: https://developers.google.com/google-ads/api/docs/migration/reports#product_partition

The question boils down to: what resource do I want in my from clause?

Here are the errors I'm running into:

query: "select customer.id, campaign.id, ad_group.id, ad_group_criterion.criterion_id, segments.ad_network_type, segments.date, segments.device, ad_group_criterion.listing_group.type, metrics.impressions, metrics.clicks, metrics.cost_micros, metrics.search_click_share, metrics.search_impression_share, metrics.conversions from ad_group where segments.date   DURING   LAST_7_DAYS "
page_size: 5000

Failure message: errors {
  error_code {
    query_error: PROHIBITED_RESOURCE_TYPE_IN_SELECT_CLAUSE
  }
  message: "Cannot select fields from the following resource: \'AD_GROUP_CRITERION\', since the resource is incompatible with the resource in FROM clause."
}


Or:

query: "select customer.id, campaign.id, ad_group.id, ad_group_criterion.criterion_id, segments.ad_network_type, segments.date, segments.device, ad_group_criterion.listing_group.type, metrics.impressions, metrics.clicks, metrics.cost_micros, metrics.search_click_share, metrics.search_impression_share, metrics.conversions from ad_group_criterion where segments.date   DURING   LAST_7_DAYS "


Failure message: errors {

  error_code {

    query_error: PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE

  }

  message: "Cannot select or filter on the following metrics: \'impressions\'(could not support requested resources: \'AD_GROUP_CRITERION\', \'AD_GROUP_CRITERION\'), \'clicks\'(could not support requested resources: \'AD_GROUP_CRITERION\', \'AD_GROUP_CRITERION\'), \'cost_micros\'(could not support requested resources: \'AD_GROUP_CRITERION\', \'AD_GROUP_CRITERION\'), \'search_click_share\'(could not support requested resources: \'AD_GROUP_CRITERION\', \'AD_GROUP_CRITERION\'), \'search_impression_share\'(could not support requested resources: \'AD_GROUP_CRITERION\', \'AD_GROUP_CRITERION\'), \'conversions\'(could not support requested resources: \'AD_GROUP_CRITERION\', \'AD_GROUP_CRITERION\'), since metric is incompatible with the resource in the FROM clause or other selected segmenting resources."

}


Thanks

Pete


Google Ads API Forum Advisor Prod

unread,
Mar 31, 2020, 3:10:47 PM3/31/20
to pete.l...@gmail.com, adwor...@googlegroups.com
Hi Pete,

Thank you for reaching out. As shown here, you should use the product_group_view report to emulate the AdWords Product Partition report. From here, you can reference the customer, ad_group, and ad_group_criterion reports.

Regards,
Mitchell
Google Ads API Team

ref:_00D1U1174p._5001UZVPaV:ref

Pete Lavetsky (AdWords API Guru)

unread,
Mar 31, 2020, 3:35:10 PM3/31/20
to AdWords API and Google Ads API Forum
Thanks Mitchell,

Guess I glazed over that section of the page and didn't connect the dots.

Pete
Reply all
Reply to author
Forward
0 new messages