[AWQL] includeZeroImpressions doesn't work with PRODUCT PARTITION REPORT

277 views
Skip to first unread message

Mario

unread,
Oct 15, 2015, 6:30:42 AM10/15/15
to AdWords API Forum
As the title says including zero impression rows doesn't work with the PRODUCT_PARTITION_REPORT.
I consider this as a bug because i did not found anything in the docs or the internet that says this should not work.

My AWQL-Query:

SELECT CampaignName, CampaignId, AdGroupName, AdGroupId, ProductGroup, Impressions
FROM PRODUCT_PARTITION_REPORT
WHERE Impressions >= 0
DURING 20150101, 20151010

So can anybody confirm that this is a bug or point me to a somewhere where it is documented that zero impression are not supported in this report?
Thx in advance...

road11

unread,
Oct 15, 2015, 7:44:28 AM10/15/15
to AdWords API Forum
Mine does. Try excluding the Impressions column. That might be killing zero-impression rows. I'm bringing down only the ID and name columns for campaign, adgroup, and partition, and that's working for me.

If you include certain statistic columns in  your select list, it can suppress zero-impression rows. 

Eric

Umesh Dengale

unread,
Oct 15, 2015, 11:03:55 AM10/15/15
to AdWords API Forum
Hello,

You could use the predicate WHERE Impressions > 0 in your above report AWQL query instead of WHERE Impressions >= 0. Please check out our exclude zero impressions with predicate section of zero impressions reports document.

Cheers,
Umesh, AdWords API Team.

Mario

unread,
Oct 21, 2015, 5:08:59 AM10/21/15
to AdWords API Forum
thanks for the answers
@road11: ok, this pointed me in the correct direction :)
@Umesh: that's not what i want: i NEED both: rows with and without zero impressions. So i do two queries now and combine the data by myself... it is irritating that there is no hint in the report documentation that statistic columns do exclude 0 impressions for this special report - while in other reports 'impressions >= 0' works

Umesh Dengale

unread,
Oct 21, 2015, 4:15:08 PM10/21/15
to AdWords API Forum
Hello,

The CampaignName, CampaignId, AdGroupName, AdGroupId, ProductGroup, Impressions columns support the zero impressions. There is no need to include Impression condition (where clause) in the report. The query will return rows including zero impressions.

More information about an impression for the PRODUCT_PARTITION_REPORT described in the report page -- an impression for a product will be attributed to the row for every product partition that contains the product. Please see the report description with the example.

Thanks,
Umesh, AdWords API Team.

mvbentes

unread,
Nov 21, 2016, 1:37:09 AM11/21/16
to AdWords API Forum
I will resurrect this old topic to clarify a little more as the answers here helped me, but still required some legwork.

As it seems, at leas in the python API, the default is not to return zero impression rows. 
The trick is that the checking of the condition appears to be all(value_columns.values == 0). So, if no value columns are requested, i.e. only categorical data, the condition will not be triggered and data comes anyway. That would be why @road11 sugestion worked.

To make a request with value columns and still get zero impression rows, one needs to explicitly declare the includeZeroImpressions header. How to do that might vary according to the language.

In python one could do that when creating the api_client object to have it added to all report requests. Alternativelly it is possible to add the header on a per report basis. As stated in the documentation, my code turned out as follows:
report_downloader.DownloadReportAsStreamWithAwql(report_query, 
                                                                               include_zero_impressions=True,
                                                                               skip_report_header=True, 
                                                                               skip_column_header=True, 
                                                                               skip_report_summary=True)

With that I got the expected result. 

Peter Oliquino

unread,
Nov 21, 2016, 1:59:12 AM11/21/16
to AdWords API Forum
Hi,

This appears to be a very old forum thread. I would recommend that you create a new one and include your concerns in that thread. We can continue our discussion of your issue from there.

Thanks and regards,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages