Report format - Columnar vs Flat struture

33 views
Skip to first unread message

Vikram Tiwari

unread,
Nov 21, 2016, 3:46:49 PM11/21/16
to AdWords API Forum
I am trying to replicate how reports are shown/generated from the UI via Python SDK.

In the UI if I take Conversion Action Name (ConversionTypeName) I get the ability to add it as a row or as a column (Attached Screenshot).

First Format: If I add it as a row all the different conversion types go under one column and the values in that column are string values. To get actual counts, I have to add Conversions and the count is populated into another column.

Second Format: But if I add it as a column, different conversion types become different columns and the numeric values end up forming rows. This is the structure that I am trying to replicate via API.

While using Python SDK and AWQL I only get the ability to pass it in fields. That ends up downloading the report in the first format. How do I tweak my query to get it in flat format?

Details:
SDK version: v201609
Query: "SELECT Date, AdGroupId, AdGroupName, ConversionTypeName, ConversionTrackerId, Conversions  FROM ADGROUP_PERFORMANCE_REPORT DURING LAST_7_DAYS"



screen_shot_2016-11-21_at_12.31.37_pm.png

Shwetha Vastrad (AdWords API Team)

unread,
Nov 21, 2016, 4:23:58 PM11/21/16
to AdWords API Forum
Hi Vikram,

Adding segment fields to the report query will result in a row for each combination of the segment fields split between them. I'm afraid it's not possible to download the report in the second format described above using AdWords API. You can add predicates to get the results for a particular segment.

Regards,
Shwetha, AdWords API Team.

Vikram Tiwari

unread,
Nov 21, 2016, 5:24:44 PM11/21/16
to AdWords API Forum
Thanks for the quick update Shwetha. Is this something that team is looking to add in next versions or no such plans? A simple flag or a totally different field name should do the trick (at least on the API side).

Shwetha Vastrad (AdWords API Team)

unread,
Nov 21, 2016, 5:30:48 PM11/21/16
to AdWords API Forum
Hi Vikram,

I'm afraid I cannot confirm if this feature will be available in future API versions. I'll go ahead and file a request on your behalf for this. Please keep an eye on our blog for any updates or announcements about new features.

Vikram Tiwari

unread,
Nov 21, 2016, 5:36:28 PM11/21/16
to AdWords API Forum
That works! :) Thanks.
Reply all
Reply to author
Forward
0 new messages