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
On Wednesday, December 3, 2014 5:37:41 PM UTC+5:30, Anup Pathak wrote:
>
> 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
>
>
>
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/db59652a-97bd-4fe5-b214-1746fdb7340c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.