<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AdWords Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/adwords/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/adwords/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 17 Apr 2025 14:50:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.4</generator>

<image>
	<url>https://zappysys.com/blog/wp-content/uploads/2023/01/cropped-zappysys-symbol-large-32x32.png</url>
	<title>AdWords Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/adwords/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Download AdWords report using Google Ads API, ODBC, and XML Driver</title>
		<link>https://zappysys.com/blog/download-adwords-report-using-google-api-odbc-xml-driver/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 24 Oct 2019 13:49:00 +0000</pubDate>
				<category><![CDATA[ODBC Drivers]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[ads]]></category>
		<category><![CDATA[AdWords]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[reporting]]></category>
		<category><![CDATA[xml driver]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8244</guid>

					<description><![CDATA[<p>Introduction In the previous article, we learned how to get data from AdWords in SSIS and basically control your AdWords account programmatically, outside the dashboard. In this one, we will continue on how to download AdWords report by using Google Ads API, ODBC, and ZappySys XML Driver. Let&#8217;s not waste our time and cut to [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/download-adwords-report-using-google-api-odbc-xml-driver/">Download AdWords report using Google Ads API, ODBC, and XML Driver</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/google-ads-connector/">API Connector for Google AdWords</a> which makes it much simpler to <strong>Read/Write Google AdWords Data in SSIS/ODBC</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).<br />
</div></div>
<p>In the previous article, we learned <a href="https://zappysys.com/blog/get-data-from-google-adwords-using-ssis/" target="_blank" rel="noopener">how to get data from AdWords </a><a href="https://zappysys.com/blog/get-data-from-google-adwords-using-ssis/" target="_blank" rel="noopener">in SSIS</a> and basically control your AdWords account programmatically, outside the dashboard. In this one, we will continue on how to download AdWords report by using Google Ads API, ODBC, and ZappySys XML Driver. Let&#8217;s not waste our time and cut to the chase!</p>
<h2>Prerequisites</h2>
<ol>
<li><a href="http://ads.google.com" target="_blank" rel="noopener">Google Ads</a> account up and running.</li>
<li><a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed.</li>
</ol>
<h2>Step-by-Step &#8211; Download AdWords report</h2>
<h3>Get Developer Token</h3>
<p>The first important step to access any Google Ads Account is to request a developer token. <a href="https://developers.google.com/adwords/api/docs/guides/first-api-call" target="_blank" rel="noopener">Click this link</a> for step by step information. Watch a short video to get an overview of the entire process to access data via API.</p>
<h3>Get Client Customer Id</h3>
<p>Login into a <em><strong>non-manager</strong></em> account at <a href="https://ads.google.com" target="_blank" rel="noopener">https://ads.google.com</a> and get your Client Customer Id:</p>
<div id="attachment_8247" style="width: 594px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-clientCustomerId.png" rel="attachment wp-att-8247"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-8247" class="wp-image-8247 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-clientCustomerId.png" alt="" width="584" height="341" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-clientCustomerId.png 584w, https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-clientCustomerId-300x175.png 300w" sizes="(max-width: 584px) 100vw, 584px" /></a><p id="caption-attachment-8247" class="wp-caption-text">Getting Google Ads (formerly AdWords) Client Customer Id</p></div>
<p>Copy it to a notepad, we will use it later.</p>
<h3>Open ODBC Data Sources Manager</h3>
<div class="content_block" id="custom_post_widget-8248">Search for "odbc" in your start menu and click on ODBC (64 bits). If you can't find this then you can also go to <span class="lang:default highlight:0 decode:true crayon-inline">Start Menu &gt; ZappySys &gt; ODBC PowerPack &gt; Click on ODBC Data Sources (64-Bit)</span>.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/odbc-data-source-64-bits.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/03/odbc-data-source-64-bits.png" alt="Open ODBC Data Source" />
</a>
<p class="wp-caption-text">Open ODBC Data Source</p>

</div></div>
<h3>Create ODBC Data Source based on ZappySys XML Driver</h3>
<div class="content_block" id="custom_post_widget-8251">Select tab <em>User DSN</em> if you want to create a data source only for your user, or select System DSN to create a data source for all users or for OS services (e.g. SQL Server Agent):
<div class="wp-caption alignnone">
<img decoding="async" class="alignnone size-full wp-image-8252" src="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-create-xml-driver-based-dsn.png" alt="" width="657" height="486" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-create-xml-driver-based-dsn.png 657w, https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-create-xml-driver-based-dsn-300x222.png 300w" sizes="(max-width: 657px) 100vw, 657px" />
<p class="wp-caption-text">Creating ZappySys XML Driver based data source</p>
</div></div>
<h3>Configure authentication in the ODBC data source</h3>
<p>Let&#8217;s authenticate first:</p>
<ol>
<li>Select <strong>OAuth</strong> in <em>Connection Type</em> property.</li>
<li>Click <strong>Click to Configure</strong> link.</li>
<li>In <em>OAuth Provider</em> property select <strong>Google</strong>.</li>
<li>Then either select <strong>Use Default OAuth App</strong> or <strong>Use Custom OAuth App</strong>. For the latter, you will need to create a <a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/#Step-By-Step_How_to_register_Google_OAuth_Application" target="_blank" rel="noopener">Google OAuth App yourself</a>. It&#8217;s perfectly safe to use the default application, but if your company policy does not allow it, you may consider creating it yourself.</li>
<li>In <em>Scopes</em> enter:<br />
<code>https://www.googleapis.com/auth/adwords</code></li>
<li>Then hit <strong>Generate Token</strong> and hit allow once asked.</li>
</ol>
<div id="attachment_8261" style="width: 666px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-oauth-configuration-getting-tokens.png"><img decoding="async" aria-describedby="caption-attachment-8261" class="wp-image-8261 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-oauth-configuration-getting-tokens.png" alt="" width="656" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-oauth-configuration-getting-tokens.png 656w, https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-oauth-configuration-getting-tokens-264x300.png 264w" sizes="(max-width: 656px) 100vw, 656px" /></a><p id="caption-attachment-8261" class="wp-caption-text">Download AdWords report &#8211; Configuring authentication in ODBC data source</p></div>
<h3>Proceed with HTTP request configuration</h3>
<p>Then go on with configuring the data source:</p>
<div id="attachment_8260" style="width: 711px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-xml-data-source-configuration.png" rel="attachment wp-att-8260"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8260" class="wp-image-8260 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-xml-data-source-configuration.png" alt="" width="701" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-xml-data-source-configuration.png 701w, https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-xml-data-source-configuration-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-xml-data-source-configuration-300x300.png 300w" sizes="(max-width: 701px) 100vw, 701px" /></a><p id="caption-attachment-8260" class="wp-caption-text">Configuring HTTP request in ODBC data source to download an AdWords report</p></div>
<ol>
<li>Give your data source a name</li>
<li>Then input this URL to download the report:<br />
<code>https://adwords.google.com/api/adwords/reportdownload/v201809</code><br />
If the above URL does not work, <a href="https://developers.google.com/adwords/api/docs/guides/reporting#http_request_url" target="_blank" rel="noopener">get the working one from Google&#8217;s documentation</a>.</li>
<li>Input <strong>POST</strong> as <em>HTTP Request Method</em>.</li>
<li>In Body enter this text:<br />
<code>__rdxml=&lt;reportDefinition xmlns="https://adwords.google.com/api/adwords/cm/v201809"&gt;<br />
&lt;selector&gt;<br />
&lt;fields&gt;CampaignId&lt;/fields&gt;<br />
&lt;fields&gt;Impressions&lt;/fields&gt;<br />
&lt;fields&gt;Clicks&lt;/fields&gt;<br />
&lt;fields&gt;Cost&lt;/fields&gt;<br />
&lt;predicates&gt;<br />
&lt;field&gt;CampaignStatus&lt;/field&gt;<br />
&lt;operator&gt;IN&lt;/operator&gt;<br />
&lt;values&gt;ENABLED&lt;/values&gt;<br />
&lt;values&gt;PAUSED&lt;/values&gt;<br />
&lt;/predicates&gt;<br />
&lt;/selector&gt;<br />
&lt;reportName&gt;My Campaign Performance Report&lt;/reportName&gt;<br />
&lt;reportType&gt;CAMPAIGN_PERFORMANCE_REPORT&lt;/reportType&gt;<br />
&lt;dateRangeType&gt;LAST_7_DAYS&lt;/dateRangeType&gt;<br />
&lt;downloadFormat&gt;XML&lt;/downloadFormat&gt;<br />
&lt;/reportDefinition&gt;</code><br />
This will display the data of CAMPAIGN_PERFORMANCE_REPORT report (campaign Id, impressions, clicks, and cost) for the last 7 days, for all campaigns that are enabled or paused. Make sure to visit the <a href="https://developers.google.com/adwords/api/docs/guides/reporting#create_a_report_definition" target="_blank" rel="noopener">Google documentation page</a>, which contains the information about how to download a different kind of report, how to configure predicates, etc.</li>
<li>In <em>Body Content Type</em> property select <strong>Form (application/x-www-form-urlencoded) </strong>option.</li>
<li>In <em>HTTP Headers</em> enter your <strong>developerToken</strong> and <strong>clientCustomerId</strong> retrieved in previous steps.</li>
</ol>
<h3>Select data filter in ODBC data source</h3>
<p>Then hit <strong>Select Filter</strong> button and select <strong>row</strong> node, so that <em>Array Filter</em> is set to <strong>$.report.table.row[*]</strong></p>
<div id="attachment_8264" style="width: 662px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/download-adwords-report-using-google-api-odbc-xml-driver/download-adwords-report-using-google-api-and-odbc-the-filter/#main" rel="attachment wp-att-8264"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8264" class="wp-image-8264 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-the-filter.png" alt="" width="652" height="696" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-the-filter.png 652w, https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-the-filter-281x300.png 281w" sizes="(max-width: 652px) 100vw, 652px" /></a><p id="caption-attachment-8264" class="wp-caption-text">Filtering on AdWords report data</p></div>
<p>If asked whether you want to treat the <strong>row</strong> element as an array, click &#8220;yes&#8221;. You can also go to the <strong>Xml Array Handling</strong> tab and see if the element <strong>row</strong> is specified there.</p>
<h2>The Results</h2>
<p>To view the results press <strong>Preview</strong> tab and then click <strong>Preview Data</strong>:</p>
<div id="attachment_8266" style="width: 628px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-the-results-b.png" rel="attachment wp-att-8266"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8266" class="wp-image-8266 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-the-results-b.png" alt="" width="618" height="647" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-the-results-b.png 618w, https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-the-results-b-287x300.png 287w" sizes="(max-width: 618px) 100vw, 618px" /></a><p id="caption-attachment-8266" class="wp-caption-text">Previewing AdWords report data</p></div>
<p>Now you can use this data source and get the data into an <a href="https://zappysys.com/blog/import-json-excel-load-file-rest-api/#How_to_import_REST_API_data_to_Excel" target="_blank" rel="noopener">Excel sheet</a>, <a href="https://zappysys.com/blog/call-soap-api-power-bi-read-xml-web-service-data/#Import_XML_SOAP_Web_Service_in_Power_BI_Using_XML_Driver" target="_blank" rel="noopener">Power BI report</a>, <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-gateway/" target="_blank" rel="noopener">SQL Server</a> (would need to create a data source in <a href="https://zappysys.com/products/odbc-powerpack/data-gateway/" target="_blank" rel="noopener">ZappySys Data Gateway</a> instead) or <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-app-integration/" target="_blank" rel="noopener">elsewhere</a>.</p>
<h2>Reusing the data source</h2>
<p>If your client application supports, you can override data source settings, such as HTTP body, in SQL query using <strong>WITH</strong> clause. In that case, you won&#8217;t need to create multiple data sources for different kind of reports; e.g.:</p>
<p><code>SELECT * FROM $ (RequestData='@c:\files\report-definition.txt')</code></p>
<p><code>SELECT * FROM $ (RequestData='__rdxml=&lt;reportDefinition xmlns="https://adwords.google.com/api/adwords/cm/v201809"&gt;<br />
&lt;selector&gt;<br />
&lt;fields&gt;CampaignId&lt;/fields&gt;<br />
&lt;fields&gt;Cost&lt;/fields&gt;<br />
&lt;/selector&gt;<br />
&lt;reportName&gt;My Campaign Performance Report&lt;/reportName&gt;<br />
&lt;reportType&gt;CAMPAIGN_PERFORMANCE_REPORT&lt;/reportType&gt;<br />
&lt;dateRangeType&gt;LAST_7_DAYS&lt;/dateRangeType&gt;<br />
&lt;downloadFormat&gt;XML&lt;/downloadFormat&gt;<br />
&lt;/reportDefinition&gt;')</code></p>
<p>Build a SQL query using the <strong>Query Builder</strong>:</p>
<div id="attachment_8267" style="width: 597px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8267" class="wp-image-8267 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-query-builder.png" alt="" width="587" height="373" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-query-builder.png 587w, https://zappysys.com/blog/wp-content/uploads/2019/10/download-adwords-report-using-google-api-and-odbc-query-builder-300x191.png 300w" sizes="(max-width: 587px) 100vw, 587px" /><p id="caption-attachment-8267" class="wp-caption-text">Use Query Builder to construct SQL query and override data source properties</p></div>
<h2>Conclusion</h2>
<p>In this article, we learned how to download AdWords report using ODBC PowerPack and Google API. We created an ODBC data source based on XML Driver, then configured the OAuth authentication, HTTP request and data filtering without a single line of code. Then we previewed AdWords &#8220;Campaign Performance Report&#8221; data and finally, considered how to reuse the data source we created. Visit <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-app-integration/" target="_blank" rel="noopener">https://zappysys.com/blog/category/odbc-powerpack/odbc-app-integration/</a> for examples of how to integrate data sources based on ZappySys Drivers into applications.</p>
<h2>References</h2>
<p><a href="https://developers.google.com/adwords/api/docs/guides/reporting" target="_blank" rel="noopener">https://developers.google.com/adwords/api/docs/guides/reporting</a></p>
<p><a href="https://developers.google.com/adwords/api/docs/appendix/reports" target="_blank" rel="noopener">https://developers.google.com/adwords/api/docs/appendix/reports</a></p>
<p><a href="https://developers.google.com/adwords/api/docs/appendix/reports/campaign-performance-report" target="_blank" rel="noopener">https://developers.google.com/adwords/api/docs/appendix/reports/campaign-performance-report</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/download-adwords-report-using-google-api-odbc-xml-driver/">Download AdWords report using Google Ads API, ODBC, and XML Driver</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to call Google DFP API with SSIS &#8211; DoubleClick</title>
		<link>https://zappysys.com/blog/calling-google-dfp-api-with-ssis-doubleclick-soap-api/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 14 Feb 2017 19:28:31 +0000</pubDate>
				<category><![CDATA[Google API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[AdSense]]></category>
		<category><![CDATA[AdWords]]></category>
		<category><![CDATA[API Integration]]></category>
		<category><![CDATA[DFP]]></category>
		<category><![CDATA[doubleclick]]></category>
		<category><![CDATA[google api]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[ssis rest api task]]></category>
		<category><![CDATA[ssis xml source]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=1000</guid>

					<description><![CDATA[<p>Introduction Google DoubleClick is one of the most popular platforms for Advertisers. Many times you have need for custom integration or Automation for many operations. In this article we will learn how to Call Google DFP API (i.e. DoubleClick for Publishers) without coding using SSIS (Microsoft SQL Server Integration Services). In our previous article we [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/calling-google-dfp-api-with-ssis-doubleclick-soap-api/">How to call Google DFP API with SSIS &#8211; DoubleClick</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="//zappysys.com/blog/wp-content/uploads/2017/02/google-doubleclick-dfp-api-integration.png"><img loading="lazy" decoding="async" class=" wp-image-1634 alignleft" src="//zappysys.com/blog/wp-content/uploads/2017/02/google-doubleclick-dfp-api-integration.png" alt="" width="198" height="198" srcset="https://zappysys.com/blog/wp-content/uploads/2017/02/google-doubleclick-dfp-api-integration.png 500w, https://zappysys.com/blog/wp-content/uploads/2017/02/google-doubleclick-dfp-api-integration-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2017/02/google-doubleclick-dfp-api-integration-300x300.png 300w" sizes="(max-width: 198px) 100vw, 198px" /></a>Google DoubleClick is one of the most popular platforms for Advertisers. Many times you have need for custom integration or Automation for many operations. In this article we will learn how to Call Google DFP API (i.e. DoubleClick for Publishers) without coding using SSIS (Microsoft SQL Server Integration Services). In our previous article we discussed how to Integrate <a href="https://zappysys.com/blog/get-data-from-google-adwords-using-ssis/" target="_blank" rel="noopener">Google AdWords API using SSIS (Click here)</a>.</p>
<p>If you are new to SSIS then no worry there are plenty of <a href="http://www.bing.com/search?q=ssis+tutorials&amp;src=IE-TopResult&amp;FORM=IE11TR&amp;conversationid=" target="_blank" rel="noopener">tutorials for ssis</a></p>
<p>To achieve Custom integration for DoubleClick (DFP) API we will use <a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">SSIS XML Source</a>. XML Source is part of <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> which has 45+ connectors and Tasks.</p>
<p>&nbsp;</p>
<h2>Prerequisite</h2>
<p>Before you can finish tasks explained in this article you have to finish below steps. This article assumes you have basic knowledge of SSIS (SQL Server Integration Services)</p>
<ol>
<li>Make sure you SSIS designer installed. Sometimes its referred as BIDS or SSDT (<a href="https://msdn.microsoft.com/en-us/mt186501" target="_blank" rel="noopener">Get from here)</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">Download SSIS PowerPack</a></li>
<li><a href="https://www.soapui.org/downloads/soapui.html" target="_blank" rel="noopener">Download SoapUI</a> (Its free third party tool to test SOAP API). SoapUI can help you to generate XML Request BODY easily from WSDL file provided by API Vendor. You can also test your service by supplying parameters.</li>
<li>Optional &#8211; Another very useful Free tool is Fiddler. You can use it to see raw request/response (<a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Check this article</a>)</li>
</ol>
<h2>Download DFP API Example SSIS Package</h2>
<p><a href="//zappysys.com/blog/wp-content/uploads/2017/02/Google-DoubleClick-API-SSIS-DEMO.zip" target="_blank" rel="noopener">Click here to DFP API download Sample for SSIS</a> SSIS Package (SSIS 2012, 2014, 2016)</p>
<p>Screenshot of Sample Package:</p>
<div id="attachment_1059" style="width: 977px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-example-call-google-dfp-api-get-data-from-doubleclick.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1059" class="size-full wp-image-1059" src="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-example-call-google-dfp-api-get-data-from-doubleclick.png" alt="Example SSIS Package - Google DFP API Integration (Read / Write data in Google Double Click for Publisher) - No Coding required" width="967" height="650" srcset="https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-example-call-google-dfp-api-get-data-from-doubleclick.png 967w, https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-example-call-google-dfp-api-get-data-from-doubleclick-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-example-call-google-dfp-api-get-data-from-doubleclick-272x182.png 272w" sizes="(max-width: 967px) 100vw, 967px" /></a><p id="caption-attachment-1059" class="wp-caption-text">Example SSIS Package &#8211; Google DFP API Integration (Read / Write data in Google Double Click for Publisher) &#8211; No Coding required</p></div>
<h2>Making your first DFP API Call using SSIS</h2>
<p>Once you install <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">PowerPack</a> you are ready to execute your very first Google DFP API Call.</p>
<p><strong>NOTE</strong>: If you don&#8217;t have any DFP network for test then see next section (Explains how to create test network for testing).</p>
<p>Lets look at how to call Google DFP API step-by-step.</p>
<ol>
<li>Create new SSIS Project and open package designer</li>
<li>Drag <a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">ZS REST API Task</a> from SSIS control flow toolbox and drop it on designer.<br />
<div class="su-note"  style="border-color:#e5e5c6;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#ffffe0;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a> is useful when you want to call SOAP/REST API but not necessarily parse response into rows and columns. We will look at <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a> later in this article which can actually parse response into rows and columns (Useful to load Google DFP data into SQL Server or other RDBMS / flatfile )</div></div></li>
<li>Double click REST API Task to configure. Select Access mode to [Url from Connection]</li>
<li>Enter following URL in the URL Textbox<br />
<pre class="crayon-plain-tag">&nbsp;https://ads.google.com/apis/ads/publisher/v201702/NetworkService</pre>
</li>
<li>From the connection dialogbox select <strong>ZS-OAUTH</strong> to create new OAuth Connection for DFP API</li>
<li>On OAuth Connection dialogbox select <strong>Google</strong> from Provider dropdown. In this demo we will use Default OAuth App but you can <a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/" target="_blank" rel="noopener">register your own google OAuth app</a> if you wish to use Custom OAuth option from UI.</li>
<li>Enter following Scopes in the Scopes textbox (or select manually by clicking Select Scopes button). Scope is nothing but permission for API (In our case View/Manage DFP data and Read/Write Report Files to Cloud Storage).<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/auth/dfp
https://www.googleapis.com/auth/devstorage.read_only
https://www.googleapis.com/auth/devstorage.write_only
https://www.googleapis.com/auth/cloud-platform.read-only
https://www.googleapis.com/auth/devstorage.full_control
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/devstorage.read_write</pre>
</li>
<li>If you are not going call <a href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/ReportService" target="_blank" rel="noopener">ReportService</a> API to generate Reports in CSV format then you will need only one scope<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/auth/dfp</pre>
</li>
<li>Click Generate Token button. You will see browser popup for login and then Accept option to confirm permissions like below. Once you don&#8217;t it will populate tokens and prompt to save tokens to backup file. Secure token backup to safe place.
<div id="attachment_1034" style="width: 610px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-oauth-2-connection-call-google-dfp-api-doubleclick-soap-webservice.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1034" class="wp-image-1034" src="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-oauth-2-connection-call-google-dfp-api-doubleclick-soap-webservice.png" alt="SSIS OAuth Connection - Connect to Google DFP API (DoubleClick SOAP Web Service)" width="600" height="491" srcset="https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-oauth-2-connection-call-google-dfp-api-doubleclick-soap-webservice.png 816w, https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-oauth-2-connection-call-google-dfp-api-doubleclick-soap-webservice-300x246.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></a><p id="caption-attachment-1034" class="wp-caption-text">SSIS OAuth Connection &#8211; Connect to Google DFP API (DoubleClick SOAP Web Service)</p></div></li>
<li>Once done Click Test Connection and if its green then Click OK to save connection</li>
<li>Once you are back to REST API Task UI then select Method to <strong>POST</strong></li>
<li>Select Request Body <strong>Content Type</strong> to XML (i.e. text/xml)</li>
<li>Click edit button next to <strong>Request Body</strong> and enter following XML.<br />
<pre class="crayon-plain-tag">&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v20="https://www.google.com/apis/ads/publisher/v201702"&gt;
   &lt;soapenv:Header&gt;
      &lt;v20:RequestHeader/&gt;
   &lt;/soapenv:Header&gt;
   &lt;soapenv:Body&gt;
      &lt;v20:getAllNetworks/&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
<div class="su-note"  style="border-color:#e5e5c6;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#ffffe0;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">
<p>If you are wondering how did we get above XML fragment then read next section about using 3rd party tool called SoapUI. Also we have detail article for calling SOAP request. <a href="//zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">Check this article on how to use SoapUI (free 3rd party tool) to create SOAP request Bodyfrom WSDL</a>. DFP has many API endpoints for different actions (e.g. <a href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/NetworkService" target="_blank" rel="noopener">NetworkService</a> , <a href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/InventoryService" target="_blank" rel="noopener">InventoryService</a> , &#8230;). For each service you have different Api URL and different WSDL. In the next section you can learn how to create correct SOAP Body (for POST) using <strong>SoapUI</strong> tool.</p>
<p>For example if you using DFP NetworkService API for version v201702 then your <strong>help page URL would be like this</strong><br />
<a href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/NetworkService" target="_blank" rel="noopener">https://developers.google.com/doubleclick-publishers/docs/reference/v201702/NetworkService</a><br />
And on the same page you will see <strong>WSDL link below</strong><br />
<a href="https://adwords.google.com/api/adwords/mcm/v201609/ManagedCustomerService?wsdl" target="_blank" rel="noopener">https://adwords.google.com/api/adwords/mcm/v201609/ManagedCustomerService?wsdl</a><br />
(Just download that WSDL XML and save to local disk then use with SoapUI to generate XML body to submit for any DFP API call.)</p>
</div></div></li>
<li>Once you done with above steps, your Task Configuration will look like below.
<div id="attachment_1035" style="width: 610px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-rest-api-task-call-dfp-google-doubleclick-api-getAllNetworks.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1035" class="wp-image-1035" src="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-rest-api-task-call-dfp-google-doubleclick-api-getAllNetworks.png" alt="SSIS Rest API Task - Call Google DoubleClick API - Get all DFP Networks" width="600" height="522" srcset="https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-rest-api-task-call-dfp-google-doubleclick-api-getAllNetworks.png 805w, https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-rest-api-task-call-dfp-google-doubleclick-api-getAllNetworks-300x261.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></a><p id="caption-attachment-1035" class="wp-caption-text">SSIS Rest API Task &#8211; Call Google DoubleClick API &#8211; Get all DFP Networks</p></div></li>
<li>Now click Test Request button. You will see Response popup with below content if its successful (Scroll at the bottom on response form and you will see XML data) .. see below<br />
<pre class="crayon-plain-tag">------------------------------------
Request
------------------------------------
POST https 1.1 ==&gt; /apis/ads/publisher/v201702/NetworkService
Host: ads.google.com

&gt;&gt;&gt;&gt; HEADERS &lt;&lt;&lt;&lt;&lt;
Authorization: Bearer ya29.Glz-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: text/xml;charset=UTF-8
User-Agent: ZappySysApp
Host: ads.google.com
Content-Length: 291
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

------------------------------------
Response
------------------------------------
POST 1.1 200 OK==&gt; OK

&gt;&gt;&gt;&gt; HEADERS &lt;&lt;&lt;&lt;&lt;
Content-Encoding: 
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Alt-Svc: quic=":443"; ma=2592000; v="35,34"
Transfer-Encoding: chunked
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=UTF-8
Date: Sun, 26 Feb 2017 01:18:32 GMT
Expires: Sun, 26 Feb 2017 01:18:32 GMT
Server: GSE

&gt;&gt;&gt;&gt; Cookies &lt;&lt;&lt;&lt;&lt;

&gt;&gt;&gt;&gt; CONTENT &lt;&lt;&lt;&lt;&lt;

&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
	&lt;soap:Header&gt;
		&lt;ResponseHeader xmlns="https://www.google.com/apis/ads/publisher/v201702"&gt;
			&lt;requestId&gt;27ab3d2e4e1fcb8f444b317d0b0f871d&lt;/requestId&gt;
			&lt;responseTime&gt;50&lt;/responseTime&gt;
		&lt;/ResponseHeader&gt;
	&lt;/soap:Header&gt;
	&lt;soap:Body&gt;
		&lt;getAllNetworksResponse xmlns="https://www.google.com/apis/ads/publisher/v201702"&gt;
			&lt;rval&gt;
				&lt;id&gt;551196&lt;/id&gt;
				&lt;displayName&gt;XFP sandbox property&lt;/displayName&gt;
				&lt;networkCode&gt;238897396&lt;/networkCode&gt;
				&lt;propertyCode&gt;ca-pub-2799179143725683&lt;/propertyCode&gt;
				&lt;timeZone&gt;America/New_York&lt;/timeZone&gt;
				&lt;currencyCode&gt;USD&lt;/currencyCode&gt;
				&lt;effectiveRootAdUnitId&gt;237897516&lt;/effectiveRootAdUnitId&gt;
				&lt;isTest&gt;true&lt;/isTest&gt;
			&lt;/rval&gt;
		&lt;/getAllNetworksResponse&gt;
	&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>
&nbsp;</li>
</ol>
<h2>How to generate SOAP Request Body using SoapUI tool</h2>
<p>This section describes how to create DoubleClick SOAP API Request Body (XML fragment) for any DFP SOAP API call described anywhere in this article.</p>
<ol>
<li><a href="https://www.soapui.org/downloads/soapui.html" target="_blank" rel="noopener">Download SoapUI</a> (Its free third party tool to test SOAP API). SoapUI can help you to generate XML Request BODY easily from WSDL file provided by API Vendor. You can also test your service by supplying parameters.</li>
<li>Now download WDSL xml for appropriate API calls you want to make. Assume that you want to call  <strong>getAllNetworksResponse</strong> API found under <a href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/NetworkService" target="_blank" rel="noopener">NetworkService</a>. For that first navigate to help file page and open help page. Make sure you select correct version from help navigation. Copy WSDL link and open in new browser window. Save XML to local disk (e.g. c:\api\dfp_networkservice_wsdl.xml (See below screenshot how to find DFP API WSDL link)
<div id="attachment_1043" style="width: 610px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/02/get-dftp-soap-api-wsdl-doubleclick-web-service.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1043" class="wp-image-1043" src="//zappysys.com/blog/wp-content/uploads/2017/02/get-dftp-soap-api-wsdl-doubleclick-web-service.png" alt="How to get Google DFP API WSDL URL (Used to generate POST Body)" width="600" height="501" srcset="https://zappysys.com/blog/wp-content/uploads/2017/02/get-dftp-soap-api-wsdl-doubleclick-web-service.png 969w, https://zappysys.com/blog/wp-content/uploads/2017/02/get-dftp-soap-api-wsdl-doubleclick-web-service-300x250.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></a><p id="caption-attachment-1043" class="wp-caption-text">How to get Google DFP API WSDL URL (Used to generate POST Body)</p></div></li>
<li>Once SoapUI is downloaded and installed click <strong>File</strong> menu &gt; <strong>Create New SOAP Project</strong> option</li>
<li>Name your project (e.g. DFP API) and specify WSDL URL or File Path if it was saved locally (e.g. c:\api\dfp_networkservice_wsdl.xml) and click OK</li>
<li>Now navigate to API Action for which you would like to get Body. Click Request node (If missing create new) and edit request. You may see XML like below (If some optional parameters not visible in XML then click Re-create request with optional parameters button from toolbar)
<div id="attachment_1044" style="width: 610px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/02/google-dfp-api-generate-soap-request-body-from-wsdl.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1044" class="wp-image-1044" src="//zappysys.com/blog/wp-content/uploads/2017/02/google-dfp-api-generate-soap-request-body-from-wsdl.png" alt="Call Google DFP API - Generate SOAP Request Body XML using SoapUI (Google DoubleClick Web Service)" width="600" height="284" srcset="https://zappysys.com/blog/wp-content/uploads/2017/02/google-dfp-api-generate-soap-request-body-from-wsdl.png 727w, https://zappysys.com/blog/wp-content/uploads/2017/02/google-dfp-api-generate-soap-request-body-from-wsdl-300x142.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></a><p id="caption-attachment-1044" class="wp-caption-text">Call Google DFP API &#8211; Generate SOAP Request Body XML using SoapUI (Google DoubleClick Web Service)</p></div></li>
<li>Edit necessary parameters from above XML code and copy to Body of SSIS REST API Task.</li>
</ol>
<h2>Creating test network &#8211; DFP Sandbox</h2>
<p>Very first step we recommend before testing DFP API call is <a href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/NetworkService#makeTestNetwork">create test network</a>. You can call DFP API against LIVE network but not recommended if you are calling create/update API.</p>
<p>To create test network you can follow exact same steps described in the previous section except the Body step (Step#12). Use following Request body to call makeTestNetwork command.</p>
<h3>API makeTestNetwork &#8211; Request</h3>
<p>URL: https://ads.google.com/apis/ads/publisher/v201702/NetworkService<br />
Body (see below):</p><pre class="crayon-plain-tag">&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v20="https://www.google.com/apis/ads/publisher/v201702"&gt;
   &lt;soapenv:Header&gt;
      &lt;v20:RequestHeader/&gt;
   &lt;/soapenv:Header&gt;
   &lt;soapenv:Body&gt;
      &lt;v20:makeTestNetwork/&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre><p>
Once you click Test you may receive following response. Note your network code (e.g. 1122334455 from below). This network code is used in pretty much all DFP API to view or manage ad network related items or properties.</p>
<h3>API makeTestNetwork &#8211; Response</h3>
<pre class="crayon-plain-tag">&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
	&lt;soap:Header&gt;
		&lt;ResponseHeader xmlns="https://www.google.com/apis/ads/publisher/v201702"&gt;
			&lt;requestId&gt;ba61d79efee325bf4b5aa45c46836021&lt;/requestId&gt;
			&lt;responseTime&gt;1021&lt;/responseTime&gt;
		&lt;/ResponseHeader&gt;
	&lt;/soap:Header&gt;
	&lt;soap:Body&gt;
		&lt;makeTestNetworkResponse xmlns="https://www.google.com/apis/ads/publisher/v201702"&gt;
			&lt;rval&gt;
				&lt;id&gt;551196&lt;/id&gt;
				&lt;displayName&gt;XFP sandbox property&lt;/displayName&gt;
				&lt;networkCode&gt;1122334455&lt;/networkCode&gt;
				&lt;propertyCode&gt;ca-pub-2799179143725683&lt;/propertyCode&gt;
				&lt;timeZone&gt;America/Los_Angeles&lt;/timeZone&gt;
				&lt;currencyCode&gt;USD&lt;/currencyCode&gt;
				&lt;effectiveRootAdUnitId&gt;237897516&lt;/effectiveRootAdUnitId&gt;
				&lt;isTest&gt;true&lt;/isTest&gt;
			&lt;/rval&gt;
		&lt;/makeTestNetworkResponse&gt;
	&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>
Above response contains test networkcode copy that code becuase you will need in almost every API call you make later. You can only have one test network. If test network is already created and you try to execute above code then you may receive error  <strong>AuthenticationError.GOOGLE_ACCOUNT_ALREADY_ASSOCIATED_WITH_NETWORK</strong></p>
<p>You can also get network code using two different ways.</p>
<ul>
<li>Visit your DFP console homepage by visiting <a href="https://www.google.com/dfp/" target="_blank" rel="noopener">https://www.google.com/dfp/</a> and you will see network name and code in the top potion. Also its listed in the URL (e.g. https://www.google.com/dfp/1234567)</li>
<li>Another way to get available networks for your login is to visit DFP API Play ground here <a href="https://dfp-playground.appspot.com/" target="_blank" rel="noopener">https://dfp-playground.appspot.com/</a> and you will see network list in the dropdown ( name and network code)</li>
</ul>
<h2>How to Create new Ad Units</h2>
<p>Now lets look at an example which will create few Ad Units by calling <a href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/InventoryService#createAdUnits" target="_blank" rel="noopener">createAdUnits</a> API. If you are creating Ad Unit at the root level then you will need to specify correct Parent ID (i.e  effectiveRootAdUnitId). To obtain that Parent ID you may have to call  <a href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/NetworkService#getcurrentnetwork" target="_blank" rel="noopener">getCurrentNetwork</a> API. In the response you will see effectiveRootAdUnitId.</p>
<p>There is another way to know effectiveRootAdUnitId or Id of any Ad Units which can be Parent for new AdUnit. Goto google.com/dfp &gt; Click Inventory Tab &gt; Click Ad Units Side menu &gt; Click Download ad units hyper link. You can also download AdUnits as CSV file from DFP Portal and look for Ad Units which are created at the root. Parent ID column for Root level Ad Units is basically called effectiveRootAdUnitId.</p>
<p>Now lets look at how to get EffectiveRootID by calling <a href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/NetworkService#getcurrentnetwork" target="_blank" rel="noopener">getCurrentNetwork</a>.</p>
<h3>API getCurrentNetwork &#8211; Request</h3>
<p>URL: https://ads.google.com/apis/ads/publisher/v201702/NetworkService<br />
Body (see below):</p><pre class="crayon-plain-tag">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;soap:Header&gt;
	&lt;RequestHeader xmlns="https://www.google.com/apis/ads/publisher/v201608"&gt;
		&lt;networkCode xmlns="https://www.google.com/apis/ads/publisher/v201608"&gt;1122334455&lt;/networkCode&gt;
		&lt;applicationName xmlns="https://www.google.com/apis/ads/publisher/v201608"&gt;ZappySysApp&lt;/applicationName&gt;
	&lt;/RequestHeader&gt;
	&lt;/soap:Header&gt;
	&lt;soap:Body&gt;
		&lt;getCurrentNetwork xmlns="https://www.google.com/apis/ads/publisher/v201608" /&gt;
	&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre><p>
&nbsp;</p>
<h3>API getCurrentNetwork &#8211; Response</h3>
<pre class="crayon-plain-tag">&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
	&lt;soap:Header&gt;
		&lt;ResponseHeader xmlns="https://www.google.com/apis/ads/publisher/v201608"&gt;
			&lt;requestId&gt;81d1b00e8fbfb862129eb2dd485cf7bb&lt;/requestId&gt;
			&lt;responseTime&gt;4507&lt;/responseTime&gt;
		&lt;/ResponseHeader&gt;
	&lt;/soap:Header&gt;
	&lt;soap:Body&gt;
		&lt;getCurrentNetworkResponse xmlns="https://www.google.com/apis/ads/publisher/v201608"&gt;
			&lt;rval&gt;
				&lt;id&gt;551196&lt;/id&gt;
				&lt;displayName&gt;XFP sandbox property&lt;/displayName&gt;
				&lt;networkCode&gt;1122334455&lt;/networkCode&gt;
				&lt;propertyCode&gt;ca-pub-2799179143725683&lt;/propertyCode&gt;
				&lt;timeZone&gt;America/New_York&lt;/timeZone&gt;
				&lt;currencyCode&gt;USD&lt;/currencyCode&gt;
				&lt;effectiveRootAdUnitId&gt;237897516&lt;/effectiveRootAdUnitId&gt;
				&lt;isTest&gt;true&lt;/isTest&gt;
			&lt;/rval&gt;
		&lt;/getCurrentNetworkResponse&gt;
	&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>
&nbsp;</p>
<p>If you want to save single Element Value from Response into SSIS Variable then perform following steps (example of how to get just effectiveRootAdUnitId from above response)</p>
<ol>
<li>On REST API Task &gt; Go to Response Tab &gt; Select Response Content Type = XML</li>
<li>Enter following expression in the XPath filter<br />
<pre class="crayon-plain-tag">//*[local-name() = 'effectiveRootAdUnitId']</pre>
</li>
<li>Check Save response content option</li>
<li>Select Variable from Dropdown &#8211; Click New Variable &gt; Name it RootAdUnitId.</li>
<li>Click Test Request Button to test&#8230;. In the content textbox you will now see only Numeric value extracted by Filter</li>
</ol>
<div id="attachment_1050" style="width: 832px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-rest-api-save-response-into-variable-xpath-jsonpath-filter-extract-value.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1050" class="size-full wp-image-1050" src="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-rest-api-save-response-into-variable-xpath-jsonpath-filter-extract-value.png" alt="SSIS REST Api Task - How to extract single vale from response and save to SSIS variable" width="822" height="616" srcset="https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-rest-api-save-response-into-variable-xpath-jsonpath-filter-extract-value.png 822w, https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-rest-api-save-response-into-variable-xpath-jsonpath-filter-extract-value-300x225.png 300w" sizes="(max-width: 822px) 100vw, 822px" /></a><p id="caption-attachment-1050" class="wp-caption-text">SSIS REST Api Task &#8211; How to extract single vale from response and save to SSIS variable</p></div>
<p>Once you know Parent ID for your AdUnit now lets look at how to create Ad Units by calling <a href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/InventoryService#createAdUnits" target="_blank" rel="noopener">createAdUnits</a></p>
<h3>API createAdUnits &#8211; Request</h3>
<p>URL: https://ads.google.com/apis/ads/publisher/v201702/InventoryService<br />
Body (see below):</p><pre class="crayon-plain-tag">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
	&lt;soap:Header&gt;
		&lt;RequestHeader xmlns="https://www.google.com/apis/ads/publisher/v201608"&gt;
			&lt;networkCode xmlns="https://www.google.com/apis/ads/publisher/v201608"&gt;1122334455&lt;/networkCode&gt;
			&lt;applicationName xmlns="https://www.google.com/apis/ads/publisher/v201608"&gt;ZappySysApp&lt;/applicationName&gt;
		&lt;/RequestHeader&gt;
	&lt;/soap:Header&gt;
	&lt;soap:Body&gt;
		&lt;createAdUnits xmlns="https://www.google.com/apis/ads/publisher/v201608"&gt;
			&lt;adUnits&gt;
				&lt;parentId&gt;237897516&lt;/parentId&gt;
				&lt;name&gt;Ad_Unit_0&lt;/name&gt;
				&lt;description&gt;Ad unit description #0.&lt;/description&gt;
				&lt;targetWindow&gt;BLANK&lt;/targetWindow&gt;
				&lt;adUnitSizes&gt;
					&lt;size&gt;
						&lt;width&gt;300&lt;/width&gt;
						&lt;height&gt;250&lt;/height&gt;
					&lt;/size&gt;
					&lt;environmentType&gt;BROWSER&lt;/environmentType&gt;
				&lt;/adUnitSizes&gt;
			&lt;/adUnits&gt;
			&lt;adUnits&gt;
				&lt;parentId&gt;237897516&lt;/parentId&gt;
				&lt;name&gt;Ad_Unit_1&lt;/name&gt;
				&lt;description&gt;Ad unit description #1.&lt;/description&gt;
				&lt;targetWindow&gt;BLANK&lt;/targetWindow&gt;
				&lt;adUnitSizes&gt;
					&lt;size&gt;
						&lt;width&gt;300&lt;/width&gt;
						&lt;height&gt;250&lt;/height&gt;
					&lt;/size&gt;
					&lt;environmentType&gt;BROWSER&lt;/environmentType&gt;
				&lt;/adUnitSizes&gt;
			&lt;/adUnits&gt;			
		&lt;/createAdUnits&gt;
	&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre><p>
<h3>API createAdUnits &#8211; Response</h3>
</p><pre class="crayon-plain-tag">&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
	&lt;soap:Header&gt;
		&lt;ResponseHeader xmlns="https://www.google.com/apis/ads/publisher/v201608"&gt;
			&lt;requestId&gt;b244d7ba9b65e96fc42b849a7bfb16e4&lt;/requestId&gt;
			&lt;responseTime&gt;331&lt;/responseTime&gt;
		&lt;/ResponseHeader&gt;
	&lt;/soap:Header&gt;
	&lt;soap:Body&gt;
		&lt;createAdUnitsResponse xmlns="https://www.google.com/apis/ads/publisher/v201608"&gt;
			&lt;rval&gt;
				&lt;id&gt;252312396&lt;/id&gt;
				&lt;parentId&gt;237897516&lt;/parentId&gt;
				&lt;hasChildren&gt;false&lt;/hasChildren&gt;
				&lt;parentPath&gt;
					&lt;id&gt;237897516&lt;/id&gt;
					&lt;name&gt;ca-pub-2799179143725683&lt;/name&gt;
					&lt;adUnitCode&gt;ca-pub-2799179143725683&lt;/adUnitCode&gt;
				&lt;/parentPath&gt;
				&lt;name&gt;Ad_Unit_0&lt;/name&gt;
				&lt;description&gt;Ad unit description#0.&lt;/description&gt;
				&lt;targetWindow&gt;BLANK&lt;/targetWindow&gt;
				&lt;status&gt;ACTIVE&lt;/status&gt;
				&lt;adUnitCode&gt;253312396&lt;/adUnitCode&gt;
				&lt;adUnitSizes&gt;
					&lt;size&gt;
						&lt;width&gt;300&lt;/width&gt;
						&lt;height&gt;250&lt;/height&gt;
						&lt;isAspectRatio&gt;false&lt;/isAspectRatio&gt;
					&lt;/size&gt;
					&lt;environmentType&gt;BROWSER&lt;/environmentType&gt;
					&lt;fullDisplayString&gt;300x250&lt;/fullDisplayString&gt;
				&lt;/adUnitSizes&gt;
				&lt;mobilePlatform&gt;SITE&lt;/mobilePlatform&gt;
				&lt;explicitlyTargeted&gt;false&lt;/explicitlyTargeted&gt;
				&lt;inheritedAdSenseSettings&gt;
					&lt;value&gt;
						&lt;adSenseEnabled&gt;true&lt;/adSenseEnabled&gt;
						&lt;borderColor&gt;FFFFFF&lt;/borderColor&gt;
						&lt;titleColor&gt;0000FF&lt;/titleColor&gt;
						&lt;backgroundColor&gt;FFFFFF&lt;/backgroundColor&gt;
						&lt;textColor&gt;000000&lt;/textColor&gt;
						&lt;urlColor&gt;008000&lt;/urlColor&gt;
						&lt;adType&gt;TEXT_AND_IMAGE&lt;/adType&gt;
						&lt;borderStyle&gt;DEFAULT&lt;/borderStyle&gt;
						&lt;fontFamily&gt;DEFAULT&lt;/fontFamily&gt;
						&lt;fontSize&gt;DEFAULT&lt;/fontSize&gt;
					&lt;/value&gt;
				&lt;/inheritedAdSenseSettings&gt;
				&lt;lastModifiedDateTime&gt;
					&lt;date&gt;
						&lt;year&gt;2017&lt;/year&gt;
						&lt;month&gt;2&lt;/month&gt;
						&lt;day&gt;27&lt;/day&gt;
					&lt;/date&gt;
					&lt;hour&gt;7&lt;/hour&gt;
					&lt;minute&gt;23&lt;/minute&gt;
					&lt;second&gt;32&lt;/second&gt;
					&lt;timeZoneID&gt;PST8PDT&lt;/timeZoneID&gt;
				&lt;/lastModifiedDateTime&gt;
				&lt;smartSizeMode&gt;NONE&lt;/smartSizeMode&gt;
				&lt;isSharedByDistributor&gt;false&lt;/isSharedByDistributor&gt;
				&lt;isSetTopBoxEnabled&gt;false&lt;/isSetTopBoxEnabled&gt;
			&lt;/rval&gt;
			&lt;rval&gt;
				&lt;id&gt;252312516&lt;/id&gt;
				&lt;parentId&gt;237897516&lt;/parentId&gt;
				&lt;hasChildren&gt;false&lt;/hasChildren&gt;
				&lt;parentPath&gt;
					&lt;id&gt;237897516&lt;/id&gt;
					&lt;name&gt;ca-pub-2799179143725683&lt;/name&gt;
					&lt;adUnitCode&gt;ca-pub-2799179143725683&lt;/adUnitCode&gt;
				&lt;/parentPath&gt;
				&lt;name&gt;Ad_Unit_1&lt;/name&gt;
				&lt;description&gt;Ad unit description#2.&lt;/description&gt;
				&lt;targetWindow&gt;BLANK&lt;/targetWindow&gt;
				&lt;status&gt;ACTIVE&lt;/status&gt;
				&lt;adUnitCode&gt;253312516&lt;/adUnitCode&gt;
				&lt;adUnitSizes&gt;
					&lt;size&gt;
						&lt;width&gt;300&lt;/width&gt;
						&lt;height&gt;250&lt;/height&gt;
						&lt;isAspectRatio&gt;false&lt;/isAspectRatio&gt;
					&lt;/size&gt;
					&lt;environmentType&gt;BROWSER&lt;/environmentType&gt;
					&lt;fullDisplayString&gt;300x250&lt;/fullDisplayString&gt;
				&lt;/adUnitSizes&gt;
				&lt;mobilePlatform&gt;SITE&lt;/mobilePlatform&gt;
				&lt;explicitlyTargeted&gt;false&lt;/explicitlyTargeted&gt;
				&lt;inheritedAdSenseSettings&gt;
					&lt;value&gt;
						&lt;adSenseEnabled&gt;true&lt;/adSenseEnabled&gt;
						&lt;borderColor&gt;FFFFFF&lt;/borderColor&gt;
						&lt;titleColor&gt;0000FF&lt;/titleColor&gt;
						&lt;backgroundColor&gt;FFFFFF&lt;/backgroundColor&gt;
						&lt;textColor&gt;000000&lt;/textColor&gt;
						&lt;urlColor&gt;008000&lt;/urlColor&gt;
						&lt;adType&gt;TEXT_AND_IMAGE&lt;/adType&gt;
						&lt;borderStyle&gt;DEFAULT&lt;/borderStyle&gt;
						&lt;fontFamily&gt;DEFAULT&lt;/fontFamily&gt;
						&lt;fontSize&gt;DEFAULT&lt;/fontSize&gt;
					&lt;/value&gt;
				&lt;/inheritedAdSenseSettings&gt;
				&lt;lastModifiedDateTime&gt;
					&lt;date&gt;
						&lt;year&gt;2017&lt;/year&gt;
						&lt;month&gt;2&lt;/month&gt;
						&lt;day&gt;27&lt;/day&gt;
					&lt;/date&gt;
					&lt;hour&gt;7&lt;/hour&gt;
					&lt;minute&gt;23&lt;/minute&gt;
					&lt;second&gt;32&lt;/second&gt;
					&lt;timeZoneID&gt;PST8PDT&lt;/timeZoneID&gt;
				&lt;/lastModifiedDateTime&gt;
				&lt;smartSizeMode&gt;NONE&lt;/smartSizeMode&gt;
				&lt;isSharedByDistributor&gt;false&lt;/isSharedByDistributor&gt;
				&lt;isSetTopBoxEnabled&gt;false&lt;/isSetTopBoxEnabled&gt;
			&lt;/rval&gt;
				&lt;id&gt;252312876&lt;/id&gt;
				&lt;parentId&gt;237897516&lt;/parentId&gt;
				&lt;hasChildren&gt;false&lt;/hasChildren&gt;
				&lt;parentPath&gt;
					&lt;id&gt;237897516&lt;/id&gt;
					&lt;name&gt;ca-pub-2799179143725683&lt;/name&gt;
					&lt;adUnitCode&gt;ca-pub-2799179143725683&lt;/adUnitCode&gt;
				&lt;/parentPath&gt;
				&lt;name&gt;Ad_Unit_4&lt;/name&gt;
				&lt;description&gt;Ad unit description.&lt;/description&gt;
				&lt;targetWindow&gt;BLANK&lt;/targetWindow&gt;
				&lt;status&gt;ACTIVE&lt;/status&gt;
				&lt;adUnitCode&gt;253312876&lt;/adUnitCode&gt;
				&lt;adUnitSizes&gt;
					&lt;size&gt;
						&lt;width&gt;300&lt;/width&gt;
						&lt;height&gt;250&lt;/height&gt;
						&lt;isAspectRatio&gt;false&lt;/isAspectRatio&gt;
					&lt;/size&gt;
					&lt;environmentType&gt;BROWSER&lt;/environmentType&gt;
					&lt;fullDisplayString&gt;300x250&lt;/fullDisplayString&gt;
				&lt;/adUnitSizes&gt;
				&lt;mobilePlatform&gt;SITE&lt;/mobilePlatform&gt;
				&lt;explicitlyTargeted&gt;false&lt;/explicitlyTargeted&gt;
				&lt;inheritedAdSenseSettings&gt;
					&lt;value&gt;
						&lt;adSenseEnabled&gt;true&lt;/adSenseEnabled&gt;
						&lt;borderColor&gt;FFFFFF&lt;/borderColor&gt;
						&lt;titleColor&gt;0000FF&lt;/titleColor&gt;
						&lt;backgroundColor&gt;FFFFFF&lt;/backgroundColor&gt;
						&lt;textColor&gt;000000&lt;/textColor&gt;
						&lt;urlColor&gt;008000&lt;/urlColor&gt;
						&lt;adType&gt;TEXT_AND_IMAGE&lt;/adType&gt;
						&lt;borderStyle&gt;DEFAULT&lt;/borderStyle&gt;
						&lt;fontFamily&gt;DEFAULT&lt;/fontFamily&gt;
						&lt;fontSize&gt;DEFAULT&lt;/fontSize&gt;
					&lt;/value&gt;
				&lt;/inheritedAdSenseSettings&gt;
				&lt;lastModifiedDateTime&gt;
					&lt;date&gt;
						&lt;year&gt;2017&lt;/year&gt;
						&lt;month&gt;2&lt;/month&gt;
						&lt;day&gt;27&lt;/day&gt;
					&lt;/date&gt;
					&lt;hour&gt;7&lt;/hour&gt;
					&lt;minute&gt;23&lt;/minute&gt;
					&lt;second&gt;32&lt;/second&gt;
					&lt;timeZoneID&gt;PST8PDT&lt;/timeZoneID&gt;
				&lt;/lastModifiedDateTime&gt;
				&lt;smartSizeMode&gt;NONE&lt;/smartSizeMode&gt;
				&lt;isSharedByDistributor&gt;false&lt;/isSharedByDistributor&gt;
				&lt;isSetTopBoxEnabled&gt;false&lt;/isSetTopBoxEnabled&gt;
			&lt;/rval&gt;
		&lt;/createAdUnitsResponse&gt;
	&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre><p>
<h2>Loading Google DoubleClick data into SQL Server Table</h2>
<p>So far we saw how to make simple DFP API calls without doing any parsing. Now lets look at how to use <a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">SSIS XML Source</a> which not only make API calls but it will parse XML Response into rows and columns which can be loaded into target database such as SQL Server, Oracle, MySQL or even Flat File. XML Source also supports pagination so if you have many records it will automatically loop through all response untill all records are fetched.</p>
<h3>Step-By-Step &#8211; Using XML Source to read Google DFP data (Parse into rows and columns)</h3>
<ol>
<li>Assuming you have tested your first DFP API Call (Explianed in the beginning of this article). You must have OAuth connection tested for API call.</li>
<li>Drag new Data flow task from SSIS Toolbox</li>
<li>Inside Data flow designer drag and drop <a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">ZS XML Source</a> from toolbox</li>
<li>Double click XML Source to configure.</li>
<li>Set URL as below<br />
https://ads.google.com/apis/ads/publisher/v201702/InventoryService</li>
<li>Check Use credentials option and from Drop down select OAuth connection manager (created in previous section)</li>
<li>Select Method = POST,</li>
<li>Select Request Content Type = XML (text/xml)</li>
<li>Enter Body as below (Click edit button).<br />
<pre class="crayon-plain-tag">&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v20="https://www.google.com/apis/ads/publisher/v201702"&gt;
   &lt;soapenv:Header&gt;
      &lt;v20:RequestHeader&gt;
         &lt;v20:networkCode&gt;238897396&lt;/v20:networkCode&gt;
         &lt;v20:applicationName&gt;ZappySysApp&lt;/v20:applicationName&gt;
      &lt;/v20:RequestHeader&gt;
   &lt;/soapenv:Header&gt;
   &lt;soapenv:Body&gt;
      &lt;v20:getAdUnitsByStatement&gt;
         &lt;v20:filterStatement&gt;
            &lt;v20:query&gt;WHERE Status='ACTIVE'&lt;/v20:query&gt;
         &lt;/v20:filterStatement&gt;
      &lt;/v20:getAdUnitsByStatement&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre>
Notice that in above we calling <a href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/InventoryService#getAdUnitsByStatement" target="_blank" rel="noopener">getAdUnitsByStatement </a>API to fetch all Ad Units which are Active. Here is<a href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/InventoryService.Statement" target="_blank" rel="noopener"> more information about Query Syntax</a> for any API call getXXXXXXByStaement</li>
<li>Now click on <strong>Select Filter</strong> button and select results node and click OK. If prompted add array to list.
<div id="attachment_1054" style="width: 965px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-get-data-from-google-dfp-doubleclick-api-set-filter.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1054" class="size-full wp-image-1054" src="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-get-data-from-google-dfp-doubleclick-api-set-filter.png" alt="SSIS XML Source - Get data from Google DFP API using OAuth (Configure URL, Body and Filter)" width="955" height="750" srcset="https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-get-data-from-google-dfp-doubleclick-api-set-filter.png 955w, https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-get-data-from-google-dfp-doubleclick-api-set-filter-300x236.png 300w" sizes="(max-width: 955px) 100vw, 955px" /></a><p id="caption-attachment-1054" class="wp-caption-text">SSIS XML Source &#8211; Get data from Google DFP API using OAuth (Configure URL, Body and Filter)</p></div></li>
<li>Click Preview to see data. Click Columns tab to review data types (Auto detected). If you wish to change length or datatype then edit there and check Lock option (Last column)
<div id="attachment_1055" style="width: 669px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-preview-google-dfp-data.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1055" class="size-full wp-image-1055" src="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-preview-google-dfp-data.png" alt="SSIS XML Source - Preview Response for Google DoubleClick API Call - Parse into Rows/Columns" width="659" height="272" srcset="https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-preview-google-dfp-data.png 659w, https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-preview-google-dfp-data-300x124.png 300w" sizes="(max-width: 659px) 100vw, 659px" /></a><p id="caption-attachment-1055" class="wp-caption-text">SSIS XML Source &#8211; Preview Response for Google DoubleClick API Call &#8211; Parse into Rows/Columns</p></div></li>
<li>Click OK to save UI</li>
<li>Connect XML Source to same target (e.g. OLEDB Destination &#8211; SQL Server Connection)</li>
<li>Run data flow
<div id="attachment_1056" style="width: 602px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-get-data-from-google-dfp-doubleclick-load-into-sql-server.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1056" class="size-full wp-image-1056" src="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-get-data-from-google-dfp-doubleclick-load-into-sql-server.png" alt="SSIS Execution - Read from Google DFP and load into SQL Server Table" width="592" height="358" srcset="https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-get-data-from-google-dfp-doubleclick-load-into-sql-server.png 592w, https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-get-data-from-google-dfp-doubleclick-load-into-sql-server-300x181.png 300w" sizes="(max-width: 592px) 100vw, 592px" /></a><p id="caption-attachment-1056" class="wp-caption-text">SSIS Execution &#8211; Read from Google DFP and load into SQL Server Table</p></div></li>
</ol>
<h3>Configure Pagination for Google DFP API / PQL Query result</h3>
<p>If you have large dataset to read from DoubleClick API ( when calling API such as <strong>getxxxxxxByStatement</strong>) then we recommend to supply LIMIT and OFFSET clause in your <a href="https://developers.google.com/doubleclick-publishers/docs/pqlreference" target="_blank" rel="noopener">PQL query</a>.</p>
<p>For example if you have 2000 ad units and you want to limit response size by maximum 300 rows then your query can be like below</p><pre class="crayon-plain-tag">--For first request (returns results 1-300)
WHERE Status='ACTIVE' LIMIT 300 OFFSET 0

--For second request (returns results 301-600)
WHERE Status='ACTIVE' LIMIT 300 OFFSET 300

--For third request  (returns results 601-900)
WHERE Status='ACTIVE' LIMIT 300 OFFSET 600

........</pre><p>
This looping logic can be complex to implement if you do manually. But no worry if you are using <a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">SSIS XML Source</a>. It comes with many pagination options (<a href="//zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">Click here to read more about pagination</a>)</p>
<p>See below screenshot how to configure Pagination options for Google DoubleClick API. Basically two places you have to change. Inside body you have to set placeholder and change few settings on Pagination Tab.</p>
<div id="attachment_1052" style="width: 726px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-paginate-large-resultset-google-dfp-api-doubleclick-pql-query-paging.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1052" class="size-full wp-image-1052" src="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-paginate-large-resultset-google-dfp-api-doubleclick-pql-query-paging.png" alt="SSIS XML Source - Configure Pagination for Google DoubleClick API data fetch - PQL LIMIT and OFFSET clause for Google DFP API" width="716" height="608" srcset="https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-paginate-large-resultset-google-dfp-api-doubleclick-pql-query-paging.png 716w, https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-paginate-large-resultset-google-dfp-api-doubleclick-pql-query-paging-300x255.png 300w" sizes="(max-width: 716px) 100vw, 716px" /></a><p id="caption-attachment-1052" class="wp-caption-text">SSIS XML Source &#8211; Configure Pagination for Google DoubleClick API data fetch &#8211; PQL LIMIT and OFFSET clause for Google DFP API</p></div>
<div id="attachment_1053" style="width: 715px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-configure-pagination-using-post-data-method-call-google-dfp-api-doubleclick.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1053" class="size-full wp-image-1053" src="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-configure-pagination-using-post-data-method-call-google-dfp-api-doubleclick.png" alt="SSIS XML Source - Configure Pagination for Google DoubleClick API data fetch - Set Pagination Mode" width="705" height="510" srcset="https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-configure-pagination-using-post-data-method-call-google-dfp-api-doubleclick.png 705w, https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-xml-source-configure-pagination-using-post-data-method-call-google-dfp-api-doubleclick-300x217.png 300w" sizes="(max-width: 705px) 100vw, 705px" /></a><p id="caption-attachment-1053" class="wp-caption-text">SSIS XML Source &#8211; Configure Pagination for Google DoubleClick API data fetch &#8211; Set Pagination Mode</p></div>
<h2>Create CSV Report File and Download in GZip format (*.gz)</h2>
<p>Sometime you have to download large amount of data (Possibly millions of rows) in that case Bulk approach would be better. <a href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/ReportService" target="_blank" rel="noopener">DFP ReportService API</a> allows to call following APIs which can be used to produce CSV report file in *.gz format and then you can download it using REST API Task.</p>
<p>Below are high level steps you have to perform to produce report file and download it.</p>
<ul>
<li>Create the ReportJob by invoking <a class="codelink" href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/ReportService.html#runReportJob">runReportJob</a> command .</li>
<li>Poll the ReportJob object using <a class="codelink" href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/ReportService.html#getReportJob">ReportService.getReportJob</a> (This is required because file is not available right away) .</li>
<li>Continue to poll the ReportJob object until the <a class="codelink" href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/ReportService.ReportJob.html#reportJobStatus">reportJobStatus</a> field is equal to <a class="codelink" href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/ReportService.ReportJobStatus.html#COMPLETED">COMPLETED</a> or <a class="codelink" href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/ReportService.ReportJobStatus.html#FAILED">FAILED</a>.</li>
<li>If successful, fetch the URL for downloading the report by invoking <a class="codelink" href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/ReportService.html#getReportDownloadURL">getReportDownloadURL</a>.</li>
</ul>
<p>Here is the sample SSIS Package to Perform this Action.</p>
<p><a href="//zappysys.com/blog/wp-content/uploads/2017/02/Google-DoubleClick-API-SSIS-DEMO.zip" target="_blank" rel="noopener">Click here to DFP API download Sample for SSIS</a> SSIS Package (SSIS 2012, 2014, 2016)</p>
<p>See below screenshot how to generate Google DFP Report File and download / extract (Unzip) using Drag and Drop SSIS workflow.</p>
<div id="attachment_1179" style="width: 837px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/02/google-dfp-api-doubleclick-soap-create-report-download-file-csv-gzip-format.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1179" class="size-full wp-image-1179" src="//zappysys.com/blog/wp-content/uploads/2017/02/google-dfp-api-doubleclick-soap-create-report-download-file-csv-gzip-format.png" alt="Create Google DFP Report File (CSV / Gzip) and Download Using SSIS (Example of ReportService functions runReportJob, getReportJob and .getReportDownloadURL)" width="827" height="739" srcset="https://zappysys.com/blog/wp-content/uploads/2017/02/google-dfp-api-doubleclick-soap-create-report-download-file-csv-gzip-format.png 827w, https://zappysys.com/blog/wp-content/uploads/2017/02/google-dfp-api-doubleclick-soap-create-report-download-file-csv-gzip-format-300x268.png 300w" sizes="(max-width: 827px) 100vw, 827px" /></a><p id="caption-attachment-1179" class="wp-caption-text">Create Google DFP Report File (CSV / Gzip) and Download Using SSIS (Example of ReportService functions runReportJob, getReportJob and .getReportDownloadURL)</p></div>
<h3>Call runReportJob (Start DFP Report JOB)</h3>
<p>Very first step to produce DFP Report file is call <a class="codelink" href="https://developers.google.com/doubleclick-publishers/docs/reference/v201702/ReportService.html#runReportJob">ReportService &gt;&gt; runReportJob</a> API. See below Command.</p>
<p><strong>Extract Single XML Node Value from SOAP API Response using XPATH</strong></p>
<p>Once you get response you can extract id of your JOB using XPAth Expression (See REST API Task response settings tab. Change Format to XML and type following XPATH expression. This will look for &lt;id&gt;111111&lt;/id&gt; node anywhere in SOAP response XML and extract value (i.e. 111111 )  .. For screenshot see next section</p><pre class="crayon-plain-tag">//*[local-name() = 'id']</pre><p>
<strong>Request</strong></p><pre class="crayon-plain-tag">POST https://ads.google.com/apis/ads/publisher/v201702/ReportService HTTP/1.1
Authorization: Bearer ya29.xxxxxxxxxxxxxxxxxxxxxAKqG89gM-TpReRXO
User-Agent: ZappySysApp/1.0.2017.10531
Content-Type: text/xml
Accept: */*
Cache-Control: no-cache
Host: ads.google.com
Content-Length: 1018
Expect: 100-continue
Accept-Encoding: gzip, deflate

&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v20="https://www.google.com/apis/ads/publisher/v201702"&gt;
	&lt;soapenv:Header&gt;
		&lt;v20:RequestHeader&gt;
			&lt;v20:networkCode&gt;238897396&lt;/v20:networkCode&gt;
			&lt;v20:applicationName&gt;ZappySysApp&lt;/v20:applicationName&gt;
		&lt;/v20:RequestHeader&gt;
	&lt;/soapenv:Header&gt;
	&lt;soapenv:Body&gt;
		&lt;v20:runReportJob&gt;
			&lt;v20:reportJob&gt;
				&lt;v20:reportQuery&gt;
					&lt;v20:dimensions&gt;DATE&lt;/v20:dimensions&gt;
					&lt;v20:dimensions&gt;LINE_ITEM_ID&lt;/v20:dimensions&gt;
					&lt;v20:dimensions&gt;LINE_ITEM_NAME&lt;/v20:dimensions&gt;
					&lt;v20:dimensions&gt;AD_UNIT_NAME&lt;/v20:dimensions&gt;
					&lt;v20:columns&gt;AD_SERVER_IMPRESSIONS&lt;/v20:columns&gt;
					&lt;v20:columns&gt;AD_SERVER_CLICKS&lt;/v20:columns&gt;
					&lt;v20:dimensionAttributes&gt;LINE_ITEM_COST_TYPE&lt;/v20:dimensionAttributes&gt;
					&lt;v20:dimensionAttributes&gt;LINE_ITEM_GOAL_QUANTITY&lt;/v20:dimensionAttributes&gt;
					&lt;v20:dateRangeType&gt;LAST_MONTH&lt;/v20:dateRangeType&gt;
				&lt;/v20:reportQuery&gt;
			&lt;/v20:reportJob&gt;
		&lt;/v20:runReportJob&gt;
	&lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre><p>
<strong>Response</strong></p><pre class="crayon-plain-tag">HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8
Date: Fri, 02 Jun 2017 21:23:41 GMT
Expires: Fri, 02 Jun 2017 21:23:41 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: quic=":443"; ma=2592000; v="38,37,36,35"
Content-Length: 999

&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
	&lt;soap:Header&gt;
		&lt;ResponseHeader xmlns="https://www.google.com/apis/ads/publisher/v201702"&gt;
			&lt;requestId&gt;f03e7e474fde2a5f9c5d7c9d7eb83923&lt;/requestId&gt;
			&lt;responseTime&gt;846&lt;/responseTime&gt;
		&lt;/ResponseHeader&gt;
	&lt;/soap:Header&gt;
	&lt;soap:Body&gt;
		&lt;runReportJobResponse xmlns="https://www.google.com/apis/ads/publisher/v201702"&gt;
			&lt;rval&gt;
				&lt;id&gt;10000297829&lt;/id&gt;
				&lt;reportQuery&gt;
					&lt;dimensions&gt;DATE&lt;/dimensions&gt;
					&lt;dimensions&gt;LINE_ITEM_ID&lt;/dimensions&gt;
					&lt;dimensions&gt;LINE_ITEM_NAME&lt;/dimensions&gt;
					&lt;dimensions&gt;AD_UNIT_NAME&lt;/dimensions&gt;
					&lt;adUnitView&gt;TOP_LEVEL&lt;/adUnitView&gt;
					&lt;columns&gt;AD_SERVER_IMPRESSIONS&lt;/columns&gt;
					&lt;columns&gt;AD_SERVER_CLICKS&lt;/columns&gt;
					&lt;dimensionAttributes&gt;LINE_ITEM_COST_TYPE&lt;/dimensionAttributes&gt;
					&lt;dimensionAttributes&gt;LINE_ITEM_GOAL_QUANTITY&lt;/dimensionAttributes&gt;
					&lt;dateRangeType&gt;LAST_MONTH&lt;/dateRangeType&gt;
					&lt;useSalesLocalTimeZone&gt;false&lt;/useSalesLocalTimeZone&gt;
					&lt;includeZeroSalesRows&gt;false&lt;/includeZeroSalesRows&gt;
				&lt;/reportQuery&gt;
			&lt;/rval&gt;
		&lt;/runReportJobResponse&gt;
	&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre><p>
<h3>Call getReportJob (Poll JOB Status)</h3>
<p>Second step is to make sure is Report Status check. For large report it make take several seconds or minutes before you can get Download URL (See Next Step). If you try to call Next step before Report is ready then you may get error. So better to add Polling logic.</p>
<p><strong>Extract Single XML Node Value from SOAP API Response using XPATH</strong></p>
<p>&nbsp;</p>
<p>Once you get response you can extract status of your JOB using XPAth Expression (See REST API Task response settings tab. Change Format to XML and type following XPATH expression. This will look for &lt;rval&gt;IN_PROGRESS&lt;/rval&gt; node anywhere in SOAP response XML and extract value (i.e. IN_PROGRESS )</p><pre class="crayon-plain-tag">//*[local-name() = 'rval']</pre><p>
<div id="attachment_1182" style="width: 719px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-rest-api-xml-response-extract-node-value-xpath-soap-body.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1182" class="size-full wp-image-1182" src="//zappysys.com/blog/wp-content/uploads/2017/02/ssis-rest-api-xml-response-extract-node-value-xpath-soap-body.png" alt="Extract Single XML Node Value from SOAP API Response - Use XPATH in SSIS" width="709" height="417" srcset="https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-rest-api-xml-response-extract-node-value-xpath-soap-body.png 709w, https://zappysys.com/blog/wp-content/uploads/2017/02/ssis-rest-api-xml-response-extract-node-value-xpath-soap-body-300x176.png 300w" sizes="(max-width: 709px) 100vw, 709px" /></a><p id="caption-attachment-1182" class="wp-caption-text">Extract Single XML Node Value from SOAP API Response &#8211; Use XPATH in SSIS</p></div>
<p><strong>Request</strong></p><pre class="crayon-plain-tag">POST https://ads.google.com/apis/ads/publisher/v201702/ReportService HTTP/1.1
Authorization: Bearer ya29.xxxxxxxxxxxxxxxxxxXmWqmq
User-Agent: ZappySysApp/1.0.2017.10531
Content-Type: text/xml
Accept: */*
Cache-Control: no-cache
Host: ads.google.com
Content-Length: 524
Expect: 100-continue
Accept-Encoding: gzip, deflate

&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v20="https://www.google.com/apis/ads/publisher/v201702"&gt;
   &lt;soapenv:Header&gt;
      &lt;v20:RequestHeader&gt;
         &lt;v20:networkCode&gt;238897396&lt;/v20:networkCode&gt;
         &lt;v20:applicationName&gt;ZappySysApp&lt;/v20:applicationName&gt;
      &lt;/v20:RequestHeader&gt;
   &lt;/soapenv:Header&gt;
   &lt;soapenv:Body&gt;
      &lt;v20:getReportJobStatus&gt;
       &lt;v20:reportJobId&gt;10000297829&lt;/v20:reportJobId&gt;
      &lt;/v20:getReportJobStatus&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre><p>
<strong>Response</strong></p><pre class="crayon-plain-tag">HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8
Date: Fri, 02 Jun 2017 21:23:47 GMT
Expires: Fri, 02 Jun 2017 21:23:47 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: quic=":443"; ma=2592000; v="38,37,36,35"
Content-Length: 451

&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
	&lt;soap:Header&gt;
		&lt;ResponseHeader xmlns="https://www.google.com/apis/ads/publisher/v201702"&gt;
			&lt;requestId&gt;d52cb3a3d68af24aec2f9b0284379700&lt;/requestId&gt;
			&lt;responseTime&gt;803&lt;/responseTime&gt;
		&lt;/ResponseHeader&gt;
	&lt;/soap:Header&gt;
	&lt;soap:Body&gt;
		&lt;getReportJobStatusResponse xmlns="https://www.google.com/apis/ads/publisher/v201702"&gt;
			&lt;rval&gt;COMPLETED&lt;/rval&gt;
		&lt;/getReportJobStatusResponse&gt;
	&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre><p>
&nbsp;</p>
<h3>Call getReportDownloadURL (Get Download URL)</h3>
<p>Once you get status = COMPLETED in above API Call (i.e.  getReportJobStatus) then you ready to call getReportDownloadURL  to fetch URL which you can download.</p>
<p>Here is the API sample Request and Response</p>
<p><strong>Request</strong></p><pre class="crayon-plain-tag">POST https://ads.google.com/apis/ads/publisher/v201702/ReportService HTTP/1.1
Authorization: Bearer ya29.xxxxxxxxxxxxxxxxxxBp84ltTNyVRb9hlUEWx
User-Agent: ZappySysApp/1.0.2017.10531
Content-Type: text/xml
Accept: */*
Cache-Control: no-cache
Host: ads.google.com
Content-Length: 581
Expect: 100-continue
Accept-Encoding: gzip, deflate

&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v20="https://www.google.com/apis/ads/publisher/v201702"&gt;
   &lt;soapenv:Header&gt;
      &lt;v20:RequestHeader&gt;
         &lt;v20:networkCode&gt;238897396&lt;/v20:networkCode&gt;
         &lt;v20:applicationName&gt;ZappySysApp&lt;/v20:applicationName&gt;
      &lt;/v20:RequestHeader&gt;
   &lt;/soapenv:Header&gt;
   &lt;soapenv:Body&gt;
      &lt;v20:getReportDownloadURL&gt;
       &lt;v20:reportJobId&gt;10000297829&lt;/v20:reportJobId&gt;
       &lt;v20:exportFormat&gt;CSV_DUMP&lt;/v20:exportFormat&gt;
      &lt;/v20:getReportDownloadURL&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;</pre><p>
&nbsp;</p>
<p><strong>Response</strong></p><pre class="crayon-plain-tag">HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8
Date: Fri, 02 Jun 2017 21:23:49 GMT
Expires: Fri, 02 Jun 2017 21:23:49 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: quic=":443"; ma=2592000; v="38,37,36,35"
Content-Length: 1039

&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
	&lt;soap:Header&gt;
		&lt;ResponseHeader xmlns="https://www.google.com/apis/ads/publisher/v201702"&gt;
			&lt;requestId&gt;8e5ac0bbeb8e88c180ea442fc5378d99&lt;/requestId&gt;
			&lt;responseTime&gt;1957&lt;/responseTime&gt;
		&lt;/ResponseHeader&gt;
	&lt;/soap:Header&gt;
	&lt;soap:Body&gt;
		&lt;getReportDownloadURLResponse xmlns="https://www.google.com/apis/ads/publisher/v201702"&gt;
			&lt;rval&gt;https://storage.googleapis.com/dfp-report-export/caxxxxxxxx-xxxxxxxxxxxxxxb?GoogleAccessId=3769xxxxxxxxxxx-qxxxxxxxxxxxxxxxxsqdb5dvi8g@developer.gserviceaccount.com&amp;amp;Expires=1496438929&amp;amp;Signature=vnhCiAIqd%2BFgWCtAHo9roFOI3W%2BveUTYuSvyBQ9gtMI2HDTXOCVDh7wzUV%2BPBJZZghaL6k8wKYq33GA4NpjZVNYuaAgPLWgGwAUPdtioHRi%2Bt3Eymp%2FAPRGIoos0ekP3O7l%2FPNPxenC6UTP087HV3j06V%2Fuui9ixpKZWGCK8r56oUPj6S8q1hG95Ns3d3sEcuz3%2BkShu6GYG5mqir5vjtZPuzwsr%2F96G5Kk123mke%2B%2FIVRJGoqnCMghNWtIG1yR1IdZx%2FIpit%2FnaJ9HP6IvAr3oMIXkQ3cHv%2FtOhXGy9dTG34q%2FKDbtkSJAayHgjlSLPGKucygcXBhUrbywBu8Y77A%3D%3D&lt;/rval&gt;
		&lt;/getReportDownloadURLResponse&gt;
	&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre><p>
<strong>Extract Single XML Node Value from SOAP API Response using XPATH</strong></p>
<p>Once you get response you can extract status of your JOB using XPAth Expression (See REST API Task response settings tab. Change Format to XML and type following XPATH expression. This will look for &lt;rval&gt;https://storage.googleapis.com/dfp-report-export/caxx&#8230;&#8230;&#8230;.&lt;/rval&gt; node anywhere in SOAP response XML and extract value (i.e. URL)</p>
<h3>Download File Using REST API Task</h3>
<p>Once you get URL its time to download it. You can use REST API Task to download the file. On Response Setting Tab specify full file path (e.g. c:\report_csv.gz) and make sure Binary option is checked (Found next to the Save Path)</p>
<h2>Making things dynamic</h2>
<p>If you want to supply certain parameters at runtime (e.g. from SSIS Variable) rather than hard code then you can use Variable Placeholders any where in Request Body, URL or Headers. Click Insert Variable option found in Edit screen</p>
<p>Here is an example of dynamic URL (API Version stored in SSIS Variable)</p><pre class="crayon-plain-tag">https://ads.google.com/apis/ads/publisher/{{User::ApiVer}}/NetworkService</pre><p>
<h2>Deployment to Production</h2>
<p>When you ready to deploy your SSIS Package to production make sure to change Test NetworkCode supplied inside Request Body to your Production Ad Network. Also Set RefreshToken Property of OAuth Connection Manager (Get it from Backup file saved when you created OAuth connection first time). Once you set RefreshToken of connection manager you won&#8217;t have to Login again to get a new token.</p>
<h2>Conclusion</h2>
<p>Traditionally if you wanted to integrate Google DFP API (DoubleClick API) calls inside your ETL workflow then it required some sort of coding effort (e.g. Use C# SDK, JAVA SDK or Python SDK). Coding effort is not only time consuming and expensive but also hard to maintain for any non-coder (e.g. ETL Developer or DBA).<br />
Thanks to <a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> which changed the way developers do API integration. Now you can reduce time to implement and total cost of you API integration project significantly by using drag and drop approach. This approach is not only easy to maintain but also fast and high quality. You can use ZappySys REST/SOAP SSIS Connectors and SSIS Tasks for any API integration project such as Google DFP API. <a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">Try SSIS PowerPack</a> for free to explore possibilities. If you have any issue with your integration <a href="//zappysys.com/support/">Contact Support</a></p>
<p>The post <a href="https://zappysys.com/blog/calling-google-dfp-api-with-ssis-doubleclick-soap-api/">How to call Google DFP API with SSIS &#8211; DoubleClick</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to get data from Google AdWords using SSIS</title>
		<link>https://zappysys.com/blog/get-data-from-google-adwords-using-ssis/</link>
					<comments>https://zappysys.com/blog/get-data-from-google-adwords-using-ssis/#comments</comments>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 13 Jun 2016 16:32:55 +0000</pubDate>
				<category><![CDATA[Google API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[AdWords]]></category>
		<category><![CDATA[API Integration]]></category>
		<category><![CDATA[DFP]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[google api]]></category>
		<category><![CDATA[Google DoubleClick]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xml source]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=564</guid>

					<description><![CDATA[<p>Introduction Google AdWords is one of the most popular Advertise Platforms. In this article, you will learn how to get data from Google AdWords by calling Google AdWords Web Service method and using drag and drop SSIS XML/SOAP connector (No coding required :)). Google AdWords Web Services allows retrieving various data such as account info, campaigns; [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/get-data-from-google-adwords-using-ssis/">How to get data from Google AdWords using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/google-ads-connector/">API Connector for Google AdWords</a> which makes it much simpler to <strong>Read/Write Google AdWords Data in SSIS/ODBC</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).<br />
</div></div>
<p style="text-align: justify;"><strong><a href="//zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-api-integration.png"><img loading="lazy" decoding="async" class=" wp-image-1663 alignleft" src="//zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-api-integration.png" alt="" width="128" height="128" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-api-integration.png 273w, https://zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-api-integration-150x150.png 150w" sizes="(max-width: 128px) 100vw, 128px" /></a>Google AdWords</strong> is one of the most popular Advertise Platforms. In this article, you will learn <em>how to get data from Google AdWords</em> by calling Google AdWords Web Service method and using drag and drop <strong><a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">SSIS XML/SOAP connector</a></strong> (No coding required :)). Google AdWords Web Services allows retrieving various data such as account info, campaigns; as well as writing data, such as creating a campaign, add a keyword. Basically, it allows controlling your AdWords account programmatically instead of using the AdWords dashboard. For demo purposes, we will <strong>get data from Google AdWords</strong> Account and <strong>load it into Microsoft SQL Server </strong>(but you can use this technique to save any supported targets in SSIS (e.g. Excel, FlatFile, Oracle, MySQL, IBM DB2, etc.).</p>
<p>If you desire to download a report from AdWords, you must follow a different approach described in an <a href="https://zappysys.com/blog/download-adwords-report-using-google-api-odbc-xml-driver/">article on how to download AdWords report</a>. It describes how to download a report using ODBC and XML Driver but the concepts introduced there can be applied to SSIS as well.</p>
<p>If you are looking for a similar article for <strong>Google DoubleClick for Publisher</strong> (Google DFP) then <a href="//zappysys.com/blog/calling-google-dfp-api-with-ssis-doubleclick-soap-api/" target="_blank" rel="noopener">check this article</a>.</p>
<p>You will also learn <strong>how to create Google Ads</strong> or modify any other objects by calling SOAP API using <u><span style="color: #000080;">SSIS REST API Task</span></u>.</p>
<h2>SSIS Tasks/Connectors discussed in this Article</h2>
<p>In this article we will use following Connector(s) and Connection Manager to archive full data integration with Google AdWords.</p>
<p>Following SSIS Connectors support <strong>OAuth Connectivity</strong>. When you use below connectors no coding required to pull data from any OAuth enabled services (e.g. Twitter, Facebook, LinkedIn).</p>
<div class="su-table su-table-alternate">
<table>
<tbody>
<tr>
<td width="36"><span style="color: #248cc8"><img decoding="async" src="//zappysys.com/images/ssis-powerpack/ssis-rest-api-web-service-task.png" alt="Custom SSIS Tasks - Call REST API Webservice (GET, POST, DELETE etc)" width="32" /></span></td>
<td><u><span style="color: #248cc8"><a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a></span></u></td>
</tr>
<tr>
<td width="36"><span style="color: #248cc8"><img decoding="async" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/oauth-connection/ssis-oauth-connection-manager.png" alt="SSIS OAuth Connection Manager" width="32" /></span></td>
<td><a href="//zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-oauth-connection-manager.htm" target="_blank" rel="noopener"><span style="color: #248cc8">OAuth Connection Manager</span></a></td>
</tr>
<tr>
<td width="36"><span style="color: #248cc8"><img decoding="async" src="//zappysys.com/images/ssis-powerpack/ssis-xml-source.png" alt="Custom SSIS Components - XML Source (File, REST, SOAP)" width="32" /></span></td>
<td><a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener"><span style="color: #248cc8">XML Source (REST API, SOAP Call or File data)</span></a></td>
</tr>
</tbody>
</table>
</div>
<h2>Two different ways to get Google AdWords Data in SSIS</h2>
<p>There are two ways you can extract Google AdWords data in SSIS.</p>
<ol>
<li>Use <a href="//zappysys.com/products/ssis-powerpack/ssis-google-analytics-source-connector/" target="_blank" rel="noopener">Google Analytics Source</a> (For more info <a href="//zappysys.com/blog/get-data-from-google-analytics-in-ssis-using-rest-api-call/" target="_blank" rel="noopener">see this article</a>)  (Consume AdWords data using Google Analytics REST API)</li>
<li>Use XML Source along with OAuth connection manager (Consume AdWords data using SOAP API)</li>
</ol>
<p>In this article we will only discuss Approach #2. For approach #1 refer <a href="//zappysys.com/blog/get-data-from-google-analytics-in-ssis-using-rest-api-call/#How_to_read_google_Adwords_Data_using_Google_Analytics_Source" target="_blank" rel="noopener">see this link</a></p>
<p>Advantage of #2 is you get total control of full API set for AdWords but you have to do lot more manual work. For Approach #1 is lot simpler but you get access to limited reports (Dimensions and Metrics).</p>
<h2>Google AdWords API Integration Example Screenshot</h2>
<p>Below is screenshot of sample package discussed in this article (<a href="//zappysys.com/blog/wp-content/uploads/2016/06/OAuthGoogleAdWords_2012.zip" target="_blank" rel="noopener">Download from here</a>). As you can see we tried to demonstrate Reading data and Managing data (e.g. Create Ad) in the same package. You can extend these technique to perform any type of operations in <strong>Google AdWords</strong> or similar service such as <strong>DoubleClick for Publisher</strong></p>
<div id="attachment_573" style="width: 610px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/06/ssis-package-extract-google-adwords-data-soap-api-create-ad-get-campaigns.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-573" class="wp-image-573" src="//zappysys.com/blog/wp-content/uploads/2016/06/ssis-package-extract-google-adwords-data-soap-api-create-ad-get-campaigns.png" alt="Google AdWords API Integration Example - Create Ad, Get Accounts, Get Campaigns, Get Ad Groups, Get Ads (Extract AdWords data via SOAP API) , Read data using Selector Method or use AWQL query language" width="600" height="391" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/ssis-package-extract-google-adwords-data-soap-api-create-ad-get-campaigns.png 732w, https://zappysys.com/blog/wp-content/uploads/2016/06/ssis-package-extract-google-adwords-data-soap-api-create-ad-get-campaigns-300x195.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></a><p id="caption-attachment-573" class="wp-caption-text">Google AdWords API Integration Example &#8211; Create Ad, Get Accounts, Get Campaigns, Get Ad Groups, Get Ads (Extract AdWords data via SOAP API, Read data using Selector Method or use AWQL query language)</p></div>
<h2>Step-By-Step Tutorial</h2>
<p>Here are few high level steps you will have to perform to extract data from <strong>Google AdWords API</strong> using SSIS. This section assumes you have ClientID and Developer Token to access data. if you don&#8217;t have that then read next 2-3 sections.</p>
<ol>
<li>Download and install <a href="//zappysys.com/products/ssis-powerpack/">SSIS PowerPack from here</a></li>
<li>Create new SSIS Project</li>
<li>From SSIS toolbox drag DataFlow Task and go to dataflow designer</li>
<li>From toolbox of drag <a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/">ZS XML Source</a></li>
<li>Double click <strong>XML Source</strong> to configure it</li>
<li>Specify API URL from which you want to read data<br />
Example : <span style="text-decoration: underline;">https://adwords.google.com/api/adwords/mcm/<strong>v201509</strong>/ManagedCustomerService</span></li>
<li>Now check Use Credentials check box and select New <strong>ZS-OAuth</strong> connection manager.</li>
<li>On connection manager UI you can select <strong>Google</strong> from Provider Dropdown.</li>
<li>Under Scopes enter following (Scope is basically permission)<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/auth/adwords</pre>
&nbsp;</li>
<li>Now click <strong>Generate Token</strong> and when prompted login and in the last step Accept.</li>
<li>If everything went ok then you will see <strong>AccessToken</strong> and <strong>RefreshToken</strong> populated.</li>
<li>Click <strong>Test connection</strong> and close the UI by clicking OK</li>
<li>Now on XML Source &#8211; Select HTTP Request Method as <strong>POST</strong></li>
<li>In the Request Body click edit and enter request as below (Replace DEV_TOKEN and CLIENT_ID placeholders below)<br />
<pre class="crayon-plain-tag">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
	&lt;soap:Header&gt;
		&lt;RequestHeader xmlns="https://adwords.google.com/api/adwords/mcm/v201605"&gt;
			&lt;developerToken&gt;ENTER_YOUR_DEV_TOKEN_HERE&lt;/developerToken&gt;
			&lt;clientCustomerId&gt;ENTER_YOUR_CLIENT_ID_HERE&lt;/clientCustomerId&gt;
			&lt;userAgent&gt;ZappySys SSIS PowerPack v1&lt;/userAgent&gt;
		&lt;/RequestHeader&gt;
	&lt;/soap:Header&gt;
	&lt;soap:Body&gt;
		&lt;get xmlns="https://adwords.google.com/api/adwords/mcm/{{User::ApiVersion}}"&gt;
			&lt;serviceSelector&gt;
				&lt;fields&gt;CustomerId&lt;/fields&gt;
				&lt;fields&gt;Name&lt;/fields&gt;
			&lt;/serviceSelector&gt;
		&lt;/get&gt;
	&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre>
&nbsp;</p>
<div class="su-note"  style="border-color:#e5e5c6;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#ffffe0;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">
<p>If you are wondering how did we get above XML fragment for Request Body then <a href="//zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">Check this article on how to use SoapUI (free 3rd party tool) to create SOAP request Bodyfrom WSDL</a>. Google AdWords has many API endpoints for different service. For each service you have different Api URL and different WSDL. In the next section you can learn how to create correct SOAP Body (for POST) using <strong>SoapUI</strong> tool.</p>
<p>For example if you are calling ManagedCustomerService API for version <strong>v201609</strong> then your <strong>help page URL would be like this</strong><br />
<a href="https://developers.google.com/adwords/api/docs/reference/v201609/ManagedCustomerService" target="_blank" rel="noopener">https://developers.google.com/adwords/api/docs/reference/v201609/ManagedCustomerService</a></p>
<p>And on the same page you will see <strong>WSDL link below</strong><br />
<a href="https://ads.google.com/apis/ads/publisher/v201702/NetworkService?wsdl" target="_blank" rel="noopener">https://ads.google.com/apis/ads/publisher/v201702/NetworkService?wsdl</a><br />
(Just download that WSDL XML and save to local disk then use with SoapUI to generate XML body to submit for any DFP API call.)</p>
<p><a href="//zappysys.com/blog/calling-google-dfp-api-with-ssis-doubleclick-soap-api/#How_to_generate_SOAP_Request_Body_using_SoapUI_tool" target="_blank" rel="noopener">See this link for more information</a> (Its for Google DoubleClick Ad Platform but you will get an idea)</p>
</div></div></li>
<li>Go to Array handling tab at the bottom and enter text : <strong>ns2:entries</strong> &#8211; By doing this we will treat <strong>&lt;ns2:entries&gt;</strong> node as array eventhough only one entry found in response (By default content with multiple records treated as array).
<div id="attachment_571" style="width: 430px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/06/soap-xml-response-array-handling-adwords-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-571" class="size-full wp-image-571" src="//zappysys.com/blog/wp-content/uploads/2016/06/soap-xml-response-array-handling-adwords-api.png" alt="Handling Array Element Nodes in SOAP Response" width="420" height="134" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/soap-xml-response-array-handling-adwords-api.png 420w, https://zappysys.com/blog/wp-content/uploads/2016/06/soap-xml-response-array-handling-adwords-api-300x96.png 300w" sizes="(max-width: 420px) 100vw, 420px" /></a><p id="caption-attachment-571" class="wp-caption-text">Handling Array Element Nodes in SOAP Response</p></div></li>
<li>On the filter expression click edit and highlight entries node and click ok. This will produce something like below in filter textbox<br />
<pre class="crayon-plain-tag">$.soap:Envelope.soap:Body.ns2:getResponse.ns2:rval.ns2:entries[*]</pre>
&nbsp;</li>
<li>Now click preview to see actual data.</li>
<li>Click OK to save UI. Now you can connect source to target such as SQL Server or <a href="//zappysys.com/onlinehelp/ssis-powerpack/scr/trash-destination.htm" target="_blank" rel="noopener">Trash Destination</a>.</li>
</ol>
<blockquote><p>NOTE: in above example we used v201605 API version but change it to latest if this API is no more valid. Google expires API version pretty often so keep that in mind if you get depreciated API version error.</p></blockquote>
<h2>Register for Developer Token to access AdWords account data using API</h2>
<p>First important step to access any Google AdWords Account is request developer token. <a href="https://developers.google.com/adwords/api/docs/guides/first-api-call" target="_blank" rel="noopener">Click this link</a> for step by step information. Watch short vide to get overview on entire process to access data via API.</p>
<h2>Find your Client ID</h2>
<p>Next thing you will need to know is your ClientID. Most of API Requests will require your ClientID. Perform following steps to find your ClientID.</p>
<p>Login to your AdWords Account using email address. At the top you will see your client ID as below screenshot.</p>
<div id="attachment_567" style="width: 610px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-account-client-id-for-soap-api-calls.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-567" class="wp-image-567" src="//zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-account-client-id-for-soap-api-calls.png" alt="How to find ClientID of your Google AdWords Account (Useful for making SOAP API Calls)" width="600" height="174" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-account-client-id-for-soap-api-calls.png 920w, https://zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-account-client-id-for-soap-api-calls-300x87.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></a><p id="caption-attachment-567" class="wp-caption-text">How to find ClientID of your Google AdWords Account (Useful for making SOAP API Calls)</p></div>
<p>&nbsp;</p>
<h2>Connect to Google AdWords API using OAuth</h2>
<p>Connecting to any Google API will require OAuth 2.0. SSIS PowerPack has Protocol so you can easily extract data from API without coding complex token extract/renew workflow. Such things usually requires some sort of programming but in our case you will do few clicks as described in Step-By-Step section earlier.</p>
<p>Here is the screenshot of OAuth Connection Manager.</p>
<div id="attachment_575" style="width: 660px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/06/calling-google-adwords-api-using-oauth-in-ssis.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-575" class="wp-image-575" src="//zappysys.com/blog/wp-content/uploads/2016/06/calling-google-adwords-api-using-oauth-in-ssis.png" alt="Connecting to Google AdWords API using OAuth 2.0 in SSIS (Consuming XML/SOAP API)" width="650" height="403" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/calling-google-adwords-api-using-oauth-in-ssis.png 932w, https://zappysys.com/blog/wp-content/uploads/2016/06/calling-google-adwords-api-using-oauth-in-ssis-300x186.png 300w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-575" class="wp-caption-text">Connecting to Google AdWords API using OAuth 2.0 in SSIS (Consuming XML/SOAP API)</p></div>
<p>&nbsp;</p>
<h2>Extract data from Google AdWords using SOAP API Calls</h2>
<p>When you define filter expression you can check/uncheck &#8220;Include Parent Columns&#8221; setting. For AdWords SOAP Api you can uncheck so you only extract columns from rvals node in XML Response.</p>
<div id="attachment_576" style="width: 560px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-api-select-xml-path-soap-request.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-576" class="wp-image-576" src="//zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-api-select-xml-path-soap-request.png" alt="Extract data from Google AdWords SOAP/XML Response" width="550" height="444" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-api-select-xml-path-soap-request.png 686w, https://zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-api-select-xml-path-soap-request-300x242.png 300w" sizes="(max-width: 550px) 100vw, 550px" /></a><p id="caption-attachment-576" class="wp-caption-text">Extract data from Google AdWords SOAP/XML Response</p></div>
<p>&nbsp;</p>
<h2>SOAP Response Paging / Looping</h2>
<p>Many time you will get response which is larger than default page size in AdWords API Call. In that case you can specify few pagination attributes on XML Source Paging tab. For more information on paging options you may refer <a href="//zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">this article</a> . This article is talking about JSON Source but same options are applicable for XML Source too.</p>
<div id="attachment_626" style="width: 513px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/04/ssis-xml-soap-api-pagination-google-adwords-pass-page-number.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-626" class="size-full wp-image-626" src="//zappysys.com/blog/wp-content/uploads/2016/04/ssis-xml-soap-api-pagination-google-adwords-pass-page-number.png" alt="REST API Pagination - Passing PageNumber inside POST Body (Example: Google AdWords SOAP Api)" width="503" height="547" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-xml-soap-api-pagination-google-adwords-pass-page-number.png 503w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-xml-soap-api-pagination-google-adwords-pass-page-number-276x300.png 276w" sizes="(max-width: 503px) 100vw, 503px" /></a><p id="caption-attachment-626" class="wp-caption-text">REST API Pagination &#8211; Passing PageNumber inside POST Body (Example: Google AdWords SOAP Api)</p></div>
<p>&nbsp;</p>
<div id="attachment_625" style="width: 665px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/04/ssis-rest-api-pagination-pass-page-number-inside-request-body-post-data.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-625" class="size-full wp-image-625" src="//zappysys.com/blog/wp-content/uploads/2016/04/ssis-rest-api-pagination-pass-page-number-inside-request-body-post-data.png" alt="Configure REST API Pagination - using Page Number via POST Body Method" width="655" height="447" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-rest-api-pagination-pass-page-number-inside-request-body-post-data.png 655w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-rest-api-pagination-pass-page-number-inside-request-body-post-data-300x205.png 300w" sizes="(max-width: 655px) 100vw, 655px" /></a><p id="caption-attachment-625" class="wp-caption-text">Configure REST API Pagination &#8211; using Page Number via POST Body Method</p></div>
<h2>Read Google AdWords data and Load into SQL Server</h2>
<p>Using XML Source you can extract data in tabular format and then you can map that to SQL Server Target (Use OLEDB Destination / ADO.net Destination).</p>
<div id="attachment_579" style="width: 719px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/06/extract-data-from-google-adwords-load-into-sql-server-using-ssis.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-579" class="size-full wp-image-579" src="//zappysys.com/blog/wp-content/uploads/2016/06/extract-data-from-google-adwords-load-into-sql-server-using-ssis.png" alt="Extract data from Google AdWords and load into SQL Server table using SSIS" width="709" height="403" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/extract-data-from-google-adwords-load-into-sql-server-using-ssis.png 709w, https://zappysys.com/blog/wp-content/uploads/2016/06/extract-data-from-google-adwords-load-into-sql-server-using-ssis-300x171.png 300w" sizes="(max-width: 709px) 100vw, 709px" /></a><p id="caption-attachment-579" class="wp-caption-text">Extract data from Google AdWords and load into SQL Server table using SSIS</p></div>
<h2>Write data / Manage AdWords Account via REST API Calls</h2>
<p>So far we have seen how to read data from AdWords account. But what if you have to create new records or write/update AdWords data via API Calls in automated manner? No worry &#8211; If you have need for that then use <a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">SSIS REST API Task</a> which supports adhoc HTTP WebRequests including POST/DELETE/PUT etc. You can also upload files via REST API call using this task. This task supports rich error handling and saving your response into variable or files.</p>
<h3>Create Ad under specific AdGroup</h3>
<p>Below example shows how to create new ad under specific AdGroup using <u><span style="color: #000080;">REST API Task</span></u></p>
<p>Notice we have used few placeholders to make things dynamic using SSIS Variables. Once REST API Task is executed you will see new ad created.</p>
<div id="attachment_577" style="width: 590px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-create-new-ad-using-soap-xml-api-ssis.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-577" class="wp-image-577" src="//zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-create-new-ad-using-soap-xml-api-ssis.png" alt="Creating Google AdWords Ad using SOAP/XML API in SSIS (REST API Task)" width="580" height="464" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-create-new-ad-using-soap-xml-api-ssis.png 703w, https://zappysys.com/blog/wp-content/uploads/2016/06/google-adwords-create-new-ad-using-soap-xml-api-ssis-300x240.png 300w" sizes="(max-width: 580px) 100vw, 580px" /></a><p id="caption-attachment-577" class="wp-caption-text">Creating Google AdWords Ad using SOAP/XML API in SSIS (REST API Task)</p></div>
<div id="attachment_578" style="width: 660px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/06/create-new-google-adwords-ad-via-soap-api-in-ssis.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-578" class="wp-image-578" src="//zappysys.com/blog/wp-content/uploads/2016/06/create-new-google-adwords-ad-via-soap-api-in-ssis.png" alt="Verify Google Ad created programmatically using SOAP/XML API Call (SSIS REST API Task)" width="650" height="353" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/create-new-google-adwords-ad-via-soap-api-in-ssis.png 916w, https://zappysys.com/blog/wp-content/uploads/2016/06/create-new-google-adwords-ad-via-soap-api-in-ssis-300x163.png 300w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-578" class="wp-caption-text">Verify Google Ad created programmatically using SOAP/XML API Call (SSIS REST API Task)</p></div>
<h2>Methods for Creating new records</h2>
<p>Google AdWords API supports <strong>mutate</strong> method for writing data. Many service endpoints supports this method. Below example request will create new Ad.</p><pre class="crayon-plain-tag">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
	&lt;soap:Header&gt;
		&lt;RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/v201605"&gt;
			&lt;developerToken&gt;{{User::varDevToken}}&lt;/developerToken&gt;
			&lt;clientCustomerId&gt;{{User::varClientId}}&lt;/clientCustomerId&gt;
			&lt;userAgent&gt;My Test AdWords App (AwApi-DotNet/18.20.0, Common-Dotnet/3.11.0, .NET CLR/4.0.30319.18444, gzip)&lt;/userAgent&gt;
		&lt;/RequestHeader&gt;
	&lt;/soap:Header&gt;
	&lt;soap:Body&gt;
		&lt;mutate xmlns="https://adwords.google.com/api/adwords/cm/v201605"&gt;
			&lt;operations&gt;
				&lt;operator&gt;ADD&lt;/operator&gt;
				&lt;operand&gt;
	                &lt;adGroupId&gt;30800928123&lt;/adGroupId&gt;
	                &lt;ad xsi:type="TextAd"&gt;
	                    &lt;displayUrl&gt;//zappysys.com/ad1&lt;/displayUrl&gt;
	                    &lt;finalUrls&gt;//zappysys.com/ad1&lt;/finalUrls&gt;
	                    &lt;headline&gt;This is my Ad&lt;/headline&gt;
	                    &lt;description1&gt;This is Line 1&lt;/description1&gt;
	                    &lt;description2&gt;This is Line 2&lt;/description2&gt;
	                &lt;/ad&gt;            
				&lt;/operand&gt;
			&lt;/operations&gt;
		&lt;/mutate&gt;
	&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre><p>
<h2>Methods for Reading AdWords data</h2>
<p>Google AdWords API supports two methods for reading data. Most of AdWords service endpoints supports GET method also known as Selector method (Its basically sending query in XML format). Seconds method is Query Method. It uses SQL like query language known as <a href="https://developers.google.com/adwords/api/docs/guides/awql" target="_blank" rel="noopener">AWQL</a>. (Read more about <a href="https://developers.google.com/adwords/api/docs/guides/awql" target="_blank" rel="noopener">AWQL query language</a>). If you are SQL Programmer then you may like AWQL Query method better than Selector. But either way you will be able to pass following information.</p>
<ul>
<li>Columns you want to return</li>
<li>Filter (e.g. Where Clause)</li>
<li>Order By</li>
<li>Paging information (e.g. PageNumber, PageSize)</li>
</ul>
<h3>Get Method (XML Selector)</h3>
<p>For Get Method using XML tags to define columns, filters and order by/paging information. Here is example Get method for below select query</p><pre class="crayon-plain-tag">SELECT Id, Heading
WHERE Status = 'ENABLED'
ORDER BY Heading DESC 
LIMIT 0,50</pre><p>
<strong>Get Request (Get all Active Ads)</strong></p><pre class="crayon-plain-tag">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
	&lt;soap:Header&gt;
		&lt;RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/v201605"&gt;
			&lt;developerToken xmlns="https://adwords.google.com/api/adwords/cm/v201605"&gt;{{User::varDevToken}}&lt;/developerToken&gt;
			&lt;clientCustomerId xmlns="https://adwords.google.com/api/adwords/cm/v201605"&gt;{{User::varClientId}}&lt;/clientCustomerId&gt;
			&lt;userAgent xmlns="https://adwords.google.com/api/adwords/cm/v201605"&gt;My Test AdWords App (AwApi-DotNet/18.20.0, Common-Dotnet/3.11.0, .NET CLR/4.0.30319.18444, gzip)&lt;/userAgent&gt;
		&lt;/RequestHeader&gt;
	&lt;/soap:Header&gt;
	&lt;soap:Body&gt;
		&lt;get xmlns="https://adwords.google.com/api/adwords/cm/v201605"&gt;
			&lt;serviceSelector&gt;
			    &lt;fields&gt;Id&lt;/fields&gt;
			    &lt;fields&gt;Headline&lt;/fields&gt;
			    &lt;predicates&gt;
			        &lt;field&gt;Status&lt;/field&gt;
			        &lt;operator&gt;EQUALS&lt;/operator&gt;
			        &lt;values&gt;ENABLED&lt;/values&gt;
			    &lt;/predicates&gt;
			    &lt;ordering&gt;
			        &lt;field&gt;Headline&lt;/field&gt;
			        &lt;sortOrder&gt;ASCENDING&lt;/sortOrder&gt;
			    &lt;/ordering&gt;
			    &lt;paging&gt;
			        &lt;startIndex&gt;0&lt;/startIndex&gt;
			        &lt;numberResults&gt;50&lt;/numberResults&gt;
			    &lt;/paging&gt;
			&lt;/serviceSelector&gt;
		&lt;/get&gt;
	&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre><p>
<h3>Query Method (AWQL Query &#8211; SQL like query language)</h3>
<p>Below is sample Soap request for AWQL Method to read Ads listed under from specific AdGroups. To learn more AWQL Query Syntax <a href="https://developers.google.com/adwords/api/docs/guides/awql" target="_blank" rel="noopener">Click Here</a>.</p>
<p>To learn more about which Columns you can use inside your AWQL Query <a href="https://developers.google.com/adwords/api/docs/appendix/selectorfields#v201605-AdGroupAdService" target="_blank" rel="noopener">Click here.</a> Note that each service support different fields for Select Clause, Where Clause and Order By Clause. AWQL language can be also used to query Predefined AdWords Reports. The only difference is .. FROM clause is required when you query Reports.</p><pre class="crayon-plain-tag">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
	&lt;soap:Header&gt;
		&lt;RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/v201605"&gt;
			&lt;developerToken xmlns="https://adwords.google.com/api/adwords/cm/v201605"&gt;YOUR_DEV_TOKEN&lt;/developerToken&gt;
			&lt;clientCustomerId xmlns="https://adwords.google.com/api/adwords/cm/v201605"&gt;YOUR_CLIENT_ID&lt;/clientCustomerId&gt;
			&lt;userAgent xmlns="https://adwords.google.com/api/adwords/cm/v201605"&gt;My Test AdWords App (AwApi-DotNet/18.20.0, Common-Dotnet/3.11.0, .NET CLR/4.0.30319.18444, gzip)&lt;/userAgent&gt;
		&lt;/RequestHeader&gt;
	&lt;/soap:Header&gt;
	&lt;soap:Body&gt;
		&lt;query xmlns="https://adwords.google.com/api/adwords/cm/v201605"&gt;
			&lt;query&gt;
SELECT Id, Name
WHERE Status = 'ENABLED'
LIMIT 0,5
			&lt;/query&gt;
		&lt;/query&gt;
	&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;</pre><p>
&nbsp;</p>
<h2>Call AdWords Reports API &#8211; Download Campaign Performance data</h2>
<p>There will be a time you like to <a href="https://developers.google.com/adwords/api/docs/guides/reporting#http_request_url" target="_blank" rel="noopener">download Reports from Adwords</a>. For that  <a href="https://zappysys.com/blog/download-adwords-report-using-google-api-odbc-xml-driver/" target="_blank" rel="noopener">read this article</a>. Its showing how to use ZappySys ODBC Driver to call AdWords Reporting API but concept is same in SSIS Product too due to similar UI elements.</p>
<h2>Download Example SSIS Package</h2>
<p><a href="//zappysys.com/blog/wp-content/uploads/2016/06/OAuthGoogleAdWords_2012.zip">Download SSIS 2012 / 2014/ 2016 Sample</a></p>
<h2>Conclusion</h2>
<p><em>Google AdWords data integration</em> can be very challenging without right set of tools. <a href="//zappysys.com/products/ssis-powerpack/">SSIS PowerPack</a> certainly makes it easy when you have to extract/manage Google AdWords data. Innovative drag and drop approach gives you various options to cover simple or most advanced scenarios without relying on any Programming language (e.g. C#, Java, Python, Ruby etc).</p>
<p>The post <a href="https://zappysys.com/blog/get-data-from-google-adwords-using-ssis/">How to get data from Google AdWords using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://zappysys.com/blog/get-data-from-google-adwords-using-ssis/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Get data from Google Analytics in SSIS using REST API Call</title>
		<link>https://zappysys.com/blog/get-data-from-google-analytics-in-ssis-using-rest-api-call/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 08 Jan 2016 14:54:01 +0000</pubDate>
				<category><![CDATA[Google API]]></category>
		<category><![CDATA[SSIS Google Analytics Source]]></category>
		<category><![CDATA[AdWords]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[google api]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=294</guid>

					<description><![CDATA[<p>Introduction Google Analytics is the most popular web analytics service that tracks and reports website traffic. In this blog post you will learn how to get data from Google Analytics using SSIS using SSIS Google Analytics Source Connector (Using drag and drop approach without Coding). This article assumes you have basic knowledge about SSIS and [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/get-data-from-google-analytics-in-ssis-using-rest-api-call/">Get data from Google Analytics in SSIS using REST API Call</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>Google Analytics is the most popular web analytics service that tracks and reports website traffic. In this blog post you will learn how to <em>get data from Google Analytics using SSIS using <a href="//zappysys.com/products/ssis-powerpack/ssis-google-analytics-source-connector/">SSIS Google Analytics Source Connector</a> (Using drag and drop approach without Coding).</em> This article assumes you have basic knowledge about SSIS and you have necessary tools installed &#8211; <a href="http://binaryworld.net/blogs/how-to-install-ssis-2012-2014-2016-ssdt-bi-visual-studio/" target="_blank" rel="noopener">Check this if not</a>)</p>
<p>For demo purpose we will <em>load data from Google Analytics into SQL Server Database</em> but you can use same techniques to load data into Oracle, MySQL, Excel or any other RDBMS.</p>
<h2>Prerequisite</h2>
<p>This article assumes you have installed following tools</p>
<ol>
<li>Install Client Tools for SSIS (atleast one version from below list) &#8211; <a href="http://binaryworld.net/blogs/how-to-install-ssis-2012-2014-2016-ssdt-bi-visual-studio/" target="_blank" rel="noopener">Check this for detail</a>
<ol>
<li>BIDS for SSIS 2008 (i.e. SQL Server 2008 or 2008 R2) &#8212; OR &#8212;</li>
<li>SSDT BI for Visual Studio 2012 (i.e. for SQL Server 2012) &#8212; OR &#8212;</li>
<li>SSDT BI for Visual Studio 2013 (i.e. for SQL Server 2014) &#8212; OR &#8212;</li>
<li>SSDT BI for Visual Studio 2015 (i.e. for SQL Server 2012/2014 or 2016)</li>
</ol>
</li>
<li>Install SSIS PowerPack (<a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">Click here to download</a>) it will add new Connector in SSIS Toolbox to access Google Analytics Connector.</li>
<li>You have setup correct permission for user to access google analytics data (See below section or <a href="//zappysys.com/blog/get-data-from-google-analytics-in-ssis-using-rest-api-call/#Setup_Google_analytics_data_permission_for_other_users" target="_blank" rel="noopener">read here</a>)</li>
</ol>
<h2>Video Tutorial &#8211; Get data from Google Web Analytics Platform</h2>
<a href="https://zappysys.com/blog/get-data-from-google-analytics-in-ssis-using-rest-api-call/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2Fgr_s9kdvrKw%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></p>
<h2>What is Google Analytics Connector for SSIS?</h2>
<p>The<em> SSIS Google Analytics Source</em> connector can be used to read data from your Google Analytics Service without learning complex APIs or coding/scripting in Python, Java, C#, etc. It has an easy to use drag and drop interface which allows you to extract large amounts of data, adjusting parameters such as dimensions, metrics, filters, sortby, date range etc. You can also use in-built reports or specify a direct query URL to get the desired data.</p>
<p><img loading="lazy" decoding="async" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/google-analytics-source/ssis-google-analytics-source.png" alt="Custom SSIS Components - Google Web Analytics Source Connector" width="53" height="53" /> Read more about <a href="//zappysys.com/products/ssis-powerpack/ssis-google-analytics-source-connector/" target="_blank" rel="noopener"><span style="color: #248cc8;">Google Analytics Source Connector</span></a></p>
<h3>Features</h3>
<ul>
<li>The intuitive user interface makes Google Analytics data integration super easy and fast without learning complex APIs or scripting languages</li>
<li>Support for OAuth 2.0 Authentication and Google service accounts (*.p12 certificate file)</li>
<li>Support for Proxy Server</li>
<li>Easy to use interface with three different ways to query Google Analytics data: (1) Build query from UI, (2) Use built-in query templates, and (3) Use direct queries</li>
<li>Support for dynamic dimensions, metrics, segments, filters and sortby fields (e.g. supply these values at runtime)</li>
<li>Live preview support at design time</li>
<li>Support for AdWords, AdSense, Ad Exchange and DoubleClick for Publisher (DFP)</li>
</ul>
<h2>Setup Google analytics data permission for users / service account</h2>
<p>If you are not an admin of Google analytics and you need to access google analytics then make sure you ask admin to give you correct permission using below steps</p>
<p>To add/edit user permissions for Google Analytics Data perform following steps.</p>
<ol>
<li>Login to your Google Analytics Portal (Login using Admin account or use google user account who setup Google Analytics) <a href="https://analytics.google.com/analytics/web/#management/Settings/" target="_blank" rel="noopener">Click here</a> to go to google analytics</li>
<li>Click on Admin tab &gt; Click User management &gt; Add/Edit user account permission</li>
</ol>
<p>For more information you may visit official link : <a href="https://support.google.com/analytics/answer/2884495?hl=en" target="_blank" rel="noopener">How to setup permission for google analytics</a></p>
<div id="attachment_534" style="width: 808px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/01/set-permission-google-analytics-service-account.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-534" class="size-full wp-image-534" src="//zappysys.com/blog/wp-content/uploads/2016/01/set-permission-google-analytics-service-account.png" alt="Add/Edit Permissions and User Account for Google Analytics Data Access (Service Account/ Normal Google Login)" width="798" height="600" srcset="https://zappysys.com/blog/wp-content/uploads/2016/01/set-permission-google-analytics-service-account.png 798w, https://zappysys.com/blog/wp-content/uploads/2016/01/set-permission-google-analytics-service-account-300x226.png 300w" sizes="(max-width: 798px) 100vw, 798px" /></a><p id="caption-attachment-534" class="wp-caption-text">Add/Edit Permissions and User Account for Google Analytics Data Access (Service Account/ Normal Google Login)</p></div>
<div>
<h3>How to setup permissions for Service Account (*.p12 certificate)</h3>
<p>Service account is another method to access google data. This is useful when you don&#8217;t want to use google login to access data (Example: Some consultant working to setup automated jobs for your company and they don&#8217;t really have login for google or you don&#8217;t want to share your personal google login with them).</p>
<p>Service Account method (*.p12 certificate file) doesn&#8217;t require complex flow like OAuth so no more authorization prompts but make sure certificate generated for Service Account is kept secret.</p>
<p>To grant permission to service account so it can access google analytics data, First make sure Service Account is created and find account email (It may look like this account-1234@some-project-id-xyz.gserviceaccount.com ) . <a href="//zappysys.com/blog/create-google-api-project-service-account/" target="_blank" rel="noopener">Click here to know more how to create google service account</a>. Once service account created you may follow same steps described in above section to setup permission for Google Analytics Data.</p>
<h2>Access Google Analytics data using OAuth 2.0 authentication protocol</h2>
<p><img decoding="async" class="figureimage" title="Google Data Connection UI - Access Web Google Analytics data using OAuth 2.0 authentication protocol" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/google-analytics-source/ssis-access-google-analytics-data-using-oauth-2-authentication.png" alt="Google Data Connection UI - Access Google Web Analytics data using OAuth 2.0 authentication protocol" /></p>
</div>
<p>&nbsp;</p>
<div>
<h2>Access Google Analytics Data using service account method (*.P12 Certificate file)</h2>
<p><img decoding="async" class="figureimage" title="Google Data Connection UI - Access Google Web Analytics data using service account method (*.P12 Certificate file)" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/google-analytics-source/ssis-access-google-analytics-data-using-service-account.png" alt="SSIS Google Web Analytics Connector - Access data using service account method (*.P12 Certificate file) - Get data from Google Web Analytics Platform" /></p>
</div>
<p>&nbsp;</p>
<h2>SSIS Google Analytics Connector &#8211; Select Web Profile</h2>
<p><img decoding="async" class="figureimage" title="Google API - Select Web Profile" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/google-analytics-source/ssis-google-analytics-select-web-profile.png" alt="Google REST API - Select Web Profile" /></p>
<div>
<h2>SSIS Google Analytics Connector &#8211; Using build your own query mode</h2>
<p><img decoding="async" class="figureimage" title="Google API - Automatic URL mode (Build your own query from UI)" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/google-analytics-source/ssis-google-analytics-automatic-mode.png" alt="Google REST API - Automatic URL mode (Build your own query from UI)" /></p>
</div>
<p>&nbsp;</p>
<div>
<h2>SSIS Google Analytics Connector &#8211; Using direct query mode</h2>
<p><img decoding="async" class="figureimage" title="Google API - Manual URL mode (Supply predefined URL)" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/google-analytics-source/ssis-google-analytics-manual-url-mode.png" alt="Google REST API - Manual URL mode (Supply predefined URL)" /></p>
</div>
<p>&nbsp;</p>
<div>
<h2>SSIS Google Analytics Connector &#8211; Predefined Report Templates</h2>
<p><img decoding="async" class="figureimage" title="Google API - Predefined Reports mode" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/google-analytics-source/ssis-google-analytics-template-report-mode.png" alt="Google REST API - Predefined Reports mode" /></p>
</div>
<p>&nbsp;</p>
<div>
<h2>SSIS Google Analytics Connector &#8211; Report Preview</h2>
<p><img decoding="async" class="figureimage" title="Google API - Predefined Report Preview" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/google-analytics-source/ssis-google-analytics-report-template-preview.png" alt="Google REST API - Predefined Report Preview - Get data from Google Web Analytics Platform" /></p>
</div>
<p>&nbsp;</p>
<div>
<h2>SSIS Google Analytics Connector &#8211; Select Dimensions</h2>
<p><img decoding="async" class="figureimage" title="Google API - Select Dimensions" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/google-analytics-source/ssis-google-analytics-select-dimensions.png" alt="Google REST API - Select Dimensions - Get data from Google Web Analytics Platform" /></p>
</div>
<p>&nbsp;</p>
<div>
<h2>SSIS Google Analytics Connector &#8211; Select Metrics</h2>
<p><img decoding="async" class="figureimage" title="Google API - Select Metrics" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/google-analytics-source/ssis-google-analytics-select-metrics.png" alt="Google REST API - Select Metrics" /></p>
</div>
<p>&nbsp;</p>
<div>
<h2>SSIS Google Analytics Connector &#8211; Select Filters</h2>
<p><img decoding="async" class="figureimage" title="Google API - Select Filters" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/google-analytics-source/ssis-google-analytics-select-filters.png" alt="Google REST API - Select Filters - Get data from Google Web Analytics Platform" /></p>
</div>
<p>&nbsp;</p>
<div>
<h2>SSIS Google Analytics Connector &#8211; Select Segment</h2>
<p><img decoding="async" class="figureimage" title="Google API - Select Segment" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/google-analytics-source/ssis-google-analytics-select-segment.png" alt="Google REST API - Select Segment" /></p>
</div>
<p>&nbsp;</p>
<div>
<h2>How to read google Adwords Data using Google Analytics Source</h2>
<p>If you wish to access Google AdWords data using Google Analytics source then refer instructions listed on AdWords Tab on the UI. Once you enable integration you can view AdWords data easily without any other connector (see below)</p>
</div>
<div id="attachment_862" style="width: 738px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/01/ssis-get-google-adwords-data-using-analytics-source-connector.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-862" class="size-full wp-image-862" src="//zappysys.com/blog/wp-content/uploads/2016/01/ssis-get-google-adwords-data-using-analytics-source-connector.png" alt="Get Data from Google AdWords using SSIS ( use Google Analytics Source Connector)" width="728" height="591" srcset="https://zappysys.com/blog/wp-content/uploads/2016/01/ssis-get-google-adwords-data-using-analytics-source-connector.png 728w, https://zappysys.com/blog/wp-content/uploads/2016/01/ssis-get-google-adwords-data-using-analytics-source-connector-300x244.png 300w" sizes="(max-width: 728px) 100vw, 728px" /></a><p id="caption-attachment-862" class="wp-caption-text">Get Data from Google AdWords using SSIS ( use Google Analytics Source Connector)</p></div>
<div>
<p>&nbsp;</p>
<h2>SSIS Package &#8211; Get data from Google Web Analytics Platform and load into SQL Server</h2>
<p><img decoding="async" class="figureimage" title="SSIS Package - Get data from Google Web Analytics Platform and load into SQL Server" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/google-analytics-source/ssis-extract-google-analytics-data-load-into-sql-server-target.png" alt="SSIS Package - Get data from Google Web Analytics Platform and load into SQL Server" /></p>
</div>
<h2>Conclusion</h2>
<p>Integration with Google Analytics Data can be challenging unless you understand how to write C#, Java, Python code using Google SDKs. If you are not a coder or you are in time crunch then drag and drop integration in <strong>SSIS</strong> using High quality Connector using ZappySys <a href="//zappysys.com/products/ssis-powerpack/ssis-google-analytics-source-connector/"><span style="color: #248cc8;">Google Analytics Source Connector</span></a> will surely make your life easy. It supports all major SQL Server versions upto SQL Server 2016 32-bit/64-bit. Try <a href="//zappysys.com/products/ssis-powerpack/">SSIS PowerPack</a> yourself for FREE.</p>
<h2>Keywords</h2>
<p><strong>Fetch data from Google Web Analytics using SSIS</strong> | <strong>Extract google analytics data using SSIS</strong> | <strong>Load data from Google Analytics without Coding</strong> | <strong>Google Web analytics data import using REST API</strong></p>
<p><a href="https://developers.google.com/analytics/devguides/reporting/core/v3/" target="_blank" rel="noopener">Google Web Analytics Reporting REST API reference link</a></p>
<p>The post <a href="https://zappysys.com/blog/get-data-from-google-analytics-in-ssis-using-rest-api-call/">Get data from Google Analytics in SSIS using REST API Call</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
