Hi,
if I understand that correctly, you can find the root product group id by
searching for the product group that does not have a parent product id.
Right?
But how exactly does the AWQL query in Python have to look like?
Is the following code correct?
report_query = (adwords.ReportQueryBuilder()
.Select('CampaignId', 'AdGroupId', 'Id',
'ParentCriterionId')
.From('PRODUCT_PARTITION_REPORT')
.Where('ParentCriterionId').In(0)#<is this line correct?
.Build())
It seems to work, but I'm struggling with the .In(0) - part, because the
service reference states "Undefined for the root partition":
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupCriterionService.ProductPartition#parentcriterionid
...whereas the report reference does not mention the root at all:
https://developers.google.com/adwords/api/docs/appendix/reports/product-partition-report#parentcriterionid
.Where('ParentCriterionId').In(None)
...throws an error.
Or would you recommend using the AdGroupCriterionService for this task?
Best regards
Matthias
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/f0d316c0-c5fe-4b8e-871c-be4e7d372991%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.