Write Report to Variable?

33 views
Skip to first unread message

Nellle Rickchards

unread,
May 15, 2018, 2:23:31 PM5/15/18
to AdWords API and Google Ads API Forum
The reporting documentation provides this example:
report_downloader.DownloadReportWithAwql(
    report_query, 'CSV', sys.stdin, skip_report_header=False,
    skip_column_header=False, skip_report_summary=False,
    include_zero_impressions=True)

I have updated that code to  download to to a CSV file and then I read the CSV file into my script and output the values.
 
This feels redundant. How can I save the report to something like a python list?

Teja Makani

unread,
May 15, 2018, 5:35:50 PM5/15/18
to AdWords API and Google Ads API Forum
Hello Nellle,

Based on the how you need the data you may need to download the report as a string or stream. However getting the data directly in that format may not be possible. Please check the code samples in reporting for different available options. 

Regards,
Sai Teja, AdWords API Team.

Nellle Rickchards

unread,
May 16, 2018, 3:38:30 PM5/16/18
to AdWords API and Google Ads API Forum
I'm trying to save data directly to a database. It's not a lot as I only need account level data. I was hoping I could do this without downloading to a CSV first.

Teja Makani

unread,
May 17, 2018, 12:17:12 PM5/17/18
to AdWords API and Google Ads API Forum
Hello Nellle,

I am afraid that the options described in my previous response might be the only options. Were you able to try those?

Zweitze

unread,
May 22, 2018, 5:03:09 AM5/22/18
to AdWords API and Google Ads API Forum
You may want to look for add-ons for your DBMS.
For instance, if you use Microsoft SQL Server, multiple SSIS components are available. Search for "SSIS AdWords".

(Disclaimer: I never used any of these and cannot recommend one. I do know that such components have to be updated regularly because AdWords API is updated every few months.)
Reply all
Reply to author
Forward
0 new messages