Hi Bharani,
The below is the code that I used. Please guide me so that I can download 
ad report with necessary columns and metrics.

import sys
from googleads import adwords

def main(client):
    # Initialize appropriate service.
    report_downloader = client.GetReportDownloader(version='v201710')

    # Create report query.
    report_query = (adwords.ReportQueryBuilder()
                  .Select('AdGroupName','Labels','Impressions', 
'Clicks','Cost')
                  .From('AD_PERFORMANCE_REPORT')
                  .Where('Status').In('ENABLED', 'PAUSED')
                  .During('LAST_7_DAYS')
                  .Build())

    # You can provide a file object to write the output to. For this
    # demonstration we use sys.stdout to write the report to the screen.
    result = report_downloader.DownloadReportAsStringWithAwql(report_query, 
'CSV', skip_report_header=False, 
                                                            
skip_column_header=False,skip_report_summary=False, 
                                                            
include_zero_impressions=True)
    file_path = 'my path'
    with open(file_path, 'w') as out_file:
        out_file.write(result)

if __name__ == '__main__':
  # Initialize client object.
    adwords_client = adwords.AdWordsClient.LoadFromStorage(path of 
credentials.yaml")
    adwords_client.client_customer_id = 'my id goes here'
    main(adwords_client)
Thanks!

On Friday, 17 November 2017 01:08:21 UTC+5:30, Bharani Cherukuri (AdWords 
API Team) wrote:
>
> Hi Harish, 
>
> Can you confirm which version of the googleads-python client library 
> <https://github.com/googleads/googleads-python-lib/releases> are you 
> using. The ReportQueryBuilder change was introduced in v9.0.0. If you're 
> using an earlier version of the library and trying to use the samples from 
> the latest version, you might encounter this error.
>
> Regards,
> Bharani, AdWords API Team
>
> On Tuesday, November 14, 2017 at 5:05:21 AM UTC-5, 
> harish....@latentview.com wrote:
>>
>> Is it possible to apply adgroup label filter while downloading ad 
>> performance report? (This is not possible using the UI)
>>
>> This email may contain confidential and privileged information for the sole 
>> use of the intended recipient. Any review or distribution by others is 
>> strictly prohibited. If you are not the intended recipient, please reply 
>> back to the sender about the error and delete all copies of this email 
>> message. Thank you.
>>
>>
-- 


This email may contain confidential and privileged information for the sole use 
of the intended recipient. Any review or distribution by others is strictly 
prohibited. If you are not the intended recipient, please reply back to the 
sender about the error and delete all copies of this email message. Thank you.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
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/102103bc-7944-40a0-8994-7e7ab9742f31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Ad group labe... harish.padmakar via AdWords API Forum
    • Re: Ad g... 'Bharani Cherukuri (AdWords API Team)' via AdWords API Forum
      • Re: ... harish.padmakar via AdWords API Forum
    • Re: Ad g... 'Bharani Cherukuri (AdWords API Team)' via AdWords API Forum
      • Re: ... harish.padmakar via AdWords API Forum
        • ... harish.padmakar via AdWords API Forum
    • Re: Ad g... 'Bharani Cherukuri (AdWords API Team)' via AdWords API Forum
      • Re: ... harish.padmakar via AdWords API Forum
    • Re: Ad g... 'Bharani Cherukuri (AdWords API Team)' via AdWords API Forum
      • Re: ... harish.padmakar via AdWords API Forum
    • Re: Ad g... 'Bharani Cherukuri (AdWords API Team)' via AdWords API Forum
      • Re: ... harish.padmakar via AdWords API Forum
    • Re: Ad g... 'Bharani Cherukuri (AdWords API Team)' via AdWords API Forum
      • Re: ... harish.padmakar via AdWords API Forum
    • Re: Ad g... 'Bharani Cherukuri (AdWords API Team)' via AdWords API Forum
      • Re: ... harish.padmakar via AdWords API Forum
        • ... harish.padmakar via AdWords API Forum
        • ... harish.padmakar via AdWords API Forum

Reply via email to