How to download campaign performance report with filter by list of id in campaign_name

7 views
Skip to first unread message

dark knight645

unread,
Jun 27, 2019, 3:09:29 PM6/27/19
to Django users
Hi,

I have for example a bunch of campaigns with name's pattern like this : 'this is a gdn campaign - 233432'  , 
Now I am using Python SDK to download report for each gdn campaign name, but filter by this number 233432 as an id.
so my report query looks like this:
I can request each report by contains('id_1') but it's not efficient and that's why I want to request each time 20 ids into the ContainsAny operation. Does current adwords API support this?
Thanks

report_query = (adwords.ReportQueryBuilder()
.Select('CampaignId', 'Date',
'Impressions', 'Clicks',
'Cost', 'CampaignName')
.From('CAMPAIGN_PERFORMANCE_REPORT')
#.Where('CampaignStatus').In('ENABLED', 'PAUSED')
.Where('CampaignName').ContainsAny(['id_1', 'id_2'])
.During(date_range=date_preset, start_date=start_date, end_date=end_date)
.Build())
Reply all
Reply to author
Forward
0 new messages