PRODUCT_PARTITION_REPORT Error

89 views
Skip to first unread message

Anup Pathak

unread,
Dec 3, 2014, 7:07:41 AM12/3/14
to adwor...@googlegroups.com
Hi,

I am using Adwords API Python Library, i am trying to fetch  PRODUCT_PARTITION_REPORT i got following error 

code snippet:

report_downloader = client.GetReportDownloader(version='v201409') 
  report = {
      'reportName': 'CUSTOM_DATE PRODUCT_PARTITION_REPORT',
      'dateRangeType': 'CUSTOM_DATE',
      'reportType': 'PRODUCT_PARTITION_REPORT',
      'downloadFormat': 'XML',
      'selector': {
          'fields': ['CampaignId', 'CampaignName', 'AdGroupId', 'AdGroupName', 'Id', 'BenchmarkAverageMaxCpc', 'Clicks', 'Impressions', 'Cost', 'AverageCpc', 'Conversions', 'ConversionValue', 'ConversionRate' ],
          'dateRange': {'min':[startDate],'max':[endDate]},
          'predicates': [
                         {
                          'field': 'AdGroupStatus',
                          'operator': 'IN',
                          'values': ['ENABLED']  
                          }
                         ],
                   },
      'includeZeroImpressions': 'true'
    }
  with open(PATH, 'w') as output_file:
       file_path = report_downloader.DownloadReport(report, output_file)


Error: 

googleads.errors.AdWordsReportBadRequestError: Type: ReportDefinitionError.INVALID_FIELD_NAME_FOR_REPORT
Trigger: None
Field Path: AdGroupStatus


I have also tried using "Status" and " CampaignStatus "  it not worked for me.

Please suggest me solution on it.

Thank You!
Anup Pathak 

  

Anup Pathak

unread,
Dec 3, 2014, 8:29:04 AM12/3/14
to adwor...@googlegroups.com
Hi,

Its working using CampaignId and AdGroupId, 

for ex:
report = {
      'reportName': 'CUSTOM_DATE PRODUCT_PARTITION_REPORT',
      'dateRangeType': 'CUSTOM_DATE',
      'reportType': 'PRODUCT_PARTITION_REPORT',
      'downloadFormat': 'XML',
      'selector': {
          'fields': ['CampaignId', 'CampaignName', 'AdGroupId', 'AdGroupName', 'Id', 'BenchmarkAverageMaxCpc', 'Clicks', 'Impressions', 'Cost', 'AverageCpc', 'Conversions', 'ConversionValue', 'ConversionRate' ],
          'dateRange': {'min':[startDate],'max':[endDate]},
          'predicates': [
                         {
                          'field': 'CampaignId',
                          'operator': 'EQUALS',
                          'values': [campaign_id]  
                          }
                         ],
                   },
      'includeZeroImpressions': 'true'
    }
  with open(PATH, 'w') as output_file:
       file_path = report_downloader.DownloadReport(report, output_file)

please suggest me any other solution. 

Thank You!
Anup Pathak

Josh Radcliff (AdWords API Team)

unread,
Dec 3, 2014, 9:06:49 AM12/3/14
to adwor...@googlegroups.com
Hi Anup,

The list of valid fields for each report is listed on the Report Types page. The Product Partition Report does not have a field for the status of an ad group. If you need to filter to only ENABLED ad groups then you should run an Ad Group Performance Report filtered by AdGroupStatus, collect the AdGroupId values from that report, and then use those in an AdGroupId predicate in the Product Partition Report.

We're aware that having AdGroupStatus would be useful on the Product Partition Report (as well as some other reports where it's not available), and I've passed this suggestion on to the reporting team.

Thanks,
Josh, AdWords API Team

Anup Pathak

unread,
Dec 3, 2014, 9:14:42 AM12/3/14
to adwor...@googlegroups.com
Hi Josh,

Thank you for your quick response,
 

Thank you for you solution on this issue




  

On Wednesday, December 3, 2014 5:37:41 PM UTC+5:30, Anup Pathak wrote:
Reply all
Reply to author
Forward
0 new messages