<?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>ZappySys, Author at ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/author/gliaskus/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 11 Dec 2025 12:57:07 +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>ZappySys, Author at ZappySys Blog</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to add row numbers in SSIS data flow</title>
		<link>https://zappysys.com/blog/add-row-numbers-ssis-data-flow/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 07 Oct 2022 15:34:28 +0000</pubDate>
				<category><![CDATA[SSIS Template Transform]]></category>
		<category><![CDATA[SSIS Tips & How-Tos]]></category>
		<category><![CDATA[format specifiers]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[placeholder functions]]></category>
		<category><![CDATA[row numbers]]></category>
		<category><![CDATA[template transform]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9828</guid>

					<description><![CDATA[<p>Problem Sometimes Data Flow source does not contain an ID column, or a number indicating a row number, which you need in further steps. To solve this, you may use a free ZappySys PowerPack component Template Transform. So let&#8217;s take a look at how to accomplish that. &#160; &#160; Tip Add Template Transform Go to [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/add-row-numbers-ssis-data-flow/">How to add row numbers in SSIS data flow</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Problem</h2>
<p><img decoding="async" class="size-full wp-image-9829 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2022/10/logo-add-row-number-to-ssis-data-flow.png" alt="" width="120" height="120" />Sometimes Data Flow source does not contain an ID column, or a number indicating a row number, which you need in further steps. To solve this, you may use a <strong>free</strong> <a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys PowerPack</a> component <a href="https://zappysys.com/products/ssis-powerpack/ssis-template-transform-free/" target="_blank" rel="noopener">Template Transform</a>. So let&#8217;s take a look at how to accomplish that.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Tip</h2>
<h3>Add Template Transform</h3>
<p>Go to the Data Flow, drag and drop Template Transform from SSIS toolbox, and connect it right after the source, which does not provide ID/row number:</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-9831 size-full" src="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow.png" alt="" width="283" height="536" srcset="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow.png 283w, https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-158x300.png 158w" sizes="(max-width: 283px) 100vw, 283px" /></p>
<h3>Configure Template Transform</h3>
<p>Template Transform will provide the row number we want. So configure it like this: in the text area enter <code>&lt;&lt;FUN_SEQUENCE&gt;&gt;</code> and optionally you can give this column a name, e.g. <code>RowNumber</code>.</p>
<div id="attachment_9832" style="width: 712px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9832" class="size-full wp-image-9832" src="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-template-transform.png" alt="" width="702" height="673" srcset="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-template-transform.png 702w, https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-template-transform-300x288.png 300w" sizes="(max-width: 702px) 100vw, 702px" /><p id="caption-attachment-9832" class="wp-caption-text">Configure Template Transform to get row numbers for each row in SSIS</p></div>
<p>By default <em>Template Transform&#8217;s</em> output type is DT_NTEXT. So if you wish to change the type to, for example, integer, use the <em>Derived Column</em> connector and CAST function to change it, e.g.:</p>
<p><code>(DT_I4)(DT_WSTR,100)RowNumber</code></p>
<div id="attachment_9842" style="width: 707px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9842" class="wp-image-9842" src="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-derived-column-1.png" alt="" width="697" height="558" srcset="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-derived-column-1.png 777w, https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-derived-column-1-300x240.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-derived-column-1-768x615.png 768w" sizes="(max-width: 697px) 100vw, 697px" /><p id="caption-attachment-9842" class="wp-caption-text">Derived column added to convert DT_NTEXT column to an integer type.</p></div>
<h3>Result</h3>
<p>In the data viewer you would see that you have a column with a different row number in each row:</p>
<div id="attachment_9835" style="width: 603px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9835" class="wp-image-9835 size-full" src="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-result.png" alt="" width="593" height="410" srcset="https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-result.png 593w, https://zappysys.com/blog/wp-content/uploads/2022/10/add-row-number-to-ssis-data-flow-result-300x207.png 300w" sizes="(max-width: 593px) 100vw, 593px" /><p id="caption-attachment-9835" class="wp-caption-text">Results: How to add row numbers to rows in SSIS data flow</p></div>
<p>The post <a href="https://zappysys.com/blog/add-row-numbers-ssis-data-flow/">How to add row numbers in SSIS data flow</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read data from SharePoint List in SSIS (On-Premises SOAP API)</title>
		<link>https://zappysys.com/blog/ssis-read-data-sharepoint-premises-soap-api/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 18 Feb 2022 13:26:38 +0000</pubDate>
				<category><![CDATA[SSIS XML Source (File / SOAP)]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9545</guid>

					<description><![CDATA[<p>Introduction In this article, we learn how to call SharePoint (on-premises) SOAP API Service in SSIS. If you intend to call SharePoint Online (part of Office 365), we suggest reading SSIS SharePoint Online Connector article. Using SOAP API with SharePoint in SSIS is a common requirement to Administer SharePoint. SharePoint on-premises is a nice Microsoft [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-read-data-sharepoint-premises-soap-api/">Read data from SharePoint List in SSIS (On-Premises SOAP API)</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/sharepoint-connector/">API Connector for SharePoint Online</a> which makes it much simpler to <strong>Read/Write SharePoint Data in SSIS</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).</p>
</div></div>
In this article, we learn how to call SharePoint (on-premises) SOAP API Service in SSIS. If you intend to call SharePoint Online (part of Office 365), we suggest reading <a href="https://zappysys.com/api/integration-hub/sharepoint-connector/ssis" target="_blank" rel="noopener">SSIS SharePoint Online Connector</a> article.</p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon.jpg"><img loading="lazy" decoding="async" class="alignleft wp-image-3731 " src="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon-150x150.jpg" alt="icon SharePoint" width="86" height="86" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon-150x150.jpg 150w, https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon.jpg 225w" sizes="(max-width: 86px) 100vw, 86px" /></a>Using SOAP API with SharePoint in SSIS is a common requirement to Administer SharePoint. SharePoint on-premises is a nice Microsoft application used to share documents and collaborate with the company. You can have schedules, projects, documents, and more shared using a Web platform.</p>
<p>In addition, it is a very useful tool that your company may need. It is also possible to automate, administer tasks using SOAP API.<br />
In this article, we will learn how to create SOAP API queries to SharePoint on-premises.</p>
<p>Also, we will show our ZappySys SSIS PowerPack that includes very powerful tools to export SharePoint data from REST API to any other source.<br />
<div class="su-table su-table-alternate">
<table style="width: 494px" width="300">
<tbody>
<tr style="line-height: 0px">
<td style="width: 48.0625px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/ssis-rest-api-web-service-task.png" alt="REST API Web Service Task SSIS" width="50" height="50" /></a></td>
<td style="vertical-align: middle;width: 429.938px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" rel="noopener">SSIS REST API Web Service Task<br />
</a></td>
</tr>
<tr style="line-height: 0px">
<td style="height: 50px;width: 48.0625px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" rel="noopener"><br />
</a><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/images/SSIS-PowerPack/ssis-xml-source.png" alt="SSIS XML Source (File, SOAP, REST Connector) " width="50" height="50" /></a></td>
<td style="vertical-align: middle;height: 58px;width: 429.938px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" rel="noopener">SSIS XML Source (File, REST, SOAP Web Service)</a></td>
</tr>
</tbody>
</table>
</div>
<h2>Requirements</h2>
<ol>
<li>Firstly, you will need SSDT installed.</li>
<li>Secondly, <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> installed.</li>
<li><a href="https://www.soapui.org/downloads/soapui/" target="_blank" rel="noopener">SoapUI installed</a>.</li>
</ol>
<h2>Getting started</h2>
<p>We will start with SoapUI application. It will help us to get all the possible methods SharePoint SOAP API allows. Also, it will show the inner workings of how the requests should look, which we will later replicate on XML Source. SoapUI will be our polestar.</p>
<h2>How to call SharePoint SOAP API (On-Premises)</h2>
<p>To call SOAP API in SSIS you have to perform the following steps at a high level. Detailed steps are described in the next section</p>
<ol>
<li>Import WSDL file or URL for your Service in SoapUI for testing.
<ol>
<li>File &gt; New SOAP Project.</li>
<li>In the <em>Initial WSDL</em> field enter<br />
<em>http://your.domain.com/_vti_bin/Lists.asmx?wsdl<br />
or<br />
http://your.domain.com/my-site/_vti_bin/Lists.asmx?wsdl</em></li>
</ol>
</li>
<li>Add credentials for SOAP Web service (Basic Auth or WSS)</li>
<li>Create SOAP Request XML (Edit default parameters) and <strong>Click Play Button </strong>to test your request. Associative photo:
<div id="attachment_2543" style="width: 745px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2543" class="size-full wp-image-2543" src="https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png" alt="Create SOAP Request Body from WSDL (Using SoapUI tool)" width="735" height="451" srcset="https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png 735w, https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body-300x184.png 300w" sizes="(max-width: 735px) 100vw, 735px" /></a><p id="caption-attachment-2543" class="wp-caption-text">Create SOAP Request Body from WSDL (Using SoapUI tool)</p></div></li>
<li>If your test works in SoapUI then you are ready to move to SSIS part.</li>
<li>Copy Service URL, Request Body and Headers to Notepad &#8212; we will use it in SSIS.<br />
For Header see <strong>Raw</strong> Tab on SoapUI &gt; Copy two lines <strong>Content-Type</strong> and <strong>SOAPAction.</strong></p>
<div id="attachment_7355" style="width: 638px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/06/soapui-get-contenttype-soapaction-raw-tab.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7355" class="size-full wp-image-7355" src="https://zappysys.com/blog/wp-content/uploads/2016/06/soapui-get-contenttype-soapaction-raw-tab.png" alt="Get ContentType and SOAPAction Headers from SoapUI Raw tab" width="628" height="457" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/soapui-get-contenttype-soapaction-raw-tab.png 628w, https://zappysys.com/blog/wp-content/uploads/2016/06/soapui-get-contenttype-soapaction-raw-tab-300x218.png 300w" sizes="(max-width: 628px) 100vw, 628px" /></a><p id="caption-attachment-7355" class="wp-caption-text">Get ContentType and SOAPAction Headers from SoapUI Raw tab</p></div></li>
</ol>
<p>In the next section, we will see how to call SharePoint SOAP Web Service in SSIS.</p>
<h2>How to read data from a SharePoint List via SOAP Web Service</h2>
<p>Now let&#8217;s move onto SSIS and get some data from SharePoint using <em>XML Source</em>.</p>
<ol>
<li>Open SSIS, create a new Integration project and create a new SSIS package.</li>
<li>Drag and drop Data Flow onto the Control Flow from SSIS Toolbox.</li>
<li>Then drag and drop <a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">XML Source</a> onto Data Flow (you may also use other similar connectors such as <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">REST API Task</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a>).</li>
<li>Then configure <em>XML Source</em> in this way:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-9553" src="https://zappysys.com/blog/wp-content/uploads/2022/02/how-to-read-data-from-sharepoint-via-soap-api-webservice.png" alt="" width="636" height="750" srcset="https://zappysys.com/blog/wp-content/uploads/2022/02/how-to-read-data-from-sharepoint-via-soap-api-webservice.png 636w, https://zappysys.com/blog/wp-content/uploads/2022/02/how-to-read-data-from-sharepoint-via-soap-api-webservice-254x300.png 254w" sizes="(max-width: 636px) 100vw, 636px" /></p>
<ol>
<li>Enter URL:<br />
<span style="text-decoration: underline;">https://my.sharepoint.site.com/sites/mysite/_vti_bin/Lists.asmx</span><br />
or<br />
<span style="text-decoration: underline;">https://my.sharepoint.site.com/_vti_bin/Lists.asmx</span> (depends if you have many sites or just one).</li>
<li>Check <strong>Use Credentials</strong> checkbox and create <strong>ZS-HTTP</strong> connection. Use <strong>Basic</strong> or <strong>NTLM</strong> authorization scheme.</li>
<li>Then copy configuration from SoapUI to XML Source. E.g. <strong>HTTP Request Method</strong>, <strong>Body</strong>, <strong>Body Content-Type, HTTP Headers </strong>(e.g. SOAPAction header).</li>
<li>Use <strong>$.soap:Envelope.soap:Body.GetListItemsResponse.GetListItemsResult.listitems.rs:data.z:row[*]</strong> as filter. If it doesn&#8217;t work, use <strong>Select Filter</strong> button to select the path manually and select <strong>row</strong> node.</li>
</ol>
</li>
<li>What&#8217;s left is to connect XML Source with OLEDB Destination or a similar destination component:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-9554" src="https://zappysys.com/blog/wp-content/uploads/2022/02/sharepoint-on-premises-load-list-using-soap-webservice-api-into-database.png" alt="" width="351" height="289" srcset="https://zappysys.com/blog/wp-content/uploads/2022/02/sharepoint-on-premises-load-list-using-soap-webservice-api-into-database.png 351w, https://zappysys.com/blog/wp-content/uploads/2022/02/sharepoint-on-premises-load-list-using-soap-webservice-api-into-database-300x247.png 300w" sizes="(max-width: 351px) 100vw, 351px" /></li>
</ol>
<h2>Conclusion</h2>
<p>To conclude, we can say that using SSIS PowerPack component XML Source and SoapUI we could achieve our goal of getting data from SharePoint On-Premises. The next step could be writing data to SharePoint via the same SOAP API interface, but this time using <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a> component.</p>
<p>The post <a href="https://zappysys.com/blog/ssis-read-data-sharepoint-premises-soap-api/">Read data from SharePoint List in SSIS (On-Premises SOAP API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Load 10M rows from SQL Server to Snowflake in 3 minutes</title>
		<link>https://zappysys.com/blog/load-10-million-rows-from-sql-server-to-snowflake/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 17 Dec 2019 16:55:54 +0000</pubDate>
				<category><![CDATA[AWS (Amazon Web Services)]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[S3 (Simple Storage Service)]]></category>
		<category><![CDATA[SSIS CSV Export Task]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS Tasks]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[Export CSV Task]]></category>
		<category><![CDATA[snowflake]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[zip]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8538</guid>

					<description><![CDATA[<p>Introduction In this article, we will cover the points on how to load 10 million rows from SQL Server to Snowflake in just 3 minutes. Snowflake is a data warehousing platform that resides in a cloud. Basically, it is a data warehouse software exposed as a service. It allows integrating many data sources via internal [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/load-10-million-rows-from-sql-server-to-snowflake/">Load 10M rows from SQL Server to Snowflake in 3 minutes</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="size-thumbnail wp-image-8580 align= alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/12/sql-server-to-snowflake-150x150.png" alt="" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/sql-server-to-snowflake-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/12/sql-server-to-snowflake-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/sql-server-to-snowflake.png 400w" sizes="(max-width: 150px) 100vw, 150px" />In this article, we will cover the points on how to load 10 million rows from SQL Server to Snowflake in just 3 minutes.</p>
<p style="text-align: justify;">Snowflake is a data warehousing platform that resides in a cloud. Basically, it is a data warehouse software exposed as a service. It allows integrating many data sources via internal Snowflake Partner apps and loading them into the Snowflake storage engine. Another part of Snowflake is a computing engine that is responsible for serving your SQL queries. Both engines can work independently thus users that are querying a data warehouse are not affected by a data load that is happening at the same time. Snowflake is an elastic service, which means you pay only for the resources used. Specifically, you pay only for each second of the processing time you use.</p>
<p style="text-align: justify;">To show how data loading works in Snowflake, we will take 10 million rows from SQL Server and load them into Snowflake using SSIS and <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a>. These SSIS PowerPack connectors will be used to achieve the task:</p>
<div class="content_block" id="custom_post_widget-8706"><div style="display: table-row; background: #f7f7f7;">
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc;"><img loading="lazy" decoding="async" style="vertical-align: middle; width: 50px; height: 50px; max-width: 50px;" src="//zappysys.com/images/SSIS-PowerPack/ssis-export-csv-file-task.png" alt="JSON Parser Transform" width="50" height="50" /></div>
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc; border-left: none; width: 100%;"><a href="//zappysys.com/products/ssis-powerpack/ssis-export-csv-file-task/" target="_blank" rel="noopener">Export CSV File Task</a></div>
</div></div>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>Step-by-step &#8211; How to load 10 million rows from SQL Server to Snowflake in 3 minutes</h2>
<h3>Getting started</h3>
<p style="text-align: justify;">To achieve the goal, we will use a slightly modified Northwind database (example database from Microsoft) and SnowSQL &#8211; a command-line tool provided by Snowflake. So in the first steps, you will need to install the Northwind database and SnowSQL. After that, we will proceed to create a table in Snowflake &#8211; a table we will load the data into &#8211; and a file format which will be used to load data from the Snowflake staging area into the destination table. Once that&#8217;s complete, we will proceed in creating an SSIS package, adding and configuring the connectors, and finally running it to get the results. Let&#8217;s proceed!</p>
<h3>Install a Northwind database</h3>
<p>Download and run the creation script of a modified <a href="https://zappysys.com/blog/wp-content/uploads/2019/12/Northwind.zip">Northwind</a> database. The only thing that was modified is a &#8220;CustomersForSnowflake&#8221; view added which returns 10M rows.</p>
<h3>Install and configure SnowSQL command-line tool</h3>
<p>Download and install SnowSQL; you will find the instructions on how to do that in <a href="https://docs.snowflake.net/manuals/user-guide/snowsql-install-config.html" target="_blank" rel="noopener">https://docs.snowflake.net/manuals/user-guide/snowsql-install-config.html</a>.</p>
<p>Once installed, you will need to configure the default Snowflake account name, user name, and password:</p>
<ol>
<li>Go to Windows File Explorer and enter this path:<br />
<code>%USERPROFILE%\.snowsql\</code><br />
Usually, when entered the path looks similar to this one:<br />
<code>C:\Users\myUserName\.snowsql</code></li>
<li>Find a file named <strong>config </strong>and open it.</li>
<li>Then configure your credentials:</li>
</ol>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-8587" src="https://zappysys.com/blog/wp-content/uploads/2019/12/016-sql-server-to-snowflake-configure-snowsql-username.png" alt="" width="712" height="427" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/016-sql-server-to-snowflake-configure-snowsql-username.png 712w, https://zappysys.com/blog/wp-content/uploads/2019/12/016-sql-server-to-snowflake-configure-snowsql-username-300x180.png 300w" sizes="(max-width: 712px) 100vw, 712px" /><br />
<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>NOTE:</strong> When you deploy the package to a production server, instead of using your own user name, enter the username under which you run SSIS packages, e.g. SQL Server Agent&#8217;s account. Username and password can be specified <a href="https://docs.snowflake.net/manuals/user-guide/snowsql-start.html#connection-syntax" target="_blank" rel="noopener">as arguments</a> in a command-line when executing SnowSQL. A password can also be specified in <a href="https://docs.snowflake.net/manuals/user-guide/snowsql-start.html#specifying-passwords-when-connecting" target="_blank" rel="noopener">Environment variables</a>.</div></div>
<h3>Create a table in Snowflake</h3>
<p>Login to your Snowflake account, open a Worksheet and execute this query:</p><pre class="crayon-plain-tag">create or replace table Customers(
ID number,
CustomerID nchar(5),
CompanyName nvarchar(40),
ContactName nvarchar(30),
ContactTitle nvarchar(30),
Address nvarchar(60),
City nvarchar(15),
Region nvarchar(15),
PostalCode nvarchar(10),
Country nvarchar(15),
Phone nvarchar(24),
Fax nvarchar(24)
)</pre><p>
&nbsp;</p>
<p>We will load 10M customers from the Northwind database and load them into this table.</p>
<h3>Create a file format in Snowflake</h3>
<p>Then in the same Worksheet create a file format for zipped CSV files by executing this query:</p><pre class="crayon-plain-tag">create or replace file format GzipCsvFormat
type = csv
field_delimiter = ','
null_if = ('NULL', 'null')
empty_field_as_null = true
compression = gzip
field_optionally_enclosed_by = '"'</pre><p>
&nbsp;</p>
<p>We will use this file format when loading data from a Snowflake stage to the Snowflake destination table. This file format defines CSV format which is used by ZappySys Export CSV Task in SSIS.</p>
<h3>Create an SSIS package</h3>
<p>We are ready to create a new SSIS package and load some data into Snowflake. We are going to use two methods of how we load data into Snowflake. In one method we will load data into Snowflake&#8217;s local storage, while in the second one we will stage data in Amazon S3 bucket. Decide how you want to stage files, and then choose the appropriate workflow when creating a new package:</p>
<div id="attachment_8554" style="width: 640px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8554" class="wp-image-8554 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/001-sql-server-to-snowflake-create-ssis-package.png" alt="Loading 3 million rows from SQL Server to Snowflake" width="630" height="519" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/001-sql-server-to-snowflake-create-ssis-package.png 630w, https://zappysys.com/blog/wp-content/uploads/2019/12/001-sql-server-to-snowflake-create-ssis-package-300x247.png 300w" sizes="(max-width: 630px) 100vw, 630px" /><p id="caption-attachment-8554" class="wp-caption-text">Loading 10 million rows from SQL Server to Snowflake</p></div>
<h3>Add &amp; configure ZappySys Export CSV Task</h3>
<p>Firstly, drag and drop ZappySys Export CSV Task from SSIS toolbox and follow the instructions on how to configure it:</p>
<h4>Configure source</h4>
<ol>
<li>Proceed with configuring the data source, from which you will be exporting data. We will use the Northwind database as an example:
<div id="attachment_8555" style="width: 647px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8555" class="wp-image-8555 size-full" style="-webkit-user-drag: none; display: inline-block; margin-bottom: -1ex;" src="https://zappysys.com/blog/wp-content/uploads/2019/12/002-sql-server-to-snowflake-configure-ole-db-source-connection.png" alt="Export CSV Task: configuring OLE DB Connection to export data from SQL Server to Snowflake" width="637" height="292" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/002-sql-server-to-snowflake-configure-ole-db-source-connection.png 637w, https://zappysys.com/blog/wp-content/uploads/2019/12/002-sql-server-to-snowflake-configure-ole-db-source-connection-300x138.png 300w" sizes="(max-width: 637px) 100vw, 637px" /><p id="caption-attachment-8555" class="wp-caption-text">Export CSV Task: configuring OLE DB Connection to export data from SQL Server to Snowflake</p></div></li>
<li>Then move on and select it and enter the query or table name you want to export data from:
<div id="attachment_8557" style="width: 647px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8557" class="wp-image-8557 size-full" style="-webkit-user-drag: none; display: inline-block; margin-bottom: -1ex;" src="https://zappysys.com/blog/wp-content/uploads/2019/12/003-sql-server-to-snowflake-configure-sql-query.png" alt="Export CSV Task: configuring source SQL query for data loading from SQL Server to Snowflake" width="637" height="593" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/003-sql-server-to-snowflake-configure-sql-query.png 637w, https://zappysys.com/blog/wp-content/uploads/2019/12/003-sql-server-to-snowflake-configure-sql-query-300x279.png 300w" sizes="(max-width: 637px) 100vw, 637px" /><p id="caption-attachment-8557" class="wp-caption-text">Export CSV Task: configuring source SQL query for data loading from SQL Server to Snowflake</p></div>
<p>We will be using this query:<br />
<code>select top 10000000 * from CustomersForSnowflake</code></li>
<li>Then in the <em>Split Options</em> tab split the exported CSV into many files, e.g. into 50 MB chunks:
<div id="attachment_8558" style="width: 508px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8558" class="wp-image-8558 size-full" style="-webkit-user-drag: none; display: inline-block; margin-bottom: -1ex;" src="https://zappysys.com/blog/wp-content/uploads/2019/12/007-sql-server-to-snowflake-split-rows.png" alt="Using data split options in the Export CSV Task" width="498" height="309" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/007-sql-server-to-snowflake-split-rows.png 498w, https://zappysys.com/blog/wp-content/uploads/2019/12/007-sql-server-to-snowflake-split-rows-300x186.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/007-sql-server-to-snowflake-split-rows-436x272.png 436w" sizes="(max-width: 498px) 100vw, 498px" /><p id="caption-attachment-8558" class="wp-caption-text">Using data split options in the Export CSV Task</p></div>
<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>NOTE:</strong> Snowflake recommends having files that are 10-100 MB in size when <em><span style="text-decoration: underline;">compressed</span></em>. So it is perfectly safe to configure the value to 100 MB and above.</div></div></li>
</ol>
<h4>Configure target</h4>
<p>Depending on which staging approach you chose to use, set the export target to a local path or S3 bucket:</p>
<h5>Using local Snowflake storage</h5>
<p>Just set the appropriate <em>Save Mode</em> and a file path:</p>
<div id="attachment_8693" style="width: 568px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8693" class="wp-image-8693 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/006a-sql-server-to-snowflake-configure-local-target-path-to-export-csv-files-to-1.png" alt="Saving files locally to upload them to Snowflake local stage later" width="558" height="534" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/006a-sql-server-to-snowflake-configure-local-target-path-to-export-csv-files-to-1.png 558w, https://zappysys.com/blog/wp-content/uploads/2019/12/006a-sql-server-to-snowflake-configure-local-target-path-to-export-csv-files-to-1-300x287.png 300w" sizes="(max-width: 558px) 100vw, 558px" /><p id="caption-attachment-8693" class="wp-caption-text">Saving files locally to upload them to Snowflake local stage later</p></div>
<h5>Using S3 storage</h5>
<p>For storing staging files in S3, follow these steps:</p>
<ol>
<li>Set <em>Save Mode</em> to <strong>Save to Connection</strong> and select <strong>&lt;New ZS-AWS-STORAGE Connection&gt;</strong>:
<div id="attachment_8559" style="width: 559px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8559" class="wp-image-8559 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/005-sql-server-to-snowflake-configure-s3-target-connection.png" alt="Export CSV Task: configuring Amazon S3 endpoint as the target for data export" width="549" height="355" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/005-sql-server-to-snowflake-configure-s3-target-connection.png 549w, https://zappysys.com/blog/wp-content/uploads/2019/12/005-sql-server-to-snowflake-configure-s3-target-connection-300x194.png 300w" sizes="(max-width: 549px) 100vw, 549px" /><p id="caption-attachment-8559" class="wp-caption-text">Export CSV Task: configuring Amazon S3 endpoint as the target for data export</p></div></li>
<li>Then select <strong>S3</strong> as <em>Storage Service</em> and fill in <em>Access and Secret Key</em>, select your region (optional):
<div id="attachment_8561" style="width: 576px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8561" class="wp-image-8561 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/008-sql-server-to-snowflake-configure-s3-target-connection-entering-access-and-secret-keys.png" alt="Configuring Amazon Connection Manager to store staging data in S3" width="566" height="553" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/008-sql-server-to-snowflake-configure-s3-target-connection-entering-access-and-secret-keys.png 566w, https://zappysys.com/blog/wp-content/uploads/2019/12/008-sql-server-to-snowflake-configure-s3-target-connection-entering-access-and-secret-keys-300x293.png 300w" sizes="(max-width: 566px) 100vw, 566px" /><p id="caption-attachment-8561" class="wp-caption-text">Configuring Amazon Connection Manager to store staging data in S3</p></div></li>
<li>Then in the Export CSV Task window, in <strong>Target</strong> tab configure it similarly:
<div id="attachment_8698" style="width: 637px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8698" class="size-full wp-image-8698" src="https://zappysys.com/blog/wp-content/uploads/2019/12/006-sql-server-to-snowflake-configure-s3-target-path-to-export-csv-files-to-s3-2.png" alt="Export CSV Task: configuring target to store staging data in S3" width="627" height="593" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/006-sql-server-to-snowflake-configure-s3-target-path-to-export-csv-files-to-s3-2.png 627w, https://zappysys.com/blog/wp-content/uploads/2019/12/006-sql-server-to-snowflake-configure-s3-target-path-to-export-csv-files-to-s3-2-300x284.png 300w" sizes="(max-width: 627px) 100vw, 627px" /><p id="caption-attachment-8698" class="wp-caption-text">Export CSV Task: configuring target to store staging data in S3</p></div>
<p>Another option you may consider is to use <a href="https://zappysys.com/blog/ssis-amazon-s3-storage-task-examples-download-upload-move-delete-files-folders/">Amazon Storage Task</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-azure-blob-storage-task/">Azure Storage Task</a> to upload files to S3 in a separate step after the Export CSV Step. For this perform the following steps.</p>
<ol>
<li>On the Target tab, set Save Mode to <strong>Save to Path (Local Disk) instead of Connection to S3 or Azure</strong>.</li>
<li>Drag &amp; Drop <a href="https://zappysys.com/blog/ssis-amazon-s3-storage-task-examples-download-upload-move-delete-files-folders/">Amazon Storage Task</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-azure-blob-storage-task/">Azure Storage Task</a>  and connect with the previous Export CSV Step</li>
<li>Configure Storage Task to upload Local files to S3 or Azure Blob Storage.</li>
<li>Continue to the next section for more instructions.</li>
</ol>
</li>
</ol>
<h3>Add Execute Process Task to create a staging area</h3>
<p>We are ready to add Execute Process Task to create a staging area in Snowflake. Again, depending on where you will store staging files, Snowflake&#8217;s local storage or Amazon S3, use one of the approaches below:</p>
<p><strong>Create Snowflake local staging</strong></p>
<div id="attachment_8562" style="width: 788px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8562" class="wp-image-8562 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/009-sql-server-to-snowflake-configure-snow-sql-to-create-a-stage.png" alt="Creating a local stage in Snowflake using SnowSQL command-line tool and SSIS" width="778" height="314" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/009-sql-server-to-snowflake-configure-snow-sql-to-create-a-stage.png 778w, https://zappysys.com/blog/wp-content/uploads/2019/12/009-sql-server-to-snowflake-configure-snow-sql-to-create-a-stage-300x121.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/009-sql-server-to-snowflake-configure-snow-sql-to-create-a-stage-768x310.png 768w" sizes="(max-width: 778px) 100vw, 778px" /><p id="caption-attachment-8562" class="wp-caption-text">Creating a local stage in Snowflake using SnowSQL command-line tool and SSIS</p></div>
<p>File path:</p>
<p><code>C:\Program Files\Snowflake SnowSQL\snowsql.exe</code></p>
<p>Arguments:</p>
<p><code>-q "CREATE OR REPLACE STAGE CustomersStaging" -d DEMO_DB -s Public</code></p>
<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>NOTE:</strong> Replace <strong>DEMO_DB</strong> with the database name you are using. Also, do the same thing with schema <strong>Public</strong>.</div></div>
<p><strong>Create Amazon S3 staging</strong></p>
<p><img loading="lazy" decoding="async" class="wp-image-8563 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/011-sql-server-to-snowflake-configure-snow-sql-to-create-a-stage-in-s3.png" alt="Creating an Amazon S3 stage in Snowflake using SnowSQL command-line tool and SSIS" width="737" height="314" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/011-sql-server-to-snowflake-configure-snow-sql-to-create-a-stage-in-s3.png 737w, https://zappysys.com/blog/wp-content/uploads/2019/12/011-sql-server-to-snowflake-configure-snow-sql-to-create-a-stage-in-s3-300x128.png 300w" sizes="(max-width: 737px) 100vw, 737px" /></p>
<p>Creating an Amazon S3 stage in Snowflake using SnowSQL command-line tool and SSISFile path:</p>
<p><code>C:\Program Files\Snowflake SnowSQL\snowsql.exe</code></p>
<p>Arguments:</p>
<p><code>CREATE OR REPLACE STAGE CustomersStaging url='s3://your-bucket-name/destinationFolder/' credentials=(aws_key_id='AKIAXXXXXXXXXXXXXXXX' aws_secret_key='6p1ayaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaLXz88')</code></p>
<h3>Add Execute Process Task to upload files to the staging area (local staging approach only)</h3>
<p>We still need to upload CSV files that were saved locally for local Snowflake staging. So add another Execute Process Task and configure it similarly:</p>
<h3><img loading="lazy" decoding="async" class="wp-image-8564 size-full" style="font-size: 16px;" src="https://zappysys.com/blog/wp-content/uploads/2019/12/010-sql-server-to-snowflake-configure-snow-sql-to-put-CSV-files-into-stage.png" alt="Uploading local CSV files to Snowflake stage using SnowSQL command-line tool and SSIS" width="726" height="314" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/010-sql-server-to-snowflake-configure-snow-sql-to-put-CSV-files-into-stage.png 726w, https://zappysys.com/blog/wp-content/uploads/2019/12/010-sql-server-to-snowflake-configure-snow-sql-to-put-CSV-files-into-stage-300x130.png 300w" sizes="(max-width: 726px) 100vw, 726px" /></h3>
<p>Uploading local CSV files to Snowflake stage using SnowSQL command-line tool and SSISFile path:</p>
<p><code>C:\Program Files\Snowflake SnowSQL\snowsql.exe</code></p>
<p>Arguments:</p>
<p><code>-q "PUT file://e:/temp/*.csv @DEMO_DB.PUBLIC.CustomersStaging"</code></p>
<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>NOTE:</strong> e:/temp/ is a directory we used in Export CSV Task. Replace <strong>DEMO_DB</strong> with the database name you are using. Also, do the same thing with schema <strong>Public</strong>.</div></div>
<h3>Add Execute Process Task to copy files from the Snowflake/Amazon S3 stage to Snowflake table</h3>
<p>Finally, add the final Execute Process Task to issue a command to load files from the stage into a real Snowflake table:</p>
<div id="attachment_8565" style="width: 736px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8565" class="wp-image-8565 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/012-sql-server-to-snowflake-configure-snow-sql-to-copy-data-from-stage-to-table.png" alt="Copying data from a staging area to a Snowflake table using SSIS" width="726" height="313" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/012-sql-server-to-snowflake-configure-snow-sql-to-copy-data-from-stage-to-table.png 726w, https://zappysys.com/blog/wp-content/uploads/2019/12/012-sql-server-to-snowflake-configure-snow-sql-to-copy-data-from-stage-to-table-300x129.png 300w" sizes="(max-width: 726px) 100vw, 726px" /><p id="caption-attachment-8565" class="wp-caption-text">Copying data from a staging area to a Snowflake table using SSIS</p></div>
<p>File path:</p>
<p><code>C:\Program Files\Snowflake SnowSQL\snowsql.exe</code></p>
<p>Arguments:</p>
<p><code>-q "COPY INTO CUSTOMERS FROM @CustomersStaging file_format = (format_name = 'GZIPCSVFORMAT')" -d DEMO_DB -s Public</code></p>
<h3>Execute the package</h3>
<p>We are ready to execute the package, so just run it. In this example you see the workflow when using Amazon S3 as stage:</p>
<div id="attachment_8569" style="width: 359px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8569" class="wp-image-8569 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/013-sql-server-to-snowflake-execute-the-package.png" alt="Executing an SSIS package to load data from Snowflake to SQL Server" width="349" height="389" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/013-sql-server-to-snowflake-execute-the-package.png 349w, https://zappysys.com/blog/wp-content/uploads/2019/12/013-sql-server-to-snowflake-execute-the-package-269x300.png 269w" sizes="(max-width: 349px) 100vw, 349px" /><p id="caption-attachment-8569" class="wp-caption-text">Executing an SSIS package to load data from Snowflake to SQL Server</p></div>
<h3>The Results</h3>
<p>Once the package executes, we can check the results:</p>
<div id="attachment_8570" style="width: 363px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8570" class="wp-image-8570 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/014-sql-server-to-snowflake-the-results-ssis-package.png" alt="Successful execution of SSIS package when loading data from Snowflake to SQL Server" width="353" height="390" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/014-sql-server-to-snowflake-the-results-ssis-package.png 353w, https://zappysys.com/blog/wp-content/uploads/2019/12/014-sql-server-to-snowflake-the-results-ssis-package-272x300.png 272w" sizes="(max-width: 353px) 100vw, 353px" /><p id="caption-attachment-8570" class="wp-caption-text">Successful execution of SSIS package when loading data from Snowflake to SQL Server</p></div>
<p>If we go to Snowflake and execute the SELECT query, we see all 10M customers loaded:</p>
<div id="attachment_8568" style="width: 728px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8568" class="wp-image-8568 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/013-sql-server-to-snowflake-the-results.png" alt="Successful loading of 10 million rows from SQL Server to Snowflake using SSIS and ZappySys SSIS PowerPack" width="718" height="396" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/013-sql-server-to-snowflake-the-results.png 718w, https://zappysys.com/blog/wp-content/uploads/2019/12/013-sql-server-to-snowflake-the-results-300x165.png 300w" sizes="(max-width: 718px) 100vw, 718px" /><p id="caption-attachment-8568" class="wp-caption-text">Successful loading of 10 million rows from SQL Server to Snowflake using SSIS and ZappySys SSIS PowerPack</p></div>
<p>All done in less than 3 mins:</p>
<p><img loading="lazy" decoding="async" class="wp-image-8702 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/017-sql-server-to-snowflake-loads-data-in-less-than-3-mins-e1580146280905.png" alt="Loading 10 million rows from SQL Server to Snowflake using SSIS and ZappySys SSIS PowerPack just in 3 minutes" width="717" height="423" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/017-sql-server-to-snowflake-loads-data-in-less-than-3-mins-e1580146280905.png 717w, https://zappysys.com/blog/wp-content/uploads/2019/12/017-sql-server-to-snowflake-loads-data-in-less-than-3-mins-e1580146280905-300x177.png 300w" sizes="(max-width: 717px) 100vw, 717px" /></p>
<h2>Conclusion</h2>
<p style="text-align: justify;">We achieved just what we aimed for &#8211; we loaded 10 million rows from SQL Server to Snowflake; all done in less than 3 minutes! Two approaches were taken into consideration: in one we staged CSV files in the local Snowflake stage and in the other we staged files in the Amazon S3 bucket. To accomplish this we used <a href="https://zappysys.com/products/ssis-powerpack/ssis-export-csv-file-task/" target="_blank" rel="noopener">ZappySys Export CSV Task</a>, which allowed us to export data from the SQL Server view to CSV format, split files into smaller ones, zip them and store them locally or upload to the Amazon S3 bucket. Finally, we used a standard SSIS Task &#8220;Execute Process Task&#8221; to issue Snowflake commands such as creating the stage area in Snowflake, uploading CSVs into the local stage and loading data into the Snowflake table.</p>
<h2>Download a sample package</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/Load-10M-rows-from-SQL-Server-into-Snowflake-1.zip">Load 10M rows from SQL Server into Snowflake.dtsx.zip</a></p>
<h2>References</h2>
<p><a href="https://docs.snowflake.net/manuals/user-guide/data-load-bulk.html" target="_blank" rel="noopener">https://docs.snowflake.net/manuals/user-guide/data-load-bulk.html</a></p>
<p><a href="https://docs.snowflake.net/manuals/user-guide/snowsql.html" target="_blank" rel="noopener">https://docs.snowflake.net/manuals/user-guide/snowsql.html</a></p>
<p><a href="https://docs.snowflake.net/manuals/user-guide/data-load-s3-create-stage.html" target="_blank" rel="noopener">https://docs.snowflake.net/manuals/user-guide/data-load-s3-create-stage.html</a></p>
<p><a href="https://docs.snowflake.net/manuals/sql-reference/sql/create-file-format.html" target="_blank" rel="noopener">https://docs.snowflake.net/manuals/sql-reference/sql/create-file-format.html</a></p>
<p><a href="https://docs.snowflake.net/manuals/sql-reference/sql/put.html" target="_blank" rel="noopener">https://docs.snowflake.net/manuals/sql-reference/sql/put.html</a></p>
<p><a href="https://docs.snowflake.net/manuals/sql-reference/sql/copy-into-table.html" target="_blank" rel="noopener">https://docs.snowflake.net/manuals/sql-reference/sql/copy-into-table.html</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/load-10-million-rows-from-sql-server-to-snowflake/">Load 10M rows from SQL Server to Snowflake in 3 minutes</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<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 loading="lazy" 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 loading="lazy" 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 loading="lazy" 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 migrate Postman API call to SSIS / ODBC PowerPack</title>
		<link>https://zappysys.com/blog/postman-to-ssis-odbc-powerpack/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 17 Oct 2019 16:41:23 +0000</pubDate>
				<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS Tips & How-Tos]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[postman]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8172</guid>

					<description><![CDATA[<p>Introduction In the previous article, we learned how to copy settings from curl to ZappySys products, and in this article, we will continue on how to migrate Postman API call to SSIS / ODBC PowerPack. Postman is a very popular client tool to test API calls. Many API providers document how to call their API using [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/postman-to-ssis-odbc-powerpack/">How to migrate Postman API call to SSIS / ODBC PowerPack</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><img loading="lazy" decoding="async" class="wp-image-8173 size-thumbnail alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/10/postman-to-ssis-odbc-powerpack-icon-150x150.png" alt="" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/postman-to-ssis-odbc-powerpack-icon-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/10/postman-to-ssis-odbc-powerpack-icon-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/postman-to-ssis-odbc-powerpack-icon.png 330w" sizes="(max-width: 150px) 100vw, 150px" /></p>
<p style="text-align: justify;">In the previous article, we learned <a href="https://zappysys.com/blog/using-ssis-curl-syntax-to-ssis-api-task/" target="_blank" rel="noopener">how to copy settings from curl to ZappySys products</a>, and in this article, we will continue on how to migrate Postman API call to SSIS / ODBC PowerPack. <a href="https://www.getpostman.com" target="_blank" rel="noopener">Postman</a> is a very popular client tool to test API calls. Many API providers document how to call their API using Postman. In this article we will focus on how to use the same settings in ZappySys Products to implement API integration in SSIS or other apps like Power BI, Informatica, Excel, Tableau, SSRS&#8230; many ODBC apps.</p>
<p style="text-align: justify;">When you are connecting to an API you may have examples of how to do that in <a href="https://www.getpostman.com" target="_blank" rel="noopener">Postman</a>. If you know how to do it in Postman, you are one step away from making it work in <a href="https://www.zappysys.com/products/ssis-powerpack" target="_blank" rel="noopener">SSIS PowerPack</a> and <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ODBC PowerPack</a> (JSON, XML, CSV Drivers, and other). Most of the examples will show how to do that specifically using ODBC PowerPack and <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">JSON Driver</a>, but since ODBC PowerPack UI is very similar to the connectors of SSIS PowerPack, it will be quite clear where to use it in SSIS PowerPack as well. In the examples where UI differs significantly, both &#8211; ODBC and SSIS PowerPack &#8211; examples will be presented.</p>
<h2></h2>
<h2>Prerequisites</h2>
<p>In this article we assume you meet these requirements:</p>
<h3><span style="font-size: 12pt;">When migrating Postman API call to SSIS PowerPack</span></h3>
<ol>
<li><a href="https://www.getpostman.com" target="_blank" rel="noopener">Postman</a> installed.</li>
<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
<li><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
</ol>
<h3><span style="font-size: 12pt;">When migrating Postman API call to to ODBC PowerPack</span></h3>
<ol>
<li><a href="https://www.getpostman.com" target="_blank" rel="noopener">Postman</a> installed.</li>
<li><a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed (<a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
</ol>
<h2>The Basics</h2>
<p>This section shows how to migrate simple options such as URL, HTTP Request Method, and HTTP Headers.</p>
<h3>How to configure the URL and HTTP Request Method</h3>
<div id="attachment_8187" style="width: 767px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/001-how-to-copy-postman-configuration-to-zappysys-ssis-odbc-powerpack-components-url-and-request-method/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8187" class="wp-image-8187 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/001-how-to-copy-postman-configuration-to-zappysys-ssis-odbc-powerpack-components-url-and-request-method.png" alt="Migrate Postman API call to SSIS / ODBC (API URL setting to ODBC Driver (GET / POST) )" width="757" height="617" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/001-how-to-copy-postman-configuration-to-zappysys-ssis-odbc-powerpack-components-url-and-request-method.png 757w, https://zappysys.com/blog/wp-content/uploads/2019/10/001-how-to-copy-postman-configuration-to-zappysys-ssis-odbc-powerpack-components-url-and-request-method-300x245.png 300w" sizes="(max-width: 757px) 100vw, 757px" /></a><p id="caption-attachment-8187" class="wp-caption-text">Migrate Postman API call to SSIS / ODBC (API URL setting to ODBC Driver (GET / POST) )</p></div>
<h3>How to configure HTTP Headers</h3>
<div id="attachment_8186" style="width: 583px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/001a-how-to-pass-http-headers-using-postman-and-json-xml-csv-odbc-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8186" class="wp-image-8186 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/001a-how-to-pass-http-headers-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png" alt="Migrate Postman HTTP Headers setting to ODBC Driver" width="573" height="701" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/001a-how-to-pass-http-headers-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png 573w, https://zappysys.com/blog/wp-content/uploads/2019/10/001a-how-to-pass-http-headers-using-postman-and-json-xml-csv-odbc-driver-and-ssis-245x300.png 245w" sizes="(max-width: 573px) 100vw, 573px" /></a><p id="caption-attachment-8186" class="wp-caption-text">Migrate Postman HTTP Headers setting to ODBC Driver</p></div>
<h2>Posting data</h2>
<p>In this section, you will find how to post data in ZappySys products. You will learn how to post different formats of data, upload files and send multi-part data.</p>
<h3>How to configure POST raw body</h3>
<div id="attachment_8188" style="width: 765px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/002-how-to-post-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8188" class="wp-image-8188 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png" alt="Migrate Postman Body / Content-Type setting to ODBC Driver" width="755" height="738" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png 755w, https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration-300x293.png 300w" sizes="(max-width: 755px) 100vw, 755px" /></a><p id="caption-attachment-8188" class="wp-caption-text">Migrate Postman Body / Content-Type setting to ODBC Driver</p></div>
<h3>How to configure POST JSON body</h3>
<div id="attachment_8435" style="width: 794px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8435" class="wp-image-8435 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png" alt="Migrate Postman Body / Content-Type setting to ODBC Driver" width="784" height="688" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration.png 784w, https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/002-how-to-post-json-data-in-zappysys-odbc-ssis-powerpack-using-postman-configuration-768x674.png 768w" sizes="(max-width: 784px) 100vw, 784px" /></a><p id="caption-attachment-8435" class="wp-caption-text">Migrate Postman Body / Content-Type setting to ODBC Driver</p></div>
<p>Use this table to determine what kind of <em>Body Content Type</em> to configure:</p>
<div class="su-table su-table-alternate">
<table style="border-collapse: collapse;width: 100%;height: 87px" border="1">
<tbody>
<tr style="height: 22px">
<td style="width: 50%;height: 22px"><strong>Data type</strong></td>
<td style="width: 50%;height: 22px"><strong>Body Content Type</strong></td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 21px">Text</td>
<td style="width: 50%;height: 21px">text/plain</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">JSON</td>
<td style="width: 50%;height: 22px">application/json</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">HTML</td>
<td style="width: 50%;height: 22px">text/html</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">XML</td>
<td style="width: 50%;height: 22px">application/xml</td>
</tr>
<tr style="height: 22px">
<td style="width: 50%;height: 22px">You don&#8217;t know the type</td>
<td style="width: 50%;height: 22px">Default  (i.e. form/x-www-form-urlencoded data)</td>
</tr>
</tbody>
</table>
</div>
<h3>How to configure POST form/x-www-form-urlencoded data</h3>
<div id="attachment_8189" style="width: 674px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/003-how-to-post-form-data-using-postman-and-json-xml-csv-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8189" class="wp-image-8189 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/003-how-to-post-form-data-using-postman-and-json-xml-csv-driver-and-ssis.png" alt="Migrate Postman Body (x-www-form-urlencoded) setting to ODBC Driver" width="664" height="568" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/003-how-to-post-form-data-using-postman-and-json-xml-csv-driver-and-ssis.png 664w, https://zappysys.com/blog/wp-content/uploads/2019/10/003-how-to-post-form-data-using-postman-and-json-xml-csv-driver-and-ssis-300x257.png 300w" sizes="(max-width: 664px) 100vw, 664px" /></a><p id="caption-attachment-8189" class="wp-caption-text">Migrate Postman Body (x-www-form-urlencoded) setting to ODBC Driver</p></div>
<h3>How to configure multipart form POST data</h3>
<div id="attachment_8190" style="width: 868px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8190" class="wp-image-8190 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis.png" alt="Migrate Postman Multi-Part File Upload setting to ODBC Driver (Upload File)" width="858" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis.png 858w, https://zappysys.com/blog/wp-content/uploads/2019/10/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis-300x260.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/004-how-to-post-multipart-form-data-using-postman-and-json-xml-csv-driver-and-ssis-768x667.png 768w" sizes="(max-width: 858px) 100vw, 858px" /></a><p id="caption-attachment-8190" class="wp-caption-text">Migrate Postman Multi-Part File Upload setting to ODBC Driver (Upload File)</p></div>
<h2>Authentication</h2>
<p>This section will cover all common authentication methods, starting from using API Key to OAuth 2.0.</p>
<h3>How to authenticate using API Key in HTTP headers</h3>
<div id="attachment_8191" style="width: 707px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/005-how-to-configure-api-key-as-header-using-postman-and-json-xml-csv-odbc-driver-and-ssis/#main"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8191" class="wp-image-8191 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/005-how-to-configure-api-key-as-header-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png" alt="Authentication - Migrate Postman API Key (via header) setting to ODBC Driver" width="697" height="746" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/005-how-to-configure-api-key-as-header-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png 697w, https://zappysys.com/blog/wp-content/uploads/2019/10/005-how-to-configure-api-key-as-header-using-postman-and-json-xml-csv-odbc-driver-and-ssis-280x300.png 280w" sizes="(max-width: 697px) 100vw, 697px" /></a><p id="caption-attachment-8191" class="wp-caption-text">Authentication &#8211; Migrate Postman API Key (via header) setting to ODBC Driver</p></div>
<h3>How to authenticate using API Key as a parameter in URL</h3>
<div id="attachment_8202" style="width: 767px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/006-how-to-configure-api-key-as-url-parameter-using-postman-and-json-xml-csv-driver-and-ssis-2/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8202" class="wp-image-8202 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/006-how-to-configure-api-key-as-url-parameter-using-postman-and-json-xml-csv-driver-and-ssis-1.png" alt="Authentication - Migrate Postman API Key (via URL query parameter) setting to ODBC Driver" width="757" height="567" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/006-how-to-configure-api-key-as-url-parameter-using-postman-and-json-xml-csv-driver-and-ssis-1.png 757w, https://zappysys.com/blog/wp-content/uploads/2019/10/006-how-to-configure-api-key-as-url-parameter-using-postman-and-json-xml-csv-driver-and-ssis-1-300x225.png 300w" sizes="(max-width: 757px) 100vw, 757px" /></a><p id="caption-attachment-8202" class="wp-caption-text">Authentication &#8211; Migrate Postman API Key (via URL query parameter) setting to ODBC Driver</p></div>
<h3>How to authenticate using Bearer Token</h3>
<div id="attachment_8193" style="width: 763px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/007-how-to-authenticate-using-bearer-token-using-postman-and-json-xml-csv-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8193" class="wp-image-8193 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/007-how-to-authenticate-using-bearer-token-using-postman-and-json-xml-csv-driver-and-ssis.png" alt="Authentication - Migrate Postman Bearer Token setting to SSIS / ODBC Driver" width="753" height="636" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/007-how-to-authenticate-using-bearer-token-using-postman-and-json-xml-csv-driver-and-ssis.png 753w, https://zappysys.com/blog/wp-content/uploads/2019/10/007-how-to-authenticate-using-bearer-token-using-postman-and-json-xml-csv-driver-and-ssis-300x253.png 300w" sizes="(max-width: 753px) 100vw, 753px" /></a><p id="caption-attachment-8193" class="wp-caption-text">Authentication &#8211; Migrate Postman Bearer Token setting to SSIS / ODBC Driver</p></div>
<h3>How to authenticate using Basic Authentication</h3>
<h4>In ODBC PowerPack</h4>
<div id="attachment_8194" style="width: 674px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/008-how-to-authenticate-using-basic-authentication-using-postman-and-json-xml-csv-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8194" class="wp-image-8194 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/008-how-to-authenticate-using-basic-authentication-using-postman-and-json-xml-csv-driver-and-ssis.png" alt="Authentication - Migrate Postman Basic Auth setting to SSIS / ODBC Driver (Login using Userid / password)" width="664" height="732" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/008-how-to-authenticate-using-basic-authentication-using-postman-and-json-xml-csv-driver-and-ssis.png 664w, https://zappysys.com/blog/wp-content/uploads/2019/10/008-how-to-authenticate-using-basic-authentication-using-postman-and-json-xml-csv-driver-and-ssis-272x300.png 272w" sizes="(max-width: 664px) 100vw, 664px" /></a><p id="caption-attachment-8194" class="wp-caption-text">Authentication &#8211; Migrate Postman Basic Auth setting to SSIS / ODBC Driver (Login using Userid / password)</p></div>
<h4>In SSIS PowerPack</h4>
<p>In SSIS PowerPack use the same configuration as above, just create ZS-HTTP Connection Manager using instructions below:</p>
<div id="attachment_8195" style="width: 739px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8195" class="wp-image-8195 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source.png" alt="Authentication - Migrate Postman Basic Auth setting to SSIS JSON / XML Source (Login using Userid / password)" width="729" height="362" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source.png 729w, https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source-300x149.png 300w" sizes="(max-width: 729px) 100vw, 729px" /></a><p id="caption-attachment-8195" class="wp-caption-text">Authentication &#8211; Migrate Postman Basic Auth setting to SSIS JSON / XML Source (Login using Userid / password)</p></div>
<h3>How to authenticate using OAuth</h3>
<h4>In ODBC PowerPack</h4>
<ol style="margin-left: 0;">
<li>Configure main options:
<div id="attachment_8198" style="width: 864px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8198" class="wp-image-8198 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration.png" alt="Authentication - Migrate Postman OAuth setting to SSIS / ODBC Drivers ( JSON / XML / CSV API) - Client ID / Secret / Scope / Auth and Token Url (Client Credential Grant Type, Password Grant Type, Code Authorization Grant Type)" width="854" height="1112" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration.png 854w, https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration-230x300.png 230w, https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration-768x1000.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/10/012-how-to-authenticate-with-oauth-using-postman-and-json-source-configuration-786x1024.png 786w" sizes="(max-width: 854px) 100vw, 854px" /></a><p id="caption-attachment-8198" class="wp-caption-text">Authentication &#8211; Migrate Postman OAuth setting to SSIS / ODBC Drivers ( JSON / XML / CSV API) &#8211; Client ID / Secret / Scope / Auth and Token Url (Client Credential Grant Type, Password Grant Type, Code Authorization Grant Type)</p></div></li>
<li>Configure Callback/Return Url:
<div id="attachment_8199" style="width: 694px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8199" class="wp-image-8199 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url.png" alt="Authentication - Migrate Postman OAuth setting to SSIS / ODBC Drivers ( Callback / Redirect URL )" width="684" height="458" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url.png 684w, https://zappysys.com/blog/wp-content/uploads/2019/10/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url-300x201.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/013-how-to-authenticate-with-oauth-using-postman-and-json-source-setting-redirect-url-272x182.png 272w" sizes="(max-width: 684px) 100vw, 684px" /></a><p id="caption-attachment-8199" class="wp-caption-text">Authentication &#8211; Migrate Postman OAuth setting to SSIS / ODBC Drivers ( Callback / Redirect URL )</p></div></li>
</ol>
<p>If you are using a known, public API service, you may try locating it in the OAuth Providers list, which will save you from configuring Authorization and Access Token URLs:</p>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/013b-how-to-authenticate-with-oauth-using-postman-and-json-source-providers-list/#main" rel="attachment wp-att-8230"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-8230" src="https://zappysys.com/blog/wp-content/uploads/2019/10/013b-how-to-authenticate-with-oauth-using-postman-and-json-source-providers-list.png" alt="" width="586" height="493" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/013b-how-to-authenticate-with-oauth-using-postman-and-json-source-providers-list.png 586w, https://zappysys.com/blog/wp-content/uploads/2019/10/013b-how-to-authenticate-with-oauth-using-postman-and-json-source-providers-list-300x252.png 300w" sizes="(max-width: 586px) 100vw, 586px" /></a></p>
<p>For simplicity and if your company policy allows it or at least for testing purposes, you can use a Default OAuth Application created by ZappySys:</p>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/013c-how-to-authenticate-with-oauth-using-postman-and-json-source-default-app/#main" rel="attachment wp-att-8231"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-8231" src="https://zappysys.com/blog/wp-content/uploads/2019/10/013c-how-to-authenticate-with-oauth-using-postman-and-json-source-default-app.png" alt="" width="531" height="495" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/013c-how-to-authenticate-with-oauth-using-postman-and-json-source-default-app.png 531w, https://zappysys.com/blog/wp-content/uploads/2019/10/013c-how-to-authenticate-with-oauth-using-postman-and-json-source-default-app-300x280.png 300w" sizes="(max-width: 531px) 100vw, 531px" /></a></p>
<h4>In SSIS PowerPack</h4>
<p>In SSIS PowerPack use the same configuration as above, just create ZS-OAUTH Connection Manager using instructions below:</p>
<div id="attachment_8196" style="width: 740px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/010-how-to-authenticate-with-oauth-using-postman-and-json-source/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8196" class="wp-image-8196 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source.png" alt="Authentication - Migrate Postman OAuth setting to SSIS JSON / XML Source" width="730" height="362" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source.png 730w, https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source-300x149.png 300w" sizes="(max-width: 730px) 100vw, 730px" /></a><p id="caption-attachment-8196" class="wp-caption-text">Authentication &#8211; Migrate Postman OAuth setting to SSIS JSON / XML Source</p></div>
<h3>How to authenticate using AWS Signature</h3>
<h4>In ODBC PowerPack</h4>
<div id="attachment_8200" style="width: 702px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8200" class="wp-image-8200 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png" alt="Authentication - Migrate Postman AWS API call setting to SSIS / ODBC Drivers ( JSON / XML / CSV API call)" width="692" height="465" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png 692w, https://zappysys.com/blog/wp-content/uploads/2019/10/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/014-how-to-authenticate-with-aws-signature-using-postman-and-json-xml-csv-odbc-driver-and-ssis-272x182.png 272w" sizes="(max-width: 692px) 100vw, 692px" /></a><p id="caption-attachment-8200" class="wp-caption-text">Authentication &#8211; Migrate Postman AWS API call setting to SSIS / ODBC Drivers ( JSON / XML / CSV API call)</p></div>
<h4>In SSIS PowerPack</h4>
<p>In SSIS PowerPack use the same configuration as above, just create ZS-OAUTH Connection Manager using instructions below:</p>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/010-how-to-authenticate-with-oauth-using-postman-and-json-source/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-8196 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source.png" alt="" width="730" height="362" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source.png 730w, https://zappysys.com/blog/wp-content/uploads/2019/10/010-how-to-authenticate-with-oauth-using-postman-and-json-source-300x149.png 300w" sizes="(max-width: 730px) 100vw, 730px" /></a></p>
<h3>How to authenticate using NTLM Authentication</h3>
<h4>In ODBC PowerPack</h4>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/015-how-to-authenticate-with-ntlm-using-postman-and-json-xml-csv-odbc-driver-and-ssis/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-8201 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/015-how-to-authenticate-with-ntlm-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png" alt="" width="724" height="578" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/015-how-to-authenticate-with-ntlm-using-postman-and-json-xml-csv-odbc-driver-and-ssis.png 724w, https://zappysys.com/blog/wp-content/uploads/2019/10/015-how-to-authenticate-with-ntlm-using-postman-and-json-xml-csv-odbc-driver-and-ssis-300x240.png 300w" sizes="(max-width: 724px) 100vw, 724px" /></a></p>
<h4>In SSIS PowerPack</h4>
<p>In SSIS PowerPack use the same configuration as above, just create ZS-HTTP Connection Manager using instructions below:</p>
<p><a href="https://zappysys.com/blog/migrate-postman-settings-to-odbc-ssis-powerpack/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source/#main" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-8195 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source.png" alt="" width="729" height="362" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source.png 729w, https://zappysys.com/blog/wp-content/uploads/2019/10/009-how-to-authenticate-using-basic-authentication-using-postman-and-json-source-300x149.png 300w" sizes="(max-width: 729px) 100vw, 729px" /></a></p>
<h2>Conclusion</h2>
<p>This article was quite self-explanatory, but if you have any questions or you have an authentication method that is not listed here and you don&#8217;t know how to proceed, please, contact us and we will try to help you: <a href="https://zappysys.com/support/" target="_blank" rel="noopener">https://zappysys.com/support/</a>.</p>
<p>The post <a href="https://zappysys.com/blog/postman-to-ssis-odbc-powerpack/">How to migrate Postman API call to SSIS / ODBC PowerPack</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Import Amazon S3 files into SQL Server (CSV/JSON/XML Driver)</title>
		<link>https://zappysys.com/blog/import-amazon-s3-files-sql-server-csv-json-xml-driver/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 12 Aug 2019 16:32:00 +0000</pubDate>
				<category><![CDATA[Amazon S3 CSV Driver]]></category>
		<category><![CDATA[Amazon S3 JSON Driver]]></category>
		<category><![CDATA[Amazon S3 XML Driver]]></category>
		<category><![CDATA[ODBC Drivers]]></category>
		<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[S3 (Simple Storage Service)]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7206</guid>

					<description><![CDATA[<p>Introduction There might be a case when you have many CSV, JSON or XML files in Amazon S3 bucket and you want them to be imported straight into a SQL Server table. Here come ZappySys ODBC PowerPack and ZappySys Data Gateway (part of ODBC PowerPack) which will enable you to accomplish that. ZappySys ODBC PowerPack includes powerful [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-amazon-s3-files-sql-server-csv-json-xml-driver/">Import Amazon S3 files into SQL Server (CSV/JSON/XML Driver)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="alignnone wp-image-7581 size-thumbnail alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/06/s3-to-sql-150x150.png" alt="" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/s3-to-sql-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/06/s3-to-sql-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/s3-to-sql.png 400w" sizes="(max-width: 150px) 100vw, 150px" />There might be a case when you have many CSV, JSON or XML files in <a href="https://aws.amazon.com/s3/" target="_blank" rel="noopener">Amazon S3</a> bucket and you want them to be imported straight into a SQL Server table. Here come <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> and <a href="https://zappysys.com/products/odbc-powerpack/data-gateway/" target="_blank" rel="noopener">ZappySys Data Gateway</a> (part of ODBC PowerPack) which will enable you to accomplish that. ZappySys ODBC PowerPack includes powerful Amazon S3 CSV, Amazon S3 JSON and Amazon S3 XML drivers that let you connect to an S3 bucket and read the contents from the files in the bucket. Bringing in ZappySys Data Gateway allows doing that right from a SQL Server. Let&#8217;s begin and see how to import Amazon S3 files into SQL Server.</p>
<p>&nbsp;</p>
<p>These drivers are related to this article:</p>
<div class="content_block" id="custom_post_widget-7227"><div style="display: table-row; background: #f7f7f7;">
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc;"><img loading="lazy" decoding="async" style="vertical-align: middle; width: 50px; height: 50px; max-width: 50px;" src="//i1.wp.com/zappysys.com/images/odbc-powerpack/odbc-amazon-s3-xml-driver.png?w=100&amp;ssl=1" alt="Web API Destination" width="50" height="50" /></div>
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc; border-left: none; width: 100%;"><a href="//zappysys.com/products/odbc-powerpack/amazon-s3-odbc-driver-xml-files/" target="_blank" rel="noopener">Amazon S3 Driver (for XML Files)</a></div>
</div></div>
<div class="content_block" id="custom_post_widget-7229"><div style="display: table-row; background: #f7f7f7;">
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc;"><img loading="lazy" decoding="async" style="vertical-align: middle; width: 50px; height: 50px; max-width: 50px;" src="//i0.wp.com/zappysys.com/images/odbc-powerpack/odbc-amazon-s3-json-driver.png?w=100&amp;ssl=1" alt="Web API Destination" width="50" height="50" /></div>
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc; border-left: none; width: 100%;"><a href="//zappysys.com/products/odbc-powerpack/amazon-s3-odbc-driver-json-files/" target="_blank" rel="noopener">Amazon S3 Driver (for JSON Files)</a></div>
</div></div>
<div class="content_block" id="custom_post_widget-7233"><div style="display: table-row; background: #f7f7f7;">
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc;"><img loading="lazy" decoding="async" style="vertical-align: middle; width: 50px; height: 50px; max-width: 50px;" src="https://i2.wp.com/zappysys.com/images/odbc-powerpack/odbc-amazon-s3-csv-driver.png?w=100&amp;ssl=1" alt="Web API Destination" width="50" height="50" /></div>
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc; border-left: none; width: 100%;"><a href="//zappysys.com/products/odbc-powerpack/amazon-s3-odbc-driver-csv-files/" target="_blank" rel="noopener">Amazon S3 Driver (for CSV Files)</a></div>
</div></div>
<h2>Prerequisites</h2>
<ol>
<li>Have an <a href="https://aws.amazon.com/" target="_blank" rel="noopener">AWS</a> account.</li>
<li>Existing <a href="https://aws.amazon.com/s3/" target="_blank" rel="noopener">Amazon S3</a> bucket.</li>
<li>SQL Server instance installed (can be a <a href="https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-2016-express-localdb" target="_blank" rel="noopener">SQL Server Express LocalDB</a> instance).</li>
<li><a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms" target="_blank" rel="noopener">SQL Server Management Studio</a> (SSMS) installed.</li>
<li><a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed (must be installed on a Windows machine; can be a different machine than SQL Server is installed on).</li>
</ol>
<h2>Getting started</h2>
<p style="text-align: justify;">We will start from a simple example of how to load contacts from a JSON that are located in Amazon S3 bucket, then we will proceed by loading contacts from many XML files that are compressed in ZIP, and finally, we will traverse many folders and subfolders to gather CSVs and load contacts from them.</p>
<h2>Step-by-Step &#8211; Import JSON file located at Amazon S3 into SQL Server</h2>
<h3><span style="font-size: 14pt;">Open and configure ZappySys Data Gateway</span></h3>
<div class="content_block" id="custom_post_widget-7369">Now let's look at steps to configure Data Gateway after installation:
<ol>
 	<li>Assuming you have installed <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> using default options (Which also enables Data Gateway Service)</li>
 	<li>Search "Gateway" in your start menu and click ZappySys Data Gateway
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png" alt="Open ZappySys Data Gateway" /></a>
<p class="wp-caption-text">Open ZappySys Data Gateway</p>

</div></li>
 	<li>First make sure Gateway Service is running (Verify Start icon is disabled)</li>
 	<li>Also verify Port on General Tab
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/ZappySys-data-gateway-port-5000.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/03/ZappySys-data-gateway-port-5000.png" alt="Port Number setting on ZappySys Data Gateway" /></a>
<p class="wp-caption-text">Port Number setting on ZappySys Data Gateway</p>

</div></li>
 	<li>Now go to Users tab. <strong>Click Add</strong> icon to add a new user. Check Is admin to give access to all data sources you add in future. If you don't check admin then you have to manually configure user permission for each data source.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-user.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-user.png" alt="Add Data Gateway User" /></a>
<p class="wp-caption-text">Add Data Gateway User</p>

</div></li>
</ol>
&nbsp;</div>
<h3><a id="create-json-data-source"></a>Create an Amazon S3 JSON data source in ZappySys Data Gateway</h3>
<ol>
<li>The first thing you will have to do is to create a data source in ZappySys Data Gateway. Just click <strong>Add</strong> button, give the data source a name, e.g. &#8220;<strong>MyContactsJSON</strong>&#8220;, and then select <strong>Native &#8211; ZappySys Amazon S3 JSON Driver</strong>:
<div id="attachment_7373" style="width: 637px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7373" class="wp-image-7373 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/100-create-new-data-source-in-data-gateway-to-load-json-files-into-sql-server.png" alt="Adding a JSON data source in ZappySys Data Gateway to load it from Amazon S3 bucket into SQL Server" width="627" height="552" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/100-create-new-data-source-in-data-gateway-to-load-json-files-into-sql-server.png 627w, https://zappysys.com/blog/wp-content/uploads/2019/06/100-create-new-data-source-in-data-gateway-to-load-json-files-into-sql-server-300x264.png 300w" sizes="(max-width: 627px) 100vw, 627px" /><p id="caption-attachment-7373" class="wp-caption-text">Adding a JSON data source in ZappySys Data Gateway to load it from Amazon S3 bucket into SQL Server</p></div></li>
<li>Then click <strong>Edit</strong> and add the Data Gateway user you created in <strong>Users</strong> tab. We will use this user later when adding a Linked Server to the Data Gateway to authenticate:
<div id="attachment_7557" style="width: 688px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7557" class="wp-image-7557 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/125-add-data-gateway-user-to-json-data-source-to-get-json-data-into-sql-server.png" alt="Adding a user to the newly created JSON data source" width="678" height="627" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/125-add-data-gateway-user-to-json-data-source-to-get-json-data-into-sql-server.png 678w, https://zappysys.com/blog/wp-content/uploads/2019/06/125-add-data-gateway-user-to-json-data-source-to-get-json-data-into-sql-server-300x277.png 300w" sizes="(max-width: 678px) 100vw, 678px" /><p id="caption-attachment-7557" class="wp-caption-text">Adding a user to the newly created Amazon S3 JSON data source</p></div></li>
<li>Once you do that, then click <strong>Edit</strong> to configure the data source:
<div id="attachment_7374" style="width: 637px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7374" class="wp-image-7374 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/200-modify-data-source-in-data-gateway-to-load-json-files-into-sql-server.png" alt="Preparing to configure the JSON data source to load a JSON from Amazon S3 bucket to SQL Server" width="627" height="445" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/200-modify-data-source-in-data-gateway-to-load-json-files-into-sql-server.png 627w, https://zappysys.com/blog/wp-content/uploads/2019/06/200-modify-data-source-in-data-gateway-to-load-json-files-into-sql-server-300x213.png 300w" sizes="(max-width: 627px) 100vw, 627px" /><p id="caption-attachment-7374" class="wp-caption-text">Preparing to configure the Amazon S3 JSON data source to load a JSON from Amazon S3 bucket to SQL Server</p></div></li>
<li>When a window opens, click <strong>Click here to Configure the Connection</strong> and enter your <em>Access Key</em> and <em>Secret Key</em>:
<div id="attachment_7376" style="width: 655px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7376" class="wp-image-7376 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/300-create-connection-to-amazon-s3-to-load-json-into-sql-server-1.png" alt="Configuring the authentication to Amazon S3 bucket in ZappySys Data Gateway" width="645" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/300-create-connection-to-amazon-s3-to-load-json-into-sql-server-1.png 645w, https://zappysys.com/blog/wp-content/uploads/2019/06/300-create-connection-to-amazon-s3-to-load-json-into-sql-server-1-276x300.png 276w" sizes="(max-width: 645px) 100vw, 645px" /><p id="caption-attachment-7376" class="wp-caption-text">Configuring the authentication to Amazon S3 bucket in ZappySys Data Gateway</p></div></li>
<li>After that, select a JSON file you want to load, and then click <strong>Select Filter</strong> button to choose data you want to be displayed in SQL Server:
<div id="attachment_7377" style="width: 668px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7377" class="wp-image-7377 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/400-configure-amazon-s3-json-data-source-to-load-data-into-sql-server.png" alt="Configuring the JSON data source to load a JSON from Amazon S3 bucket into SQL Server" width="658" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/400-configure-amazon-s3-json-data-source-to-load-data-into-sql-server.png 658w, https://zappysys.com/blog/wp-content/uploads/2019/06/400-configure-amazon-s3-json-data-source-to-load-data-into-sql-server-281x300.png 281w" sizes="(max-width: 658px) 100vw, 658px" /><p id="caption-attachment-7377" class="wp-caption-text">Configuring the JSON data source to load a JSON from Amazon S3 bucket into SQL Server</p></div></li>
<li>Go to the <strong>Preview</strong> tab and click the <strong>Preview Data</strong> button to make sure everything is configured correctly and preview the results:
<div id="attachment_7378" style="width: 668px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7378" class="wp-image-7378 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/500-preview-the-results-of-amazon-s3-json-data-source-to-load-data-into-sql-server.png" alt="Previewing JSON data in the data source based on Amazon S3 JSON Driver" width="658" height="653" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/500-preview-the-results-of-amazon-s3-json-data-source-to-load-data-into-sql-server.png 658w, https://zappysys.com/blog/wp-content/uploads/2019/06/500-preview-the-results-of-amazon-s3-json-data-source-to-load-data-into-sql-server-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/06/500-preview-the-results-of-amazon-s3-json-data-source-to-load-data-into-sql-server-300x298.png 300w" sizes="(max-width: 658px) 100vw, 658px" /><p id="caption-attachment-7378" class="wp-caption-text">Previewing JSON data in the data source based on Amazon S3 JSON Driver</p></div></li>
</ol>
<p style="text-align: justify;">Now you are ready to create a Linked Server and connect to the data source you just created. If you used &#8220;<strong>MyContactsJSON</strong>&#8221; as the data source name, make sure to use the same name when creating a Linked Server.</p>
<h3><a id="set-up-a-sql-server-linked-server"></a>Set up a SQL Server Linked Server</h3>
<div class="content_block" id="custom_post_widget-5432">Once you configured the data source in Gateway, we can now set up a Linked Server in a SQL Server.
<ol style="margin-left: 10px;">
 	<li>Open SSMS and connect to a SQL Server.</li>
 	<li>Go to Root &gt; Server Objects &gt; Linked Servers node. Right click and click <strong>New Linked Server...
</strong>
<div class="wp-caption alignnone">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/create-new-linked-server-ssms.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/03/create-new-linked-server-ssms.png" alt="Add Linked Server in SQL Server" />
</a>
<p class="wp-caption-text">Adding Linked Server in SQL Server</p>

</div></li>
 	<li>Now enter the linked server name, select Provider as SQL Native Client.</li>
 	<li>Enter data source as <strong><span class="lang:default decode:true crayon-inline">GatewayServerName,PORT_NUMBER</span></strong> where server name is where ZappySys Gateway is running (can be the same as SQL Server machine or a remote machine). Default PORT_NUMBER is 5000 but confirm that on the Gateway &gt; General tab in case it's different.</li>
 	<li>Enter Catalog Name. This must match name from Data gateway Data sources grid &gt; Name column
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/ssms-sql-server-configure-linked-server-2.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/ssms-sql-server-configure-linked-server-2.png" alt="Configure Linked Server Provider, Catalog, Server, Port for ZappySys Data Gateway Connection" />
</a>
<p class="wp-caption-text">Configure Linked Server Provider, Catalog, Server, Port for ZappySys Data Gateway Connection</p>
</div>
<div style="color: #31708f;background-color: #d9edf7;border-color: #bce8f1;padding: 15px;margin-bottom: 20px;border: 1px solid transparent;border-radius: 4px;">
<strong>INFO:</strong><br/>
<ul>
    <li>
      For <strong>SQL Server 2012, 2014, 2016, 2017, and 2019</strong>, use the <em>SQL Server Native Client 11.0</em> as the Provider.
    </li>
    <li>
      For <strong>SQL Server 2022 or higher</strong>, use the <em>Microsoft OLE DB Driver for SQL Server</em> as the Provider.
    </li>
  </ul>
</div></li>
 	<li>Click on Security Tab and select the last option "<strong>Be made using this security context</strong>". Enter your gateway user account here.
<div class="wp-caption alignnone">
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-5456" src="https://zappysys.com/blog/wp-content/uploads/2018/11/add-linked-server-sql-server-3-security-2.png" alt="" width="690" height="625" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/add-linked-server-sql-server-3-security-2.png 690w, https://zappysys.com/blog/wp-content/uploads/2018/11/add-linked-server-sql-server-3-security-2-300x272.png 300w" sizes="(max-width: 690px) 100vw, 690px" />
<p class="wp-caption-text">Configuring Linked Server credentials</p>
</li>
<li>
        <p>Optional: Under the Server Options Tab, Enable <b>RPC</b> and <b>RPC Out</b> and Disable Promotion of Distributed Transactions<b>(MSDTC)</b>.</p>
		<div class="wp-caption alignnone">
			<img decoding="async" class="block margin-bottom-10 img-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2018/11/linked-server-options-rpc-msdtc.png" title="RPC and MSDTC Settings" alt="RPC and MSDTC Settings" />
			<p class="wp-caption-text">RPC and MSDTC Settings</p>
		</div>
        <hr />
        <p>
            You need to enable RPC Out if you plan to use <b><i>EXEC(...) AT [MY_LINKED_SERVER_NAME]</i></b> rather than OPENQUERY.
            <br />
            If don't enabled it, you will encounter the <i>'Server "MY_LINKED_SERVER_NAME" is not configured for RPC'</i> error.
        </p>
        <p>
            Query Example:
            <code class="sql">EXEC('Select * from Products') AT [MY_LINKED_SERVER_NAME]</code>
        </p>
        <hr />
        <p>
            If you plan to use <b><i>'INSERT INTO...EXEC(....) AT [MY_LINKED_SERVER_NAME]'</i></b> in that case you need to Disable Promotion of Distributed Transactions(MSDTC).
            <br />
            If don't disabled it, you will encounter the <i>'The operation could not be performed because OLE DB provider "SQLNCLI11/MSOLEDBSQL" for linked server "MY_LINKED_SERVER_NAME" was unable to begin a distributed transaction.'</i> error.
        </p>
        <p>
            Query Example:
<pre class="">Insert Into dbo.Products 
EXEC('Select * from Products') AT [MY_LINKED_SERVER_NAME]</pre>
        </p>
        <hr />
</li>
 	<li>Click OK to save the Linked Server.</li>
</ol></div>
<h3>Execute the SQL query</h3>
<p style="text-align: justify;">Once you created the Linked Server to ZappySys Data Gateway, you are ready to execute the SQL query and load data into SQL Server. Supposedly, you created the Linked Server with the name &#8220;GATEWAY&#8221;, then open SSMS and execute this query:</p>
<p><code>SELECT * INTO MyContacts FROM openquery([GATEWAY], 'SELECT * FROM $')<br />
SELECT * FROM MyContacts</code></p>
<h3>The results</h3>
<p>You should see similar results after you execute the query:</p>
<div id="attachment_7536" style="width: 609px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7536" class="wp-image-7536 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/600-the-results-of-importing-amazon-s3-data-into-sql-server-using-json-driver.png" alt="" width="599" height="257" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/600-the-results-of-importing-amazon-s3-data-into-sql-server-using-json-driver.png 599w, https://zappysys.com/blog/wp-content/uploads/2019/06/600-the-results-of-importing-amazon-s3-data-into-sql-server-using-json-driver-300x129.png 300w" sizes="(max-width: 599px) 100vw, 599px" /><p id="caption-attachment-7536" class="wp-caption-text">The results of getting JSON data straight from Amazon S3 bucket using ZappySys Amazon S3 JSON driver</p></div>
<p>Now we are ready to proceed to the next section and import many XML files at once.</p>
<h2>Step-by-Step &#8211; Import many XML files located at Amazon S3 into SQL Server</h2>
<h3>Overview</h3>
<p>Supposedly, you have many XMLs where each one is zipped and you want to load them all into a SQL Server table:</p>
<div id="attachment_7548" style="width: 668px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7548" class="wp-image-7548 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/650-load-many-compressed-xml-files-from-amazon-s3-bucket-into-sql-server-1.png" alt="Zipped XML files located in Amazon S3 bucket to be loaded into SQL Server" width="658" height="311" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/650-load-many-compressed-xml-files-from-amazon-s3-bucket-into-sql-server-1.png 658w, https://zappysys.com/blog/wp-content/uploads/2019/06/650-load-many-compressed-xml-files-from-amazon-s3-bucket-into-sql-server-1-300x142.png 300w" sizes="(max-width: 658px) 100vw, 658px" /><p id="caption-attachment-7548" class="wp-caption-text">Zipped XML files located in Amazon S3 bucket to be loaded into SQL Server</p></div>
<p>The first thing you will have to do is to create a data source, based on ZappySys Amazon S3 XML Driver. Let&#8217;s proceed and just do that.</p>
<h3>Create an Amazon S3 XML data source in ZappySys Data Gateway</h3>
<p>Follow the same steps as in <a href="#create-json-data-source">Create an Amazon S3 JSON data source in ZappySys Data Gateway</a> section when adding a new data source, except for these two steps:</p>
<ol>
<li>When adding a data source select <strong>Native &#8211; ZappySys Amazon S3 XML Driver</strong> as <em>Connector Type</em>:
<div id="attachment_7573" style="width: 430px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7573" class="wp-image-7573 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/685-create-new-xml-data-source-in-data-gateway-to-load-xml-files-into-sql-selver.png" alt="Choosing &quot;ZappySys Amazon S3 XML Driver&quot; to load XMLs to SQL Server" width="420" height="296" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/685-create-new-xml-data-source-in-data-gateway-to-load-xml-files-into-sql-selver.png 420w, https://zappysys.com/blog/wp-content/uploads/2019/06/685-create-new-xml-data-source-in-data-gateway-to-load-xml-files-into-sql-selver-300x211.png 300w" sizes="(max-width: 420px) 100vw, 420px" /><p id="caption-attachment-7573" class="wp-caption-text">Choosing &#8220;ZappySys Amazon S3 XML Driver&#8221; to load XMLs to SQL Server</p></div></li>
<li>Then click <strong>Edit</strong> and edit the data source similarly like in this window:
<div id="attachment_7547" style="width: 668px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7547" class="wp-image-7547 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/700-configure-amazon-s3-xml-data-source-to-load-into-sql-server-1.png" alt="Configuring data source based on ZappySys XML Driver to load XMLs into SQL Server" width="658" height="516" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/700-configure-amazon-s3-xml-data-source-to-load-into-sql-server-1.png 658w, https://zappysys.com/blog/wp-content/uploads/2019/06/700-configure-amazon-s3-xml-data-source-to-load-into-sql-server-1-300x235.png 300w" sizes="(max-width: 658px) 100vw, 658px" /><p id="caption-attachment-7547" class="wp-caption-text">Configuring data source based on ZappySys Amazon S3 XML Driver to load XMLs into SQL Server</p></div></li>
</ol>
<p>Now we are ready to set up a Linked Server to this newly created data source.</p>
<h3>Set up a SQL Server Linked Server</h3>
<p style="text-align: justify;">Follow the very same steps from the section above where we <a href="#set-up-a-sql-server-linked-server">added the Linked Server to a JSON data source</a>, except that change <em>Datasource</em> property of the Linked Server to match the name of the Amazon S3 XML data source you created. Once you do that, you are ready to load XMLs into your SQL Server.</p>
<h3>Execute the SQL query</h3>
<p>Again, if you created the Linked Server with name &#8220;GATEWAY&#8221;, execute this SQL query in SSMS:</p>
<p><code>SELECT * INTO MyContacts FROM openquery([GATEWAY], 'SELECT * FROM $')<br />
SELECT * FROM MyContacts</code></p>
<h3>The results</h3>
<p>You should see a similar view once you execute the query:</p>
<div id="attachment_7550" style="width: 614px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7550" class="wp-image-7550 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/750-the-result-of-importing-xml-data-from-amazon-s3-into-sql-server.png" alt="The data of many XMLs loaded from Amazon S3 bucket into SQL Server" width="604" height="360" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/750-the-result-of-importing-xml-data-from-amazon-s3-into-sql-server.png 604w, https://zappysys.com/blog/wp-content/uploads/2019/06/750-the-result-of-importing-xml-data-from-amazon-s3-into-sql-server-300x179.png 300w" sizes="(max-width: 604px) 100vw, 604px" /><p id="caption-attachment-7550" class="wp-caption-text">The data of many XMLs loaded from Amazon S3 bucket into SQL Server</p></div>
<p>Now we are ready to move to the next section and recursively scan CSVs and load them into SQL Server.</p>
<h2>Step-by-Step &#8211; Import CSV file located at Amazon S3 into SQL Server</h2>
<h3>Overview</h3>
<p>Let&#8217;s say you have many CSVs that are located in a folder tree, including subfolders and you want them all in your SQL Server:</p>
<div id="attachment_7552" style="width: 666px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7552" class="wp-image-7552 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/800-load-many-csv-files-from-subfolders-from-amazon-s3-bucket-into-sql-server.png" alt="Many CSV files located in Amazon S3 bucket folders and subfolders to be loaded into SQL Server" width="656" height="299" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/800-load-many-csv-files-from-subfolders-from-amazon-s3-bucket-into-sql-server.png 656w, https://zappysys.com/blog/wp-content/uploads/2019/06/800-load-many-csv-files-from-subfolders-from-amazon-s3-bucket-into-sql-server-300x137.png 300w" sizes="(max-width: 656px) 100vw, 656px" /><p id="caption-attachment-7552" class="wp-caption-text">Many CSV files located in Amazon S3 bucket folders and subfolders to be loaded into SQL Server</p></div>
<p>We will follow the same steps to accomplish that as we did for loading JSON and XMLs.</p>
<h3>Create an Amazon S3 CSV data source in ZappySys Data Gateway</h3>
<p>Follow the steps as in <a href="#create-json-data-source">Create an Amazon S3 JSON data source in ZappySys Data Gateway</a> section when adding a new data source, except for these two steps:</p>
<ol>
<li>When adding a CSV data source select <strong>Native &#8211; ZappySys Amazon S3 CSV Driver</strong> as <em>Connector Type</em>:
<div id="attachment_7574" style="width: 430px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7574" class="wp-image-7574 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/875-create-new-csv-data-source-in-data-gateway-to-load-csv-files-into-sql-selver.png" alt="Choosing &quot;ZappySys Amazon S3 CSV Driver&quot; to load CSVs to SQL Server" width="420" height="296" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/875-create-new-csv-data-source-in-data-gateway-to-load-csv-files-into-sql-selver.png 420w, https://zappysys.com/blog/wp-content/uploads/2019/06/875-create-new-csv-data-source-in-data-gateway-to-load-csv-files-into-sql-selver-300x211.png 300w" sizes="(max-width: 420px) 100vw, 420px" /><p id="caption-attachment-7574" class="wp-caption-text">Choosing &#8220;ZappySys Amazon S3 CSV Driver&#8221; to load CSVs to SQL Server</p></div></li>
<li>Then click <strong>Edit</strong> and edit the data source similarly:
<div id="attachment_7554" style="width: 752px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7554" class="wp-image-7554 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/900-configure-amazon-s3-csv-data-source-to-scan-csvs-recursively-and-load-into-sql-server.png" alt="Configuring data source based on ZappySys CSV Driver to load CSVs into SQL Server" width="742" height="582" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/900-configure-amazon-s3-csv-data-source-to-scan-csvs-recursively-and-load-into-sql-server.png 742w, https://zappysys.com/blog/wp-content/uploads/2019/06/900-configure-amazon-s3-csv-data-source-to-scan-csvs-recursively-and-load-into-sql-server-300x235.png 300w" sizes="(max-width: 742px) 100vw, 742px" /><p id="caption-attachment-7554" class="wp-caption-text">Configuring data source based on ZappySys Amazon S3 CSV Driver to load CSVs into SQL Server</p></div></li>
</ol>
<p>Now we are ready to proceed and add a Linked Server to this data source.</p>
<h3>Set up a SQL Server Linked Server</h3>
<p style="text-align: justify;">Again, follow the very same steps from the section above where we <a href="#set-up-a-sql-server-linked-server">added the Linked Server to a JSON data source</a>, except that change <em>Datasource</em> property of the Linked Server to match the name of the Amazon S3 CSV data source we created. Once you do that, you are ready to load CSVs into your SQL Server.</p>
<h3>Execute the SQL query</h3>
<p>Once again, if you created the Linked Server with name &#8220;GATEWAY&#8221;, execute this SQL query in SSMS:</p>
<p><code>SELECT * INTO MyContacts FROM openquery([GATEWAY], 'SELECT * FROM $')<br />
SELECT * FROM MyContacts</code></p>
<h3>The results</h3>
<p>You should see a similar view, once you execute the query:</p>
<div id="attachment_7559" style="width: 768px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7559" class="wp-image-7559 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/950-the-result-of-importing-multiple-csv-files-from-amazon-s3-into-sql-server-1.png" alt="The results of loading many CSVs from Amazon S3 bucket into SQL Server" width="758" height="365" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/950-the-result-of-importing-multiple-csv-files-from-amazon-s3-into-sql-server-1.png 758w, https://zappysys.com/blog/wp-content/uploads/2019/06/950-the-result-of-importing-multiple-csv-files-from-amazon-s3-into-sql-server-1-300x144.png 300w" sizes="(max-width: 758px) 100vw, 758px" /><p id="caption-attachment-7559" class="wp-caption-text">The results of loading many CSVs from Amazon S3 bucket into SQL Server</p></div>
<h2>Conclusion</h2>
<p style="text-align: justify;">We had a goal to import Amazon S3 files into SQL Server from SQL Server itself. We learned how to load JSON, XML and CSV files into SQL Server, which some of them were zipped and were located at different folders and subfolders. It was possible to accomplish that using <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ODBC PowerPack</a>, <a href="https://zappysys.com/products/odbc-powerpack/data-gateway/" target="_blank" rel="noopener">ZappySys Data Gateway</a> and ODBC PowerPack drivers &#8211; Amazon S3 JSON Driver, Amazon S3 XML Driver, and Amazon S3 CSV Driver. At first, we created data sources in the Data Gateway, then we created Linked Servers in SQL Server and connected to ZappySys Data Gateway, which finally made it possible to load data from Amazon S3 bucket straight from SQL queries in SSMS.</p>
<h2>Check Amazon S3 Integration with Other BI Tools (Power BI, Excel, SSRS, MS Access, etc.)</h2>
<div class="content_block" id="custom_post_widget-7051">ZappySys ODBC Drivers built using ODBC standard which is widely adopted by industry for a long time. Which mean the majority of BI Tools / Database Engines / ETL Tools already there will support native / 3rd party ODBC Drivers. Below is the small list of most popular tools / programming languages our Drivers support. If your tool / programming language doesn't appear in the below list, which means we have not documented use case but as long as your tool supports ODBC Standard, our drivers should work fine.

&nbsp;

<img loading="lazy" decoding="async" class="" src="//zappysys.com/images/odbc-powerpack/odbc-powerpack-integration.jpg" alt="ZappySys ODBC Drivers for REST API, JSON, XML - Integrate with Power BI, Tableau, QlikView, QlikSense, Informatica PowerCenter, Excel, SQL Server, SSIS, SSAS, SSRS, Visual Studio / WinForm / WCF, Python, C#, VB.net, PHP. PowerShell " width="750" height="372" />
<table style="valign: top;">
<tbody>
<tr>
<td>
<p style="text-align: center;"><strong>BI / Reporting Tools
Integration</strong></p>
</td>
<td style="text-align: center;"><strong>ETL Tools
Integration
</strong></td>
<td style="text-align: center;"><strong>Programming Languages</strong>
<strong>Integration</strong></td>
</tr>
<tr>
<td>
<ul>
 	<li><a href="https://zappysys.com/blog/howto-import-json-rest-api-power-bi/" target="_blank" rel="noopener">Microsoft Power BI</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-tableau-read-json-soap-xml-csv/">Tableau</a></li>
 	<li><a href="https://zappysys.com/blog/read-rest-api-using-ssrs-reports-call-json-xml-web-service/" target="_blank" rel="noopener">SSRS (SQL Reporting Services)</a></li>
 	<li><a href="https://zappysys.com/blog/qlik-rest-connector-examples-read-json-xml-api/" target="_blank" rel="noopener">QlikView /Qlik Sense</a></li>
 	<li><a href="https://zappysys.com/blog/call-rest-api-in-microstrategy-json-soap-xml/" target="_blank" rel="noopener">MicroStrategy</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-google-sheet-call-appscript-load-json-soap-xml-csv/" target="_blank" rel="noopener">Google Sheet</a></li>
 	<li><a href="https://zappysys.com/blog/import-json-excel-load-file-rest-api/" target="_blank" rel="noopener">Microsoft Excel</a></li>
 	<li><a href="https://zappysys.com/api/integration-hub/rest-api-connector/access?context=connector" target="_blank" rel="noopener">Microsoft Access</a></li>
 	<li>Oracle OBIEE</li>
 	<li>Many more (not in this list).....</li>
</ul>
</td>
<td>
<ul>
 	<li><a href="https://zappysys.com/blog/read-json-informatica-import-rest-api-json-file/" target="_blank" rel="noopener">Informatica PowerCenter</a> (Windows)</li>
 	<li>Informatica Cloud</li>
 	<li>SSIS (SQL Integration Services)</li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">SQL Server</a></li>
 	<li><a href="https://zappysys.com/blog/read-write-rest-api-data-in-talend-json-xml-soap/" target="_blank" rel="noopener">Talend Data Studio</a></li>
 	<li><a href="https://zappysys.com/blog/pentaho-read-rest-api-in-pentaho/" target="_blank" rel="noopener">Pentaho Kettle</a></li>
 	<li>Oracle OBIEE</li>
 	<li>Many more (not in this list).....</li>
</ul>
</td>
<td>
<ul>
 	<li>Visual Studio</li>
 	<li><a href="https://zappysys.com/blog/calling-rest-api-in-c/" target="_blank" rel="noopener">C#</a></li>
 	<li>C++</li>
 	<li><a href="https://zappysys.com/blog/connect-java-to-rest-api-json-soap-xml/" target="_blank" rel="noopener">JAVA</a></li>
 	<li><a href="https://zappysys.com/blog/set-rest-python-client/" target="_blank" rel="noopener">Python</a></li>
 	<li>PHP</li>
 	<li><a href="https://zappysys.com/blog/call-rest-api-powershell-script-export-json-csv/" target="_blank" rel="noopener">PowerShell</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">T-SQL (Using Linked Server)</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
&nbsp;</div>
<p>The post <a href="https://zappysys.com/blog/import-amazon-s3-files-sql-server-csv-json-xml-driver/">Import Amazon S3 files into SQL Server (CSV/JSON/XML Driver)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to refresh Power BI dataset with REST API using SSIS</title>
		<link>https://zappysys.com/blog/refresh-power-bi-dataset-rest-api-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 22 May 2019 16:06:40 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS Connection Manager]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[SSIS Tasks]]></category>
		<category><![CDATA[dataset]]></category>
		<category><![CDATA[power bi]]></category>
		<category><![CDATA[refresh]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6963</guid>

					<description><![CDATA[<p>Introduction In this article, you will learn how to refresh a Power BI dataset with Power BI REST API using SSIS and ZappySys SSIS PowerPack. Power BI is a Microsoft reporting product that can get data from virtually any source and display it nicely in a report or a dashboard. Each Power BI report contains a dataset, which can be refreshed [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/refresh-power-bi-dataset-rest-api-using-ssis/">How to refresh Power BI dataset with REST API using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="alignleft wp-image-3951" src="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310-150x150.png" alt="Power BI Integration" width="100" height="100" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310.png 310w" sizes="(max-width: 100px) 100vw, 100px" />In this article, you will learn how to refresh a <a href="https://powerbi.microsoft.com/en-us/" target="_blank" rel="noopener">Power BI</a> dataset with <a href="https://docs.microsoft.com/en-us/rest/api/power-bi/" target="_blank" rel="noopener">Power BI REST API</a> using SSIS and <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a>. Power BI is a Microsoft reporting product that can get data from virtually any source and display it nicely in a report or a dashboard. Each Power BI report contains a dataset, which can be refreshed to show relevant data in the report. Power BI also has a <em>Scheduled refresh</em> capability, in case you want to refresh a dataset periodically. However, you are limited to only 8 specific times per day you can refresh a dataset (as of May 23, 2019). In the Power BI Premium license you can do it 48 times per day. But what if you need to refresh it more frequently? Or if you desire to refresh it at a non-predefined time; which is not known in advance? E.g. after an ETL process has finished? Here Power BI REST API comes into rescue and lets you refresh a dataset on demand.</p>
<p>Here are a few use cases when you may want to refresh a dataset from a SSIS package, using Power BI REST API:</p>
<ul>
<li>The need to refresh a dataset more often than Power BI allows.</li>
<li>The requirement to refresh a dataset just after some process is finished; e.g. after an ETL process.</li>
<li>The ability to have absolute control <em>when</em> to refresh <em>multiple</em> datasets. Sometimes, refreshing multiple huge datasets at once could cause memory problems in the Power BI service. So, having an orchestrated refresh would solve this problem.</li>
</ul>
<p>We will use these ZappySys SSIS PowerPack connectors/connections in this article:</p>
<div class="content_block" id="custom_post_widget-6991"><div style="display: table-row; background: #f7f7f7;">
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc;"><img loading="lazy" decoding="async" style="vertical-align: middle; width: 50px; height: 50px; max-width: 50px;" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/oauth-connection/ssis-oauth-connection-manager.png" alt="Web API Destination" width="50" height="50" /></div>
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc; border-left: none; width: 100%;"><a href="//zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth Connection Manager</a></div>
</div></div>
<div class="content_block" id="custom_post_widget-6984"><div style="display: table-row; background: #f7f7f7;">
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc;"><img loading="lazy" decoding="async" style="vertical-align: middle; width: 50px; height: 50px; max-width: 50px;" src="//zappysys.com/images/SSIS-PowerPack/ssis-rest-api-web-service-task.png" alt="Web API Destination" width="50" height="50" /></div>
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc; border-left: none; width: 100%;"><a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a></div>
</div></div>
<p>Let&#8217;s begin!</p>
<h2>Prerequisites</h2>
<ol>
<li>You have a Power BI account and you have basic Power BI skills.</li>
<li>An uploaded Power BI report to Power BI service.</li>
<li>A <a href="https://azure.microsoft.com/" data-linktype="external">Microsoft Azure</a> subscription (there is a <a href="https://azure.microsoft.com/en-us/free/" target="_blank" rel="noopener">free</a> option with a 200 USD credit).</li>
<li><a href="https://azure.microsoft.com/en-us/services/active-directory/" target="_blank" rel="noopener">Azure Active Directory</a> set up.</li>
<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="SQL Server Data Tools">SSDT</abbr> or <abbr title="Business Intelligence Development Studio">BIDS</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
<li><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
</ol>
<h2>Getting started</h2>
<p>Suppose you have a simple report and you want to refresh its dataset using Power BI REST API and SSIS. So far, the dataset has not been refreshed at all:</p>
<div id="attachment_7033" style="width: 573px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7033" class="wp-image-7033 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/refresh-power-bi-dataset-using-rest-api-and-ssis-e1558968134828.png" alt="Preparing to refresh Power BI dataset using SSIS and Power BI REST API." width="563" height="235" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/refresh-power-bi-dataset-using-rest-api-and-ssis-e1558968134828.png 563w, https://zappysys.com/blog/wp-content/uploads/2019/05/refresh-power-bi-dataset-using-rest-api-and-ssis-e1558968134828-300x125.png 300w" sizes="(max-width: 563px) 100vw, 563px" /><p id="caption-attachment-7033" class="wp-caption-text">Preparing to refresh the Power BI dataset using SSIS and Power BI REST API.</p></div>
<p>To start, create an SSIS package and follow the steps below to accomplish the goal.</p>
<h2>Step By Step &#8211; How to refresh a Power BI dataset with REST API using SSIS</h2>
<h3>Create an OAuth application</h3>
<div class="content_block" id="custom_post_widget-7035"><h4>Create an Azure Active Directory OAuth application</h4>
<ol>
 	<li>Firstly, go to <a href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview" target="_blank" rel="noopener">Azure Active Directory, click App Registrations</a>, and then register a new application:
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-10621" src="https://zappysys.com/blog/wp-content/uploads/2019/05/20-register-azure-active-directory-application-to-use-in-ssis-or-odbc-wider.png" alt="" width="646" height="802" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/20-register-azure-active-directory-application-to-use-in-ssis-or-odbc-wider.png 646w, https://zappysys.com/blog/wp-content/uploads/2019/05/20-register-azure-active-directory-application-to-use-in-ssis-or-odbc-wider-242x300.png 242w" sizes="(max-width: 646px) 100vw, 646px" />Select option <em>Web</em> and enter this URL into the <em>Redirect URI</em> field:
<code>https://login.microsoftonline.com/common/oauth2/nativeclient</code></li>
 	<li>Once created, copy/paste the <em>Application (client) ID</em> into a notepad, we will need it later:
<img loading="lazy" decoding="async" class="alignnone wp-image-7041 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/21-save-client-id-of-azure-active-directory-application-to-use-from-ssis-or-odbc-e1696948772287.png" alt="" width="691" height="164" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/21-save-client-id-of-azure-active-directory-application-to-use-from-ssis-or-odbc-e1696948772287.png 691w, https://zappysys.com/blog/wp-content/uploads/2019/05/21-save-client-id-of-azure-active-directory-application-to-use-from-ssis-or-odbc-e1696948772287-300x71.png 300w" sizes="(max-width: 691px) 100vw, 691px" /></li>
 	<li>Next, go to <em>Certificates &amp; secrets</em> and create a new client secret. Copy a new client secret, we will need it later:
<img loading="lazy" decoding="async" class="alignnone wp-image-7038 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/40-create-a-new-client-secret-in-azure-active-directory-oauth-application-to-use-from-ssis-or-odbc-e1696949525459.png" alt="" width="499" height="460" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/40-create-a-new-client-secret-in-azure-active-directory-oauth-application-to-use-from-ssis-or-odbc-e1696949525459.png 499w, https://zappysys.com/blog/wp-content/uploads/2019/05/40-create-a-new-client-secret-in-azure-active-directory-oauth-application-to-use-from-ssis-or-odbc-e1696949525459-300x277.png 300w" sizes="(max-width: 499px) 100vw, 499px" /></li>
 	<li>Then go to <i>Overview </i>and hit <em>Endpoints. </em>Proceed by copying the <em>Authorization</em> and <em>Token</em> URLs and paste them into a notepad; we will use them later:
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-10616" src="https://zappysys.com/blog/wp-content/uploads/2019/05/90-copy-azure-active-directory-oauth-application-authorization-and-token-endpoints-2.png" alt="" width="646" height="621" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/90-copy-azure-active-directory-oauth-application-authorization-and-token-endpoints-2.png 646w, https://zappysys.com/blog/wp-content/uploads/2019/05/90-copy-azure-active-directory-oauth-application-authorization-and-token-endpoints-2-300x288.png 300w" sizes="(max-width: 646px) 100vw, 646px" /></li>
</ol></div>
<h3>Create OAuth Connection Manager in SSIS package</h3>
<ol>
<li>Drag and drop <em>REST API Task</em> from SSIS Toolbox, double click, select <strong>Url from connection,</strong> and then select <strong>&lt;New ZS-OAUTH Connection&gt;</strong> item:
<div id="attachment_7096" style="width: 604px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7096" class="wp-image-7096 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/110-create-ssis-oauth-connection-for-powerbi-rest-api-application-1-e1559316589109.png" alt="Creating OAuth Connection Manager to connect to Power BI OAuth Application from SSIS." width="594" height="399" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/110-create-ssis-oauth-connection-for-powerbi-rest-api-application-1-e1559316589109.png 594w, https://zappysys.com/blog/wp-content/uploads/2019/05/110-create-ssis-oauth-connection-for-powerbi-rest-api-application-1-e1559316589109-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/110-create-ssis-oauth-connection-for-powerbi-rest-api-application-1-e1559316589109-272x182.png 272w" sizes="(max-width: 594px) 100vw, 594px" /><p id="caption-attachment-7096" class="wp-caption-text">Creating OAuth Connection Manager to connect to Power BI OAuth Application from SSIS.</p></div></li>
<li>Input <strong>Client ID</strong> from <em>Step 2</em> when we were creating an Azure Active Directory OAuth Application.
<div class="mceTemp"></div>
<div id="attachment_10630" style="width: 652px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10630" class="wp-image-10630 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/120-configure-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1.png" alt="" width="642" height="652" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/120-configure-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1.png 642w, https://zappysys.com/blog/wp-content/uploads/2019/05/120-configure-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1-295x300.png 295w" sizes="(max-width: 642px) 100vw, 642px" /><p id="caption-attachment-10630" class="wp-caption-text">Configuring OAuth Connection Manager to authenticate to Power BI OAuth Application using SSIS.</p></div></li>
<li>Then proceed and input the <em>Client Secret</em> from <em style="font-style: italic;">Step 3, </em><em>Create an Azure Active Directory OAuth application</em> section.</li>
<li>Please go on, and fill in <em>Authorization Url </em>and <em>Access Token Url </em>properties with values we copied in <em>Step 4</em><em style="font-style: italic;">, </em><em>Create an Azure Active Directory OAuth application</em> section.</li>
<li>In <em>Scopes / Permissions</em> field input these scopes:<br />
<code>https://analysis.windows.net/powerbi/api/Dataset.ReadWrite.All<br />
offline_access</code></li>
<li>Then go to the <em>Advanced</em> tab and in the <em>Callback/Return Url</em> field input this value:<br />
<code>https://login.microsoftonline.com/common/oauth2/nativeclient</code></p>
<div id="attachment_10631" style="width: 652px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10631" class="wp-image-10631 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/130-configure-redirect-url-for-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1.png" alt="" width="642" height="384" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/130-configure-redirect-url-for-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1.png 642w, https://zappysys.com/blog/wp-content/uploads/2019/05/130-configure-redirect-url-for-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1-300x179.png 300w" sizes="(max-width: 642px) 100vw, 642px" /><p id="caption-attachment-10631" class="wp-caption-text">Setting Callback/Return Url (Redirect URI) in OAuth Connection Manager to authenticate to Power BI OAuth Application using SSIS.</p></div></li>
<li>Then go back to the tab <em>General </em>and click the <em>Generate Token</em> button.</li>
<li>Once asked for credentials, log in with your organization user; this will generate <em>Refresh</em> and <em>Access</em> tokens.</li>
</ol>
<h3>Retrieve the ID of the Power BI dataset you want to refresh</h3>
<ol>
<li>Go to <a href="https://app.powerbi.com/groups/me/settings/datasets" target="_blank" rel="noopener">Power BI datasets</a>.</li>
<li>Then click on <strong>Datasets</strong>.</li>
<li>Proceed and click the dataset you want to refresh.</li>
<li>Finally, copy the ID of the dataset from the URL, we will use it in the next section.</li>
</ol>
<div id="attachment_7114" style="width: 723px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7114" class="wp-image-7114 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/140-get-the-id-of-the-dataset-in-power-bi-to-refresh-it-using-rest-api-and-ssis-e1559663902796.png" alt="Getting Power BI dataset ID to refresh it in an HTTP request to Power BI REST API." width="713" height="396" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/140-get-the-id-of-the-dataset-in-power-bi-to-refresh-it-using-rest-api-and-ssis-e1559663902796.png 713w, https://zappysys.com/blog/wp-content/uploads/2019/05/140-get-the-id-of-the-dataset-in-power-bi-to-refresh-it-using-rest-api-and-ssis-e1559663902796-300x167.png 300w" sizes="(max-width: 713px) 100vw, 713px" /><p id="caption-attachment-7114" class="wp-caption-text">Getting Power BI dataset ID to refresh it in an HTTP request to Power BI REST API.</p></div>
<h3>Configure REST API Task to refresh a Power BI dataset</h3>
<p>We configured OAuth Connection Manager and retrieved the ID of the dataset we want to refresh, now it&#8217;s time to configure REST API Task and refresh the dataset. So do the following:</p>
<ol>
<li>Go to the <strong>SSIS package</strong> and open the <strong>REST API Task</strong> for configuration.</li>
<li>Input <em>URL</em> in such a format:<br />
<code><strong>https://api.powerbi.com/v1.0/myorg/datasets/DATASET-ID/refreshes</strong></code> Replace <em>DATASET-ID</em> with an actual ID of the dataset. E.g.:<br />
<code>https://api.powerbi.com/v1.0/myorg/datasets/a38c78fc-8c87-45e3-b961-6dcd3ac1eada/refreshes</code> <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>NOTE</strong>: If your dataset resides in a Workspace, use this format instead:<br />
<code><strong>https://api.powerbi.com/v1.0/WORKSPACE-ID/datasets/DATASET-ID/refreshes</strong></code></div></div></li>
<li>Then set <strong>POST</strong> as <em>HTTP Request Method.</em></li>
<li>In the <em>Body</em> field, input this JSON:<br />
<code><strong>{ "notifyOption": "MailOnFailure" }</strong></code></li>
<li>Press the <em>Test Request/Response</em> button to test the request and refresh the dataset at the same time.</li>
</ol>
<div id="attachment_7117" style="width: 671px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7117" class="wp-image-7117 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/150-configure-REST-API-Task-to-refresh-power-bi-dataset-using-rest-api-and-ssis.png" alt="Configuring REST API Task to refresh Power BI dataset using Power BI REST API and SSIS." width="661" height="610" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/150-configure-REST-API-Task-to-refresh-power-bi-dataset-using-rest-api-and-ssis.png 661w, https://zappysys.com/blog/wp-content/uploads/2019/05/150-configure-REST-API-Task-to-refresh-power-bi-dataset-using-rest-api-and-ssis-300x277.png 300w" sizes="(max-width: 661px) 100vw, 661px" /><p id="caption-attachment-7117" class="wp-caption-text">Configuring a REST API Task to refresh a Power BI dataset using Power BI REST API and SSIS.</p></div>
<h3>Run the package</h3>
<p>Hit <strong>F5</strong> and execute the package:</p>
<div id="attachment_7123" style="width: 297px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7123" class="wp-image-7123 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/160-run-SSIS-package-to-refresh-power-bi-dataset-rest-api.png" alt="Executing SSIS package and refreshing Power BI dataset." width="287" height="147" /><p id="caption-attachment-7123" class="wp-caption-text">Executing SSIS package and refreshing Power BI dataset.</p></div>
<h2>The Results</h2>
<p>Now it&#8217;s time to check the results and see if the dataset was refreshed successfully:</p>
<ol style="margin-left: 0;">
<li>Again, go to <a href="https://app.powerbi.com/groups/me/settings/datasets" target="_blank" rel="noopener">Power BI datasets</a>.</li>
<li>Then click on <strong>Datasets</strong>.</li>
<li>Click the dataset you refreshed.</li>
<li>Then click &#8220;Refresh history&#8221; to check the refresh history. We expect two manual refreshes to be there.</li>
</ol>
<div id="attachment_7124" style="width: 667px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7124" class="wp-image-7124 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/170-checking-the-result-of-refreshing-power-bi-dataset-using-ssis-and-rest-api.png" alt="Results: Successful Power BI dataset refresh using Power BI REST API and SSIS." width="657" height="234" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/170-checking-the-result-of-refreshing-power-bi-dataset-using-ssis-and-rest-api.png 657w, https://zappysys.com/blog/wp-content/uploads/2019/05/170-checking-the-result-of-refreshing-power-bi-dataset-using-ssis-and-rest-api-300x107.png 300w" sizes="(max-width: 657px) 100vw, 657px" /><p id="caption-attachment-7124" class="wp-caption-text">Results: Successful Power BI dataset refresh using Power BI REST API and SSIS.</p></div>
<div class="content_block" id="custom_post_widget-6976"><h2>Debugging HTTP requests</h2>
<p style="text-align: justify;">A common thing you have to do when working with HTTP requests is to debug those requests; e.g. to check what headers, body or URL was passed. <span id="Debug_Web_API_call_using_Fiddler"></span>To test how things look behind the scenes we strongly suggest to use <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Fiddler</a> - a popular web debugging tool.</p>
<p style="text-align: justify;">Inside it, you can double-click the URL entry (Right side) to see Request and Response Panels. The top panel is Request (URL, Headers, Body) and Bottom Panel is Response. For https:// (secure URL) make sure you enable HTTPS option in Fiddler (Tools &gt; Options &gt; HTTPS &gt; Check Decrypt https request):</p>

<div id="attachment_2344" class="wp-caption alignnone">

<a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-2344 size-full" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png" alt="Debugging Web API call using Fiddler in SSIS" width="1287" height="564" data-attachment-id="2344" data-permalink="https://zappysys.com/blog/pass-authorization-header-redirected-location/ssis-rest-api-call-debug-via-fiddler/#main" data-orig-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=1287%2C564&amp;ssl=1" data-orig-size="1287,564" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ssis-rest-api-call-debug-via-fiddler" data-image-description="&lt;p&gt;Debugging Web API call using Fiddler in SSIS&lt;/p&gt; " data-medium-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=300%2C131&amp;ssl=1" data-large-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=720%2C316&amp;ssl=1" srcset="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png 1287w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-300x131.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-768x337.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-1024x449.png 1024w" sizes="(max-width: 1287px) 100vw, 1287px" /></a>

</div></div>
<h2><span id="Deployment_to_Production">Deployment to Production</span></h2>
<div class="content_block" id="custom_post_widget-1932"><p style="text-align: justify;">In SSIS package <a href="https://docs.microsoft.com/en-us/sql/integration-services/security/access-control-for-sensitive-data-in-packages" target="_blank" rel="noopener">sensitive data such as tokens and passwords are by default encrypted by SSIS</a> with your Windows account which you use to create a package. So SSIS will fail to decrypt tokens/passwords when you run it from another machine using another Windows account. To circumvent this when you are creating an SSIS package which uses authentication components (e.g. an <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth Connection Manager</a> or an <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-http-connection-manager.htm" target="_blank" rel="noopener">HTTP Connection Manager</a> with credentials, etc.), consider using parameters/variables to pass tokens/passwords. In this way, you won’t face authentication related errors when a package is deployed to a production server.</p>
<p style="text-align: justify;">Check our article on <a href="https://zappysys.com/blog/how-to-run-an-ssis-package-with-sensitive-data-on-sql-server/" target="_blank" rel="noopener">how to configure packages with sensitive data on your production or development server</a>.</p></div>
<h2>Conclusion</h2>
<p style="text-align: justify;">You learned how to refresh a Power BI dataset with REST API using SSIS. To accomplish the goal, firstly, we created the Azure Active Directory application and configured OAuth Connection Manager based on it. Then we retrieved the Power BI dataset ID and used it in the ZappySys SSIS PowerPack connector REST API Task. Finally, using the same REST API Task we made the HTTP request to Power BI REST API &#8220;<em>refreshes&#8221;</em> method and successfully refreshed the dataset. If you need to make a call to another <a href="https://docs.microsoft.com/en-us/rest/api/power-bi/" target="_blank" rel="noopener">Power BI REST API</a> method, then just configure the REST API Task according to the documentation (for getting data use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a> instead). Finally, if you make many requests to the Power BI REST API service, make sure you check its <a href="https://docs.microsoft.com/en-us/power-bi/developer/api-rest-api-limitations" target="_blank" rel="noopener">limitations</a>.</p>
<h2>References</h2>
<p><a href="https://powerbi.microsoft.com/en-us/" target="_blank" rel="noopener">https://powerbi.microsoft.com/en-us/</a></p>
<p><a href="https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refreshdataset" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refreshdataset</a></p>
<p><a href="https://docs.microsoft.com/en-us/rest/api/power-bi/" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/rest/api/power-bi/</a></p>
<p><a href="https://docs.microsoft.com/en-us/power-bi/developer/api-rest-api-limitations" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/power-bi/developer/api-rest-api-limitations</a></p>
<p>The post <a href="https://zappysys.com/blog/refresh-power-bi-dataset-rest-api-using-ssis/">How to refresh Power BI dataset with REST API using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Load data from Exact Online into SQL Server using SSIS</title>
		<link>https://zappysys.com/blog/load-data-exact-online-sql-server-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 05 Feb 2019 13:08:51 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS Components]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[exact]]></category>
		<category><![CDATA[exactonline]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rest api]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6287</guid>

					<description><![CDATA[<p>Introduction In this article, you will learn how to load data from Exact Online into SQL Server using SSIS. Exact Online is a popular CRM, ERP and HRM tool which also lets you manage your finances. As an example, we will use Exact Online contacts as data to load it into a SQL Server database. [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/load-data-exact-online-sql-server-ssis/">Load data from Exact Online into SQL Server using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-logo-1.png"><img loading="lazy" decoding="async" class=" wp-image-6441 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-logo-1.png" alt="" width="136" height="136" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-logo-1.png 200w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-logo-1-150x150.png 150w" sizes="(max-width: 136px) 100vw, 136px" /></a>In this article, you will learn how to load data from <a href="https://www.exact.com/us/" target="_blank" rel="noopener">Exact Online</a> into SQL Server using SSIS. Exact Online is a popular CRM, ERP and HRM tool which also lets you manage your finances. As an example, we will use Exact Online contacts as data to load it into a SQL Server database. We will use <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> connector to get contacts from Exact Online and then use standard SSIS connector OLE DB Destination to load data into a table. This SSIS PowerPack connector will be used to get the data:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="content_block" id="custom_post_widget-6423"><div style="display: table-row; background: #f7f7f7;">
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc;"><img loading="lazy" decoding="async" style="vertical-align: middle; width: 50px; height: 50px; max-width: 50px;" src="//zappysys.com/images/SSIS-PowerPack/SSIS-Json-Source-Adapter.png" alt="JSON Parser Transform" width="50" height="50" /></div>
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc; border-left: none; width: 100%;"><a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a></div>
</div></div>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>Step-by-step &#8211; Load data from Exact Online into SQL Server using SSIS</h2>
<h3>Getting started</h3>
<p>We will get these contacts and load them into a SQL Server database:</p>
<div id="attachment_6290" style="width: 418px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6290" class="wp-image-6290 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-contacts-into-sql-server-using-ssis.png" alt="" width="408" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-contacts-into-sql-server-using-ssis.png 408w, https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-contacts-into-sql-server-using-ssis-300x114.png 300w" sizes="(max-width: 408px) 100vw, 408px" /><p id="caption-attachment-6290" class="wp-caption-text">Loading Exact Online contacts into SQL Server</p></div>
<p>The first thing you will need to do is to create an OAuth application in Exact App Center and then we will proceed in getting the data and loading it into a SQL Server database.</p>
<h3>Create OAuth application in Exact App Center</h3>
<ol>
<li>Visit <a href="https://apps.exactonline.com/nl/en-US" target="_blank" rel="noopener">Exact App Center</a> and login:
<div id="attachment_6293" style="width: 716px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6293" class="wp-image-6293 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-login-to-create-oauth-application-and-load-data-in-ssis.png" alt="" width="706" height="224" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-login-to-create-oauth-application-and-load-data-in-ssis.png 706w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-login-to-create-oauth-application-and-load-data-in-ssis-300x95.png 300w" sizes="(max-width: 706px) 100vw, 706px" /><p id="caption-attachment-6293" class="wp-caption-text">Exact App Center login window</p></div></li>
<li>Once logged in, click on <a href="https://apps.exactonline.com/nl/en-US/Manage" target="_blank" rel="noopener">Manage my apps</a> link:
<div id="attachment_6294" style="width: 716px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6294" class="wp-image-6294 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-manage-oauth-applications-and-load-data-in-ssis.png" alt="" width="706" height="225" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-manage-oauth-applications-and-load-data-in-ssis.png 706w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-manage-oauth-applications-and-load-data-in-ssis-300x96.png 300w" sizes="(max-width: 706px) 100vw, 706px" /><p id="caption-attachment-6294" class="wp-caption-text">Exact App Center login area</p></div></li>
<li>Create a new OAuth application:
<div id="attachment_6295" style="width: 653px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6295" class="wp-image-6295 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-create-oauth-application-and-load-data-in-ssis.png" alt="" width="643" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-create-oauth-application-and-load-data-in-ssis.png 643w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-app-center-create-oauth-application-and-load-data-in-ssis-300x281.png 300w" sizes="(max-width: 643px) 100vw, 643px" /><p id="caption-attachment-6295" class="wp-caption-text">Exact Online API applications management page</p></div></li>
<li>Give it a name.</li>
<li>In <em>Redirect URI </em>field enter: <strong>https://www.zappysyscom/oauth2<br />
</strong></p>
<div id="attachment_6292" style="width: 329px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6292" class="wp-image-6292 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-registering-marketplace-rest-api-application-1.png" alt="" width="319" height="500" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-registering-marketplace-rest-api-application-1.png 319w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-registering-marketplace-rest-api-application-1-191x300.png 191w" sizes="(max-width: 319px) 100vw, 319px" /><p id="caption-attachment-6292" class="wp-caption-text">Registering Exact Online API application to load data into SQL Server</p></div></li>
<li>Hit <strong>Register</strong>.</li>
<li>Don&#8217;t close the browser, we will use App information later.</li>
</ol>
<h3>Create OAuth Connection Manager to connect to Exact Online</h3>
<ol>
<li>Create a new SSIS package.</li>
<li>Create a new OAuth Connection Manager, by right-clicking on the Connection Managers pane:
<div id="attachment_6354" style="width: 430px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6354" class="wp-image-6354 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-1.png" alt="" width="420" height="355" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-1.png 420w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-1-300x254.png 300w" sizes="(max-width: 420px) 100vw, 420px" /><p id="caption-attachment-6354" class="wp-caption-text">Creating OAuth Connection Manager to connect to Exact Online API application</p></div></li>
<li>Select <strong>ZS-OAUTH</strong> to create one:
<div id="attachment_6355" style="width: 532px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6355" class="wp-image-6355 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-2.png" alt="" width="522" height="507" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-2.png 522w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-2-300x291.png 300w" sizes="(max-width: 522px) 100vw, 522px" /><p id="caption-attachment-6355" class="wp-caption-text">Selecting ZS-OAUTH option to create OAuth Connection Manager</p></div></li>
<li>Then open your Exact App Center API application configuration we left open in the previous step. We will use that data from that window.</li>
<li>Select <strong>Custom</strong> as <em>OAuth Provider.</em></li>
<li>Select <strong>Authorization Code Grant</strong> as <em>OAuth Grant Type</em>.</li>
<li>Copy <strong>Client ID</strong> and paste it into <em>Client Id</em> field.</li>
<li>Copy <strong>Client secret</strong> and paste it into <em>Client Secret</em> field.</li>
<li>Set <em>Authorization Url</em> to <strong>https://start.exactonline.nl/api/oauth2/auth</strong>.</li>
<li>Set <em>Access Token Url</em> to <strong>https://start.exactonline.nl/api/oauth2/token</strong>.<strong><br />
</strong></p>
<div id="attachment_6353" style="width: 708px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6353" class="wp-image-6353 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-rest-api-oauth-configuration-in-ssis.png" alt="" width="698" height="845" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-rest-api-oauth-configuration-in-ssis.png 698w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-rest-api-oauth-configuration-in-ssis-248x300.png 248w" sizes="(max-width: 698px) 100vw, 698px" /><p id="caption-attachment-6353" class="wp-caption-text">Configuring OAuth Connection Manager to access Exact Online data via API</p></div></li>
<li>Then open <em>Advanced</em> tab and copy paste <strong>Redirect URI</strong> to <em>Callback/Return Url</em> field:
<div id="attachment_6356" style="width: 602px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6356" class="wp-image-6356 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-rest-api-callback-url-configuration-in-ssis-1.png" alt="" width="592" height="515" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-rest-api-callback-url-configuration-in-ssis-1.png 592w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-rest-api-callback-url-configuration-in-ssis-1-300x261.png 300w" sizes="(max-width: 592px) 100vw, 592px" /><p id="caption-attachment-6356" class="wp-caption-text">Configuring OAuth application Callback/Return URL</p></div></li>
<li>Then click on <em>OAuth2 Grant Options</em> tab and check option below.</li>
<li>Finally, since Exact Online refresh token keeps changing, enter a filename where to store the refresh token:
<div id="attachment_6358" style="width: 673px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6358" class="wp-image-6358 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-3-1.png" alt="" width="663" height="481" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-3-1.png 663w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-create-oauth-connection-manager-3-1-300x218.png 300w" sizes="(max-width: 663px) 100vw, 663px" /><p id="caption-attachment-6358" class="wp-caption-text">Configuring OAuth2 Grant specifics</p></div>
<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>NOTE</strong>: Can be a non-existent file or <span style="text-decoration: underline;">must be an empty</span>, existing file.</div></div></li>
</ol>
<h3>Getting data from Exact Online</h3>
<ol>
<li>Drag and drop <em>Data Flow</em> and then <em>JSON Source</em> into it:
<div id="attachment_8028" style="width: 470px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8028" class="size-full wp-image-8028" src="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png" alt="" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /><p id="caption-attachment-8028" class="wp-caption-text">Dragging and dropping Data Flow Task into Control Flow</p></div></li>
<li>Double click on <em>JSON Source</em> to modify it.</li>
<li>Check <strong>Use Credentials</strong> checkbox and select <strong>OAuth 1</strong> as your <em>Connection Manager</em>.</li>
<li>Add <em>HTTP Header</em> named <strong>Accept</strong> and set the value to <strong>application/json</strong>.</li>
<li>In <em>Array Filter</em> field enter <strong>$.d.results[*]</strong>.</li>
<li>In Enter<em> Path or Web URL</em> field enter this URL:<br />
<strong>https://start.exactonline.nl/api/v1/current/Me?$select=CurrentDivision</strong></li>
<li>Hit <strong>Preview</strong> button.</li>
<li>Copy your division number, you will need it when constructing a URL for getting contacts.
<div id="attachment_6373" style="width: 410px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6373" class="wp-image-6373 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-get-division-number.png" alt="" width="400" height="188" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-get-division-number.png 400w, https://zappysys.com/blog/wp-content/uploads/2019/02/exact-online-get-division-number-300x141.png 300w" sizes="(max-width: 400px) 100vw, 400px" /><p id="caption-attachment-6373" class="wp-caption-text">Getting division number</p></div></li>
<li>Now enter this URL in the field:<br />
<strong>https://start.exactonline.nl/api/v1/<span style="text-decoration: underline;">{division}</span>/crm/Contacts?$select=FirstName,LastName<br />
</strong>Replace <em>{division}</em> with your division number.</li>
</ol>
<div id="attachment_6372" style="width: 651px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6372" class="wp-image-6372 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source.png" alt="" width="641" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source.png 641w, https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-262x300.png 262w" sizes="(max-width: 641px) 100vw, 641px" /><p id="caption-attachment-6372" class="wp-caption-text">Configuring JSON Source to get Exact Online data and load it into SQL Server</p></div>
<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>NOTE:</strong> Check this link to construct a URL to get other fields than <em>FirstName, Lastname </em>as well: <a href="https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=CRMContacts" target="_blank" rel="noopener">https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=CRMContacts</a>.</div></div>
<h4>Pagination</h4>
<p>To paginate through the results, perform these steps:</p>
<ol>
<li>Open <em>Pagination</em> tab.</li>
<li>In <em>Next Link/Cursor Expression</em> field enter <strong>$.d.__next</strong></li>
</ol>
<div id="attachment_6418" style="width: 712px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6418" class="wp-image-6418 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-pagination.png" alt="" width="702" height="518" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-pagination.png 702w, https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-pagination-300x221.png 300w" sizes="(max-width: 702px) 100vw, 702px" /><p id="caption-attachment-6418" class="wp-caption-text">Configuring pagination in JSON Source to paginate through Exact Online contacts</p></div>
<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>NOTE:</strong> More on pagination: <a href="https://support.exactonline.com/community/s/knowledge-base#All-All-DNO-Content-resttips" target="_blank" rel="noopener">https://support.exactonline.com/community/s/knowledge-base#All-All-DNO-Content-resttips</a>.</div></div>
<h3>Loading Exact Online data into SQL Server</h3>
<ol>
<li>Drag and drop <em>OLE DB Destination</em> or similar connector.</li>
<li>Connect<em> JSON Source</em> with <em>OLE DB Destination</em>.</li>
<li>Create a new connection.</li>
<li>Click <strong>New</strong> to create a new table.</li>
<li>Hit <strong>OK</strong>.</li>
<li>Select <strong>Mappings</strong> to map the columns.</li>
<li>Hit <strong>OK</strong> to close the window.</li>
<li>Execute the package.</li>
</ol>
<div id="attachment_6419" style="width: 828px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6419" class="wp-image-6419 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-ole-db-destination.png" alt="" width="818" height="487" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-ole-db-destination.png 818w, https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-ole-db-destination-300x179.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-using-json-source-ole-db-destination-768x457.png 768w" sizes="(max-width: 818px) 100vw, 818px" /><p id="caption-attachment-6419" class="wp-caption-text">Configuring OLE DB Destination to load Exact Online data into SQL Server</p></div>
<h3>The results</h3>
<p>Once you execute the package, you should see similar results in Visual Studio and SQL Server Management Studio:</p>
<div id="attachment_6420" style="width: 366px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6420" class="wp-image-6420 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-powerpack-execute-package.png" alt="" width="356" height="272" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-powerpack-execute-package.png 356w, https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-powerpack-execute-package-300x229.png 300w" sizes="(max-width: 356px) 100vw, 356px" /><p id="caption-attachment-6420" class="wp-caption-text">Executing SSIS package and loading Exact Online data  into SQL Server</p></div>
<div id="attachment_6421" style="width: 676px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6421" class="wp-image-6421 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-powerpack-results.png" alt="" width="666" height="154" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-powerpack-results.png 666w, https://zappysys.com/blog/wp-content/uploads/2019/02/load-exact-online-into-sql-server-with-ssis-powerpack-results-300x69.png 300w" sizes="(max-width: 666px) 100vw, 666px" /><p id="caption-attachment-6421" class="wp-caption-text">Successfully loading Exact Online data into SQL Server</p></div>
<p>As you see, these are the same Exact Online contacts showed in the Getting Started section.</p>
<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>NOTE:</strong> Check more API methods you can use to get data from Exact Online: <a href="https://start.exactonline.nl/docs/HlpRestAPIResources.aspx?SourceAction=10" target="_blank" rel="noopener">https://start.exactonline.nl/docs/HlpRestAPIResources.aspx?SourceAction=10</a></div></div>
<h2>Conclusion</h2>
<p>You learned how to load data from Exact Online into SQL Server using SSIS and <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a>. At first, we created an Exact Online OAuth application, then created an OAuth Connection Manager based on its information and finally loaded contacts using JSON Source.</p>
<h2><strong>References</strong></h2>
<p><a href="https://apps.exactonline.com/nl/en-US" target="_blank" rel="noopener">Exact App Center</a></p>
<p><a href="https://start.exactonline.nl/docs/HlpRestAPIResources.aspx?SourceAction=10" target="_blank" rel="noopener">API methods</a></p>
<p><a href="https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=CRMContacts" target="_blank" rel="noopener">Get contacts API method</a></p>
<p><a href="https://support.exactonline.com/community/s/knowledge-base#All-All-DNO-Content-resttips." target="_blank" rel="noopener">Pagination</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/load-data-exact-online-sql-server-ssis/">Load data from Exact Online into SQL Server using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Get Office 365 data in Power BI using Microsoft Graph API and ODBC</title>
		<link>https://zappysys.com/blog/get-office-365-data-in-power-bi-using-microsoft-graph-api-and-odbc/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 19 Dec 2018 17:57:00 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC App Integration]]></category>
		<category><![CDATA[ODBC Drivers]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Reporting - Microsoft Power BI]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[microsoft graph api]]></category>
		<category><![CDATA[office 365]]></category>
		<category><![CDATA[onedrive]]></category>
		<category><![CDATA[onenote]]></category>
		<category><![CDATA[power bi]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5661</guid>

					<description><![CDATA[<p>Introduction In this article, we will get Office 365  data in Power BI using Microsoft Graph API and ODBC drivers. Specifically, we will get Excel file data in OneDrive, events from a Calendar and finally, a list in a note in OneNote and then load that data into a Power BI report. We will achieve [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/get-office-365-data-in-power-bi-using-microsoft-graph-api-and-odbc/">Get Office 365 data in Power BI using Microsoft Graph API and ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="size-thumbnail wp-image-6204 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/12/office-365-to-power-bi-150x150.png" alt="" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/office-365-to-power-bi-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/12/office-365-to-power-bi-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/office-365-to-power-bi.png 350w" sizes="(max-width: 150px) 100vw, 150px" />In this article, we will get <a href="https://www.office.com/" target="_blank" rel="noopener">Office 365</a>  data in Power BI using <a href="https://docs.microsoft.com/en-us/graph/overview" target="_blank" rel="noopener">Microsoft Graph API</a> and ODBC drivers. Specifically, we will get Excel file data in <a href="https://onedrive.live.com" target="_blank" rel="noopener">OneDrive</a>, events from a <a href="https://outlook.live.com/owa/?path=/calendar" target="_blank" rel="noopener">Calendar</a> and finally, a list in a note in <a href="https://www.onenote.com/" target="_blank" rel="noopener">OneNote</a> and then load that data into a Power BI report. We will achieve that by creating an ODBC data source using <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> and then querying corresponding <a href="https://docs.microsoft.com/en-us/graph/overview" target="_blank" rel="noopener">Microsoft Graph API</a> methods. ODBC PowerPack allows to query REST/SOAP APIs in an easy way and lets to view responses in a tabular format, which will be perfect to accomplish our goal.</p>
<p>&nbsp;</p>
<h2>Prerequisites</h2>
<ol>
<li>A Power BI account.</li>
<li>Wield basic Power BI skills.</li>
<li><a href="https://powerbi.microsoft.com/en-us/desktop/" target="_blank" rel="noopener">Power BI Desktop</a> installed.</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; Get Office 365 data in Power BI using Microsoft Graph API and ODBC</h2>
<div class="content_block" id="custom_post_widget-5670"><h2 style="text-align: left;">Register Application (OAuth2 App for Graph API)</h2>
<p style="text-align: left;">The first step to access any Office 365 API / Graph API is to register an OAuth App in the Azure Portal. After
following these steps, you will get the following two items to use in the next section:</p>

<ul style="text-align: left;">
 	<li>Application Id</li>
 	<li>Application Secret</li>
</ul>
<p style="text-align: left;">In this section, you will learn how to register a custom app in Microsoft Azure portal that will allow access to the
OneDrive. So, let's get started -</p>

<ol>
 	<li style="text-align: left;">Log into <a href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps">Microsoft
Azure portal</a> to register a custom app.</li>
 	<li style="text-align: left;">Register a new application by clicking New Registration link.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png"><img loading="lazy" decoding="async" class="size-full wp-image-9034" src="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png" alt="New App Registration in Azure portal" width="748" height="221" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png 748w, https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration-300x89.png 300w" sizes="(max-width: 748px) 100vw, 748px" /></a></li>
 	<li style="text-align: left;">Provide the name of the custom app and who can access the app in the organization.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg"><img loading="lazy" decoding="async" class="wp-image-9005 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg" alt="Register an OneDrive App" width="610" height="518" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg 610w, https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1-300x255.jpg 300w" sizes="(max-width: 610px) 100vw, 610px" /></a></li>
 	<li style="text-align: left;">Go to the App overview and add a Redirect URL.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg"><img loading="lazy" decoding="async" class="wp-image-9044 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg" alt="Add a Redirect URL" width="937" height="122" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg 937w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1-300x39.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1-768x100.jpg 768w" sizes="(max-width: 937px) 100vw, 937px" /></a></li>
 	<li style="text-align: left;">Click on "Add a Platform" under Platform Configuration section and then select "Web" under Web applications
section to enter a Redirect URL.
<pre class="lang:default decode:true">https://zappysys.com/oauth</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9007" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg" alt="Redirect URL" width="466" height="564" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg 466w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2-248x300.jpg 248w" sizes="(max-width: 466px) 100vw, 466px" /></a></li>
 	<li style="text-align: left;">Create a Client Secret key which will be used to Authenticate the custom Azure app.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9010" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg" alt="Add a Client Secret" width="576" height="403" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg 576w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret-300x210.jpg 300w" sizes="(max-width: 576px) 100vw, 576px" /></a><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret2.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9011" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret2.jpg" alt="Secret Key Expiration Period" width="208" height="259" /></a><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9012" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg" alt="Specify Secret Key" width="1024" height="176" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg 1024w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3-300x52.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3-768x132.jpg 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></a>
<div><strong>Note</strong> - Take a note of <strong>Client Secret</strong>, it will be required while
configuring OAuth connection in the SSIS later</div></li>
 	<li style="text-align: left;">Add API Permissions.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9008" src="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions.jpg" alt="OneDrive API Permissions" width="1291" height="415" /></a></li>
 	<li style="text-align: left;">Select following permissions from the Delegated Permissions section.
<pre class="lang:default decode:true">User.ReadBasic.All
Files.Read
offline_access</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9009" src="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg" alt="Select Delegated Permissions" width="512" height="571" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg 512w, https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2-269x300.jpg 269w" sizes="(max-width: 512px) 100vw, 512px" /></a></li>
 	<li>Take a note of Client ID, it will be required while configuring OAuth connection in the SSIS later.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret4.jpg"><img loading="lazy" decoding="async" class="wp-image-9013 size-full alignleft" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret4.jpg" alt="App Client ID" width="810" height="274" /></a></li>
</ol></div>
<div class="content_block" id="custom_post_widget-5914"><h3>Open ODBC Data Source Administrator</h3>
<ol>
 	<li>Hit <em>Windows Start</em> button and search for "odbc".</li>
 	<li>You will see two versions of <em>ODBC Data Source administrator</em>: <strong>64-bit </strong>and <strong>32-bit</strong>. Choose:
<ol>
 	<li style="list-style-type: none;">
<ul style="margin-left: 0px;">
 	<li>64-bit if your client application is a 64-bit program and you plan to create a <em>System DSN</em>.</li>
 	<li>32-bit if your client application is a 32-bit program and you plan to create a <em>System DSN</em>.</li>
 	<li>32-bit or 64-bit version if you plan to create a <em>User DSN</em>.</li>
</ul>
</li>
</ol>
<div class="wp-caption alignnone">

<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6213" src="https://zappysys.com/blog/wp-content/uploads/2019/01/how-to-open-odbc-data-source-administrator-2.png" alt="" width="394" height="542" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/how-to-open-odbc-data-source-administrator-2.png 394w, https://zappysys.com/blog/wp-content/uploads/2019/01/how-to-open-odbc-data-source-administrator-2-218x300.png 218w" sizes="(max-width: 394px) 100vw, 394px" />
<p class="wp-caption-text">Windows ODBC Data Sources</p>

</div></li>
 	<li>Once you open, you should see a similar window:
<div class="wp-caption">

<img loading="lazy" decoding="async" class="alignnone size-full wp-image-5915" src="https://zappysys.com/blog/wp-content/uploads/2019/01/open-odbc-data-source-administrator-to-get-data-in-power-bi.png" alt="" width="594" height="421" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/open-odbc-data-source-administrator-to-get-data-in-power-bi.png 594w, https://zappysys.com/blog/wp-content/uploads/2019/01/open-odbc-data-source-administrator-to-get-data-in-power-bi-300x213.png 300w" sizes="(max-width: 594px) 100vw, 594px" />
<p class="wp-caption-text">ODBC Data Source Administrator</p>

</div></li>
</ol></div>
<h3>Set up an ODBC data source based on ZappySys JSON Driver</h3>
<h4>Add a data source</h4>
<div class="content_block" id="custom_post_widget-6052"><ol>
 	<li>Go to <em>System DSN</em> and press <em>Add</em> to add a system DSN. If you use apps like Power BI which needs access only your User account then you can create User DSN.<img loading="lazy" decoding="async" class="wp-image-2927 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/odb-data-source-administrator-add.png" alt="Create new ODBC DSN (System DSN Tab)" width="590" height="419" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/odb-data-source-administrator-add.png 590w, https://zappysys.com/blog/wp-content/uploads/2018/03/odb-data-source-administrator-add-300x213.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></li>
 	<li>Add a data source based on <em>ZappySys JSON Driver</em>:
<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/add-zappysys-json-driver.png"><img loading="lazy" decoding="async" class="wp-image-2923 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-zappysys-json-driver.png" alt="Add ZappySys JSON / REST Driver Connection" width="464" height="352" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/add-zappysys-json-driver.png 464w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-zappysys-json-driver-300x228.png 300w" sizes="(max-width: 464px) 100vw, 464px" /></a></li>
</ol></div>
<h4>Configure the data source</h4>
<div class="content_block" id="custom_post_widget-6064"><ol>
 	<li>Once a window appears, give a name to the data source, e.g. <strong>System - JSON:
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6182" src="https://zappysys.com/blog/wp-content/uploads/2019/01/get-data-from-office-365-using-microsoft-graph-api-and-odbc-powerpack-1.png" alt="" width="697" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/get-data-from-office-365-using-microsoft-graph-api-and-odbc-powerpack-1.png 697w, https://zappysys.com/blog/wp-content/uploads/2019/01/get-data-from-office-365-using-microsoft-graph-api-and-odbc-powerpack-1-281x300.png 281w" sizes="(max-width: 697px) 100vw, 697px" />
</strong></li>
 	<li>Then input <strong>https://graph.microsoft.com/v1.0/me</strong> in the URL field.</li>
 	<li>Select <strong>OAuth</strong> as the <em>Connection Type</em>.</li>
 	<li>Click <strong>Click to Configure</strong> button/link to open OAuth configuration window.</li>
 	<li>Select <strong>Custom</strong> as <em>OAuth Provider</em>.</li>
 	<li>Then input <em>Client Id, Client Secret</em> which we got when created the Graph API application.</li>
 	<li>Set <strong>https://login.microsoftonline.com/common/oauth2/v2.0/authorize</strong> as <em>Authorization Url.</em></li>
 	<li>Set <strong>https://login.microsoftonline.com/common/oauth2/v2.0/token</strong> as <em>Access Token Url</em>.</li>
 	<li>In <em>Scopes / Permissions</em> section set these scopes, separated by a new line. E.g. <strong>offline_access</strong>, <strong>Files.Read.All</strong>, <strong>Calendars</strong>.<strong>Read</strong>, <strong>Notes.Read, User.Read</strong></li>
 	<li>In <em>Advanced </em>tab configure <em>Callback/Redirect Url </em>and set it to the one we configured in Graph API app:
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6060" src="https://zappysys.com/blog/wp-content/uploads/2018/12/oauth-callback-return-url-configuration-for-office-365-app-in-odbc-powerpack.png" alt="" width="586" height="271" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/oauth-callback-return-url-configuration-for-office-365-app-in-odbc-powerpack.png 586w, https://zappysys.com/blog/wp-content/uploads/2018/12/oauth-callback-return-url-configuration-for-office-365-app-in-odbc-powerpack-300x139.png 300w" sizes="(max-width: 586px) 100vw, 586px" /></li>
 	<li>Finally, click <strong>Generate Token </strong>button to generate a token.</li>
 	<li>Click <strong>OK</strong> to close the window.</li>
</ol></div>
<h3>Set up an ODBC data source based on ZappySys XML Driver</h3>
<div class="content_block" id="custom_post_widget-6075"><ol>
 	<li>Before adding another data source based on ZappySys XML Driver, copy the connection string of the data source we just created:
<img loading="lazy" decoding="async" class="wp-image-6062 size-full alignnone" style="margin-right: 100px;" src="https://zappysys.com/blog/wp-content/uploads/2018/12/copy-connection-string-of-odbc-datasource-for-office-365-e1547488424263.png" alt="" width="529" height="210" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/copy-connection-string-of-odbc-datasource-for-office-365-e1547488424263.png 529w, https://zappysys.com/blog/wp-content/uploads/2018/12/copy-connection-string-of-odbc-datasource-for-office-365-e1547488424263-300x119.png 300w" sizes="(max-width: 529px) 100vw, 529px" /></li>
 	<li>Close the window and then add a new data source, but this time based on <em>ZappySys XML Driver</em>.</li>
 	<li>Once a window is opened, give it a name, e.g. <strong>System - XML</strong>.</li>
 	<li>Then press <strong>Load connection string</strong> button to load the connection string.</li>
 	<li>Paste the copied connection string and replace JSON text to XML, so that you have <strong>{ ZappySys XML Driver }</strong> in <em>DRIVER</em> property.</li>
 	<li>Close the window.</li>
</ol>
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6184" src="https://zappysys.com/blog/wp-content/uploads/2019/01/load-connection-string-in-odbc-data-source-for-office-365-graph-api-app-1.png" alt="" width="652" height="416" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/load-connection-string-in-odbc-data-source-for-office-365-graph-api-app-1.png 652w, https://zappysys.com/blog/wp-content/uploads/2019/01/load-connection-string-in-odbc-data-source-for-office-365-graph-api-app-1-300x191.png 300w" sizes="(max-width: 652px) 100vw, 652px" /></div>
<h3>Create a Power BI report</h3>
<h4>Reading files from OneDrive (getting Excel data)</h4>
<p>Let&#8217;s say you have Stock.xlsx stored in <em>Sample Documents</em> folder, OneDrive with this kind of data and you want to show it in a Power BI report:</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-6081" src="https://zappysys.com/blog/wp-content/uploads/2018/12/stock.xlsx.png" alt="" width="261" height="151" /></p>
<p>To have that data in a Power BI report, perform these steps:</p>
<ol style="margin-left: 0;">
<li>Open Power BI Desktop and create a new Power BI report.</li>
<li>Create a data source based on <strong>System &#8211; JSON</strong> DSN (since we get a JSON response):<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6191" style="border: 1px solid grey;" src="https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-office-365-data-2.png" alt="" width="695" height="518" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-office-365-data-2.png 695w, https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-office-365-data-2-300x224.png 300w" sizes="(max-width: 695px) 100vw, 695px" /></li>
<li style="text-align: justify;">Then in <em>SQL statement</em> area enter this query:<br />
<code>SELECT * FROM $<br />
WITH(Src='https://graph.microsoft.com/v1.0/me/drive/root:/<strong>YOUR FOLDER</strong>/Stock.xlsx:/workbook/worksheets/<strong>SHEET NAME</strong>/usedRange'<br />
,Filter='$.values[1:]'<br />
,ArrayTransformType='TransformSimpleTwoDimensionalArray'<br />
,ArrayTransColumnNameFilter='$.values[0][*]'<br />
)<br />
</code>Using <em>WITH</em> clause lets us override the properties. You can generate the query above using the <em>Query Builder</em>:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6189" src="https://zappysys.com/blog/wp-content/uploads/2018/12/use-query-builder-in-odbc-powerpack-to-override-the-properties.png" alt="" width="545" height="297" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/use-query-builder-in-odbc-powerpack-to-override-the-properties.png 545w, https://zappysys.com/blog/wp-content/uploads/2018/12/use-query-builder-in-odbc-powerpack-to-override-the-properties-300x163.png 300w" sizes="(max-width: 545px) 100vw, 545px" />In this step we are overriding Url, Filter and array transformation fields you configured in JSON DSN. The <em>Src</em> value overrides the URL. The <em>Filter</em> property enables us to select the data we want to see in the report. We use <strong>[1:]</strong> in <strong>$.values[1:] </strong>to skip the first row because the first row contains the headers and we want only the data. You can configure this option in the <em>Filter Options</em> tab (<a href="https://goessner.net/articles/JsonPath/" target="_blank" rel="noopener">read more about JSON path</a>).We also have to make the transformation on the JSON and turn JSON arrays into rows. To accomplish that, we override <em>ArrayTransformType. </em>With <em>ArrayTransColumnNameFilter</em> property and <strong>[0][*]</strong> text, we specify that the first array of parent array will be the headers of the columns. You can read more about transformations in <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">Parse multi-dimensional JSON array</a> article.<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>Note:</strong> Use <a href="https://developer.microsoft.com/en-us/graph/graph-explorer/" target="_blank" rel="noopener">Microsoft Graph API Explorer</a> to make a call and see what response you get. You can try calling <a href="https://docs.microsoft.com/en-us/graph/onedrive-concept-overview" target="_blank" rel="noopener">other OneDrive endpoints</a>.</div></div></li>
<li>Click <strong>OK</strong>.</li>
<li>Drag a table into the report, select the columns and you should see a similar view:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6087" src="https://zappysys.com/blog/wp-content/uploads/2018/12/get-excel-data-into-power-bi-using-odbc-powerpack-and-microsoft-graph-api-1.png" alt="" width="236" height="216" /></li>
</ol>
<h4>Reading calendar entries</h4>
<p>Now, let&#8217;s say you use a calendar in Office 365 and you want your appointments to be visible in a Power BI report:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6101" src="https://zappysys.com/blog/wp-content/uploads/2018/12/calendar-in-office-365.png" alt="" width="590" height="222" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/calendar-in-office-365.png 590w, https://zappysys.com/blog/wp-content/uploads/2018/12/calendar-in-office-365-300x113.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></p>
<ol>
<li>To start, create a new Power BI report.</li>
<li>Then add a data source based on <strong>System &#8211; JSON </strong>DSN (again, we get the response in JSON):<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6187" src="https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-calendar-events-in-office-365-b-1.png" alt="" width="701" height="524" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-calendar-events-in-office-365-b-1.png 701w, https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-calendar-events-in-office-365-b-1-300x224.png 300w" sizes="(max-width: 701px) 100vw, 701px" /></li>
<li style="text-align: justify;">In <em>SQL statement</em> section enter this query:<br />
<code>SELECT * FROM $<br />
WITH(Src='https://graph.microsoft.com/v1.0/me/events?$select=subject,start,end,location'<br />
,Filter='$.value[*]'<br />
,Header='Prefer: outlook.timezone="FLE Standard Time"'<br />
)</code>Here we also are overriding <em>HTTP Header</em> so that we get the event times not in UTC/GMT but for the specified timezone. It must be specified in <strong>Prefer: outlook.timezone=&#8221;{time-zone-string}&#8221;</strong> format (check <a href="https://graph.microsoft.com/v1.0/me/outlook/supportedTimeZones" target="_blank" rel="noopener">an article</a> on how to get a list of supported time zones).<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>Note:</strong> Use <a href="https://developer.microsoft.com/en-us/graph/graph-explorer/" target="_blank" rel="noopener">Microsoft Graph API Explorer</a> to make a call and see what response you get. You can try calling <a href="https://docs.microsoft.com/en-us/graph/outlook-calendar-concept-overview" target="_blank" rel="noopener">other Calendar endpoints</a>.</div></div></li>
<li>Click <strong>OK</strong>.</li>
<li>Drag a table control into the report, select several columns and you should see a similar view:<br />
<img loading="lazy" decoding="async" class="alignnone wp-image-6102 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/12/office-365-calendar-appointments-in-power-bi-report-retrieved-with-odbc-powerpack-e1547658449371.png" alt="" width="490" height="214" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/office-365-calendar-appointments-in-power-bi-report-retrieved-with-odbc-powerpack-e1547658449371.png 490w, https://zappysys.com/blog/wp-content/uploads/2018/12/office-365-calendar-appointments-in-power-bi-report-retrieved-with-odbc-powerpack-e1547658449371-300x131.png 300w" sizes="(max-width: 490px) 100vw, 490px" /></li>
</ol>
<h4>Reading notes from OneNote</h4>
<p>Suppose, you have these notes in OneNote and you want &#8220;<em>Groceries list</em>&#8221; to be shown in a Power BI report:</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-6114" src="https://zappysys.com/blog/wp-content/uploads/2018/12/notes-in-onenote.png" alt="" width="516" height="189" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/notes-in-onenote.png 516w, https://zappysys.com/blog/wp-content/uploads/2018/12/notes-in-onenote-300x110.png 300w" sizes="(max-width: 516px) 100vw, 516px" /></p>
<ol>
<li>First, we will need to find NOTE ID we are trying to get. To do that, open <em>ODBC Administrator</em>, find <strong>System &#8211; JSON</strong> data source and hit <strong>Configure</strong>.</li>
<li>Then go to <em>the Preview</em> tab, and input this SQL query and hit <strong>Preview Data</strong>:<br />
<code>SELECT * FROM $<br />
WITH (Src='https://graph.microsoft.com/v1.0/me/onenote/pages'<br />
,Filter='$.value[*]'<br />
)</code></li>
<li>Once you get a result set, find your note name and copy its ID:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6192" src="https://zappysys.com/blog/wp-content/uploads/2018/12/using-odbc-powerpack-get-note-id-in-onenote-part-of-office-365-1.png" alt="" width="676" height="593" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/using-odbc-powerpack-get-note-id-in-onenote-part-of-office-365-1.png 676w, https://zappysys.com/blog/wp-content/uploads/2018/12/using-odbc-powerpack-get-note-id-in-onenote-part-of-office-365-1-300x263.png 300w" sizes="(max-width: 676px) 100vw, 676px" /></li>
<li>Then create a new Power BI report.</li>
<li>Create a new data source based on <strong>System &#8211; XML</strong> DSN (we are using XML-based DSN because the response will be in HTML):<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6193" src="https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-onenote-notes-in-office-365-1.png" alt="" width="701" height="524" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-onenote-notes-in-office-365-1.png 701w, https://zappysys.com/blog/wp-content/uploads/2018/12/create-odbc-data-source-in-power-bi-report-to-get-onenote-notes-in-office-365-1-300x224.png 300w" sizes="(max-width: 701px) 100vw, 701px" /></li>
<li>In <em>SQL statement</em> section enter this query (use the NOTE ID you retrieved in the previous step):<br />
<code>SELECT * FROM $<br />
WITH(ElementsToTreatAsArray='div,p'<br />
,Src='https://graph.microsoft.com/v1.0/me/onenote/pages/<strong>NOTE ID</strong>/content'<br />
,Filter='$.html.body.div[0].p[1:]'<br />
)<br />
</code><br />
<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>Note:</strong> Use <a href="https://developer.microsoft.com/en-us/graph/graph-explorer/" target="_blank" rel="noopener">Microsoft Graph API Explorer</a> to make a call and see what response you get. You can try calling <a href="https://docs.microsoft.com/en-us/graph/integrate-with-onenote" target="_blank" rel="noopener">other OneNote endpoints</a>.</div></div></li>
<li style="text-align: justify;">Click <strong>OK</strong>.</li>
<li>Drag and drop <em>Multi-row card</em> visual, select <strong>#text</strong> column and you should see a similar view:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6145" src="https://zappysys.com/blog/wp-content/uploads/2018/12/note-to-buy.png" alt="" width="288" height="288" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/note-to-buy.png 288w, https://zappysys.com/blog/wp-content/uploads/2018/12/note-to-buy-150x150.png 150w" sizes="(max-width: 288px) 100vw, 288px" /></li>
<li>We finished! Now you can publish your Power BI reports to Power BI service.</li>
</ol>
<div class="content_block" id="custom_post_widget-5891"><h2>Working with Gateways in Power BI (Schedule Import)</h2>
If the data needs to be updated, it is necessary to create a gateway on-premises. In this new section, we will install a Power BI Gateway and in the next section schedule it to update the REST API information.
<ol>
 	<li>In the last section, we Published the report. Power BI may ask you to <strong>SIGN IN.</strong>
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/sign-in-power-bi.png"><img loading="lazy" decoding="async" class="size-full wp-image-2879" src="https://zappysys.com/blog/wp-content/uploads/2018/03/sign-in-power-bi.png" alt="Sign in Power BI" width="762" height="361" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/sign-in-power-bi.png 762w, https://zappysys.com/blog/wp-content/uploads/2018/03/sign-in-power-bi-300x142.png 300w" sizes="(max-width: 762px) 100vw, 762px" /></a>
<p class="wp-caption-text">Sign in in Power BI</p>

</div></li>
 	<li>Select the Workspace and select Datasets
<div class="wp-caption">

[caption id="attachment_10110" align="alignnone" width="702"]<a href="https://zappysys.com/blog/wp-content/uploads/2019/01/power-bi-my-workspace-dataset.png"><img loading="lazy" decoding="async" class="wp-image-10110 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/power-bi-my-workspace-dataset.png" alt="power-bi-my-workspace-dataset" width="702" height="372" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/power-bi-my-workspace-dataset.png 702w, https://zappysys.com/blog/wp-content/uploads/2019/01/power-bi-my-workspace-dataset-300x159.png 300w" sizes="(max-width: 702px) 100vw, 702px" /></a> Go to workspace and dataset[/caption]
<p class="wp-caption-text">Go to workspace and dataset</p>

</div></li>
 	<li>Right-click the report and select <strong>Settings</strong>.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/report-power-bi-settings.png"><img loading="lazy" decoding="async" class="size-full wp-image-2877" src="https://zappysys.com/blog/wp-content/uploads/2018/03/report-power-bi-settings.png" alt="Define settings for Power BI report" width="535" height="325" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/report-power-bi-settings.png 535w, https://zappysys.com/blog/wp-content/uploads/2018/03/report-power-bi-settings-300x182.png 300w" sizes="(max-width: 535px) 100vw, 535px" /></a>
<p class="wp-caption-text">Specify settings for the report</p>

</div></li>
 	<li>The system will ask for a Gateway. Stay here.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/add-power-bi-gateway.png"><img loading="lazy" decoding="async" class="size-full wp-image-2862" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-power-bi-gateway.png" alt="add power bi gateway" width="1068" height="380" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/add-power-bi-gateway.png 1068w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-power-bi-gateway-300x107.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-power-bi-gateway-768x273.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-power-bi-gateway-1024x364.png 1024w" sizes="(max-width: 1068px) 100vw, 1068px" /></a>
<p class="wp-caption-text">Add Power BI Gateway</p>

</div></li>
 	<li>Use the following link to install a Data Gateway:
<pre class="lang:php highlight:0 decode:true">https://docs.microsoft.com/en-us/power-bi/service-gateway-onprem</pre>
</li>
 	<li>Run the installer and press <strong>Next</strong>
<div class="wp-caption">

<img loading="lazy" decoding="async" class="size-full wp-image-2888" src="https://zappysys.com/blog/wp-content/uploads/2018/03/on-premises-gateway-installer-PB.png" alt="Initial gateway window for installation" width="634" height="504" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/on-premises-gateway-installer-PB.png 634w, https://zappysys.com/blog/wp-content/uploads/2018/03/on-premises-gateway-installer-PB-300x238.png 300w" sizes="(max-width: 634px) 100vw, 634px" />
<p class="wp-caption-text">Gateway installer</p>

</div></li>
 	<li>Select the option On-premises data gateway (recommended). This option allows access to multiple users and can be used by more applications than Power BI.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/choose-power-bi-on-premises-data-pb.png"><img loading="lazy" decoding="async" class="size-full wp-image-2889" src="https://zappysys.com/blog/wp-content/uploads/2018/03/choose-power-bi-on-premises-data-pb.png" alt="Choose Power BI gateway" width="631" height="501" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/choose-power-bi-on-premises-data-pb.png 631w, https://zappysys.com/blog/wp-content/uploads/2018/03/choose-power-bi-on-premises-data-pb-300x238.png 300w" sizes="(max-width: 631px) 100vw, 631px" /></a>
<p class="wp-caption-text">Choose Power BI option</p>

</div></li>
 	<li>The installer will show a warning message.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-warning-PB-msg.png"><img loading="lazy" decoding="async" class="size-full wp-image-2891" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-warning-PB-msg.png" alt="Warning message gateway installation" width="628" height="447" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-warning-PB-msg.png 628w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-warning-PB-msg-300x214.png 300w" sizes="(max-width: 628px) 100vw, 628px" /></a>
<p class="wp-caption-text">Warning message during installation</p>

</div></li>
 	<li>Select the path to install and check the I accept the terms.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-accept.png"><img loading="lazy" decoding="async" class="size-full wp-image-2916" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-accept.png" alt="accept terms" width="636" height="441" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-accept.png 636w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-accept-300x208.png 300w" sizes="(max-width: 636px) 100vw, 636px" /></a>
<p class="wp-caption-text">Accept terms</p>

</div></li>
 	<li>Specify the email address to use the gateway.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-email-address.png"><img loading="lazy" decoding="async" class="size-full wp-image-2895" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-email-address.png" alt="Register email in gateway installation" width="627" height="578" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-email-address.png 627w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-installation-email-address-300x277.png 300w" sizes="(max-width: 627px) 100vw, 627px" /></a>
<p class="wp-caption-text">Register email address</p>

</div></li>
 	<li>After entering the email, write the gateway name and a recovery key. Make sure to confirm the recovery key.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-name-recovery-key-confirm.png"><img loading="lazy" decoding="async" class="size-full wp-image-2896" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-name-recovery-key-confirm.png" alt="Specify name and recovery key" width="629" height="487" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-name-recovery-key-confirm.png 629w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-gateway-name-recovery-key-confirm-300x232.png 300w" sizes="(max-width: 629px) 100vw, 629px" /></a>
<p class="wp-caption-text">Enter recovery key</p>

</div></li>
</ol>
&nbsp;</div>
<div class="content_block" id="custom_post_widget-5892"><h2>Manage gateways and configure the schedule</h2>
Once that the gateway is installed we will configure it and add the connection strings.
<ol>
 	<li>The next step is to go to manage gateway
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-go-to-manage-gateway.png"><img loading="lazy" decoding="async" class="size-full wp-image-2912" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-go-to-manage-gateway.png" alt="Power BI - Manage Gateway Setting" width="1068" height="380" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-go-to-manage-gateway.png 1068w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-go-to-manage-gateway-300x107.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-go-to-manage-gateway-768x273.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-go-to-manage-gateway-1024x364.png 1024w" sizes="(max-width: 1068px) 100vw, 1068px" /></a>
<p class="wp-caption-text">Power BI - Manage Gateway Setting</p>

</div></li>
 	<li>In order to get the connection string, we will need the connection string of the ZappySys JSON Driver. In the first section of this post, we explained how to configure it. Press<strong> Copy Connection String</strong>
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-data-source-copy-connection-string.png"><img loading="lazy" decoding="async" class="size-full wp-image-2866" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-data-source-copy-connection-string.png" alt="ZappySys connection properties" width="607" height="599" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-data-source-copy-connection-string.png 607w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-data-source-copy-connection-string-300x296.png 300w" sizes="(max-width: 607px) 100vw, 607px" /></a>
<p class="wp-caption-text">Connection properties</p>

</div></li>
 	<li>Once that the data is copied, add a New data Source. In <strong>Data Source Name</strong>, enter the Data Source Name of the ZappySys JSON driver in step 13 and in Data Source Type, select ODBC. In connection string copy and paste from the clipboard of the step 13 and press <strong>Add</strong>.
<div class="wp-caption">

[caption id="attachment_10113" align="alignnone" width="720"]<a href="https://zappysys.com/blog/wp-content/uploads/2019/01/gateway-data-source-name-connection-string.png"><img loading="lazy" decoding="async" class="wp-image-10113 size-large" src="https://zappysys.com/blog/wp-content/uploads/2019/01/gateway-data-source-name-connection-string-1024x536.png" alt="gateway-data-source-name-connection-string" width="720" height="377" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/gateway-data-source-name-connection-string-1024x536.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/01/gateway-data-source-name-connection-string-300x157.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/gateway-data-source-name-connection-string-768x402.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/01/gateway-data-source-name-connection-string.png 1043w" sizes="(max-width: 720px) 100vw, 720px" /></a> ZappySys connection properties in Power BI[/caption]
<p class="wp-caption-text">ZappySys connection properties in Power BI</p>

</div></li>
 	<li>Once added the gateway. You can see the schedule refresh to <strong>On </strong>and Add another time to add the time where you want to refresh the data.
<div class="wp-caption">

<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-schedule.png"><img loading="lazy" decoding="async" class="size-full wp-image-2875" src="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-schedule.png" alt="Schedule gateway" width="451" height="401" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-schedule.png 451w, https://zappysys.com/blog/wp-content/uploads/2018/03/power-bi-schedule-300x267.png 300w" sizes="(max-width: 451px) 100vw, 451px" /></a>
<p class="wp-caption-text">Schedule gateway</p>

</div></li>
</ol>
&nbsp;</div>
<h2>Conclusion</h2>
<p style="text-align: justify;">Today we learned how to call Microsoft Graph API methods using <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> and load response data into Power BI without any ETL procedures. Particularly, we used OneDrive, Calendar and OneNote Graph API endpoints to achieve that. We created two ODBC data sources based on JSON and XML ODBC Driver to query those endpoints, which let us read data directly in a Power BI report. Finally, we examined how to refresh data source on Power BI using on-premises Power BI gateway.</p>
<h2>References</h2>
<p><a href="https://powerbi.microsoft.com/en-us/" target="_blank" rel="noopener">https://powerbi.microsoft.com/en-us/</a></p>
<p><a href="https://apps.dev.microsoft.com/" target="_blank" rel="noopener">https://apps.dev.microsoft.com/</a></p>
<p><a href="https://developer.microsoft.com/en-us/graph/graph-explorer/" target="_blank" rel="noopener">https://developer.microsoft.com/en-us/graph/graph-explorer/</a></p>
<p><a href="https://docs.microsoft.com/en-us/graph/overview" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/graph/overview</a></p>
<p><a href="https://docs.microsoft.com/en-us/graph/onedrive-concept-overview" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/graph/onedrive-concept-overview</a></p>
<p><a href="https://docs.microsoft.com/en-us/graph/outlook-calendar-concept-overview" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/graph/outlook-calendar-concept-overview</a></p>
<p><a href="https://docs.microsoft.com/en-us/graph/integrate-with-onenote" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/graph/integrate-with-onenote</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/get-office-365-data-in-power-bi-using-microsoft-graph-api-and-odbc/">Get Office 365 data in Power BI using Microsoft Graph API and ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Push data into a Power BI dataset from SQL Server</title>
		<link>https://zappysys.com/blog/push-data-into-power-bi-dataset-from-sql-server/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 27 Nov 2018 16:31:05 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[T-SQL (SQL Server)]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[power bi]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[sql server]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5408</guid>

					<description><![CDATA[<p>Introduction In this article, you will learn how to push data into a Power BI dataset from SQL Server. Power BI is a Microsoft reporting product that can get data from virtually any source and display it nicely in a report or a dashboard. Among its dataset types, it has a streaming dataset into which [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/push-data-into-power-bi-dataset-from-sql-server/">Push data into a Power BI dataset from SQL Server</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="alignleft wp-image-3951" src="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310-150x150.png" alt="Power BI Integration" width="100" height="100" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310.png 310w" sizes="(max-width: 100px) 100vw, 100px" />In this article, you will learn how to push data into a <a href="https://powerbi.microsoft.com/en-us/" target="_blank" rel="noopener">Power BI</a> dataset from SQL Server. Power BI is a Microsoft reporting product that can get data from virtually any source and display it nicely in a report or a dashboard. Among its dataset types, it has a streaming dataset into which you can push data from a <a href="https://docs.microsoft.com/en-us/rest/api/power-bi/" target="_blank" rel="noopener">Power BI REST API</a>. Once pushed, data will be immediately refreshed in a visual, pinned to a dashboard. Thus this approach of sending data to a streaming dataset is a perfect way for displaying real-time data. Yet it is not possible to push data to a dataset straight from SQL Server out of the box. However, with <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> it is possible to achieve that quite easily. We will employ one of its apps &#8211; <a href="https://zappysys.com/products/odbc-powerpack/data-gateway/" target="_blank" rel="noopener">ZappySys Data Gateway</a> &#8211; to make HTTP requests and push data to a streaming dataset.</p>
<p>The use cases when you may want to push data to a streaming dataset from a SQL Server are:</p>
<ul>
<li>Displaying real-time data from many SQL Server instances at once (and you cannot use the <em>DirectQuery</em> option in a report).</li>
<li>Displaying real-time data when many sources write to a dataset, and a SQL Server is one of them.</li>
<li>Any other case.</li>
</ul>
<p>Let&#8217;s begin and write some data to a Power BI streaming dataset!</p>
<h2>Prerequisites</h2>
<ol>
<li>You have a Power BI account and you have basic Power BI skills.</li>
<li>SQL Server instance installed (can be a <a href="https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-2016-express-localdb" target="_blank" rel="noopener">SQL Server Express LocalDB</a> instance).</li>
<li><a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms" target="_blank" rel="noopener">SQL Server Management Studio</a> (SSMS) installed.</li>
<li><a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed (must be installed on a Windows machine; can be a different machine than SQL Server is installed on).</li>
</ol>
<h2>Step By Step &#8211; Push data into a Power BI dataset from a SQL Server</h2>
<div class="content_block" id="custom_post_widget-5441"><h3>Create a streaming dataset in Power BI</h3>
The first thing you need to do is to create a streaming dataset. We will create a simple dataset for demo purposes which will have two columns: <strong>Timestamp</strong> and <strong>Temperature</strong>.
<ol style="margin-left: 0;">
 	<li>Go to Power BI portal, hit <strong>My Workspace</strong>, <strong>+ Create</strong> and then click <strong>Streaming dataset</strong>:
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-5424" src="https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-streaming-dataset-1.png" alt="" width="945" height="443" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-streaming-dataset-1.png 945w, https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-streaming-dataset-1-300x141.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-streaming-dataset-1-768x360.png 768w" sizes="(max-width: 945px) 100vw, 945px" /></li>
 	<li>Then select <strong>API</strong> and click <strong>Next</strong>:
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-5425" src="https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-streaming-dataset-2-select-api.png" alt="" width="550" height="419" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-streaming-dataset-2-select-api.png 550w, https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-streaming-dataset-2-select-api-300x229.png 300w" sizes="(max-width: 550px) 100vw, 550px" /></li>
 	<li>Give dataset a name, add two columns and check <strong>Historic data analysis</strong> to enable data history and the ability to create report easily (otherwise you will be able to create a tile in a dashboard only):
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-5426" src="https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-streaming-dataset-3-give-a-name.png" alt="" width="550" height="740" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-streaming-dataset-3-give-a-name.png 550w, https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-streaming-dataset-3-give-a-name-223x300.png 223w" sizes="(max-width: 550px) 100vw, 550px" /></li>
 	<li>Once a dataset is created, copy <strong>Push URL</strong> to a notepad so we can use it later. Also, note the structure of the JSON we will have to use to submit live data into the created dataset:<img loading="lazy" decoding="async" class="alignnone size-full wp-image-5427" src="https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-streaming-dataset-4-created.png" alt="" width="547" height="462" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-streaming-dataset-4-created.png 547w, https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-streaming-dataset-4-created-300x253.png 300w" sizes="(max-width: 547px) 100vw, 547px" /></li>
</ol></div>
<div class="content_block" id="custom_post_widget-5411"><h3><span style="font-size: 14pt;">Configure ZappySys Data Gateway</span></h3>
Now let's look at steps to configure Data Gateway after installation.
<ol style="margin-left: 0;">
 	<li style="text-align: left;">Assuming you have installed <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> using default options (Which also enables Data Gateway Service)</li>
 	<li style="text-align: left;">Search "Gateway" in your start menu and click ZappySys Data Gateway
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png" alt="Open ZappySys Data Gateway" /></a>
<p class="wp-caption-text">Opening ZappySys Data Gateway</p>

</div></li>
 	<li>First, make sure Gateway Service is running (Verify Start icon is disabled)</li>
 	<li>Also, verify Port on General Tab
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/ZappySys-data-gateway-port-5000.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/03/ZappySys-data-gateway-port-5000.png" alt="Port Number setting on ZappySys Data Gateway" /></a>
<p class="wp-caption-text">Checking port number setting on ZappySys Data Gateway</p>

</div></li>
 	<li>Now go to Users tab. <strong>Click Add</strong> icon to add a new user. Check Is admin to give access to all data sources you add in future. If you don't check admin then you have to manually configure user permission for each data source.
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-user.png">
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-5453" src="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-configure-add-user.png" alt="" width="564" height="438" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-configure-add-user.png 564w, https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-configure-add-user-300x233.png 300w" sizes="(max-width: 564px) 100vw, 564px" /></a>
<p class="wp-caption-text">Adding the Gateway user</p>

</div></li>
</ol>
&nbsp;</div>
<h3>Add a data source in the Gateway</h3>
<p>It&#8217;s time to add a data source, which we will use to POST data to Power BI REST API:</p>
<ol>
<li>In the Gateway, click on <strong>Data sources</strong> tab, click <strong>Add</strong>, give data source a name and set <em>Connector Type</em> to <strong>Native &#8211; ZappySys JSON Driver</strong>:<img loading="lazy" decoding="async" class="alignnone size-full wp-image-5439" src="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-1-1.png" alt="" width="562" height="573" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-1-1.png 562w, https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-1-1-294x300.png 294w" sizes="(max-width: 562px) 100vw, 562px" /></li>
<li>Then click <strong>Edit</strong> to modify the data source:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-5440" src="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-2-2.png" alt="" width="562" height="385" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-2-2.png 562w, https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-2-2-300x206.png 300w" sizes="(max-width: 562px) 100vw, 562px" /></li>
<li>Finally, paste into <em>Url </em>textbox <strong>Push URL</strong> of the dataset which we saved in a previous step. Also, set <em>HTTP Request Method</em> to <strong>POST</strong>:
<div id="attachment_5430" style="width: 812px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5430" class="wp-image-5430 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-3.png" alt="Configure REST API Connection for Power BI dataset insert (Using ZappySys JSON / REST Driver)" width="802" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-3.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-3-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-3-768x672.png 768w" sizes="(max-width: 802px) 100vw, 802px" /><p id="caption-attachment-5430" class="wp-caption-text">Configure REST API Connection for Power BI dataset insert (Using ZappySys JSON / REST Driver)</p></div></li>
</ol>
<h3>Add a Linked Server to the Gateway</h3>
<div class="content_block" id="custom_post_widget-5432">Once you configured the data source in Gateway, we can now set up a Linked Server in a SQL Server.
<ol style="margin-left: 10px;">
 	<li>Open SSMS and connect to a SQL Server.</li>
 	<li>Go to Root &gt; Server Objects &gt; Linked Servers node. Right click and click <strong>New Linked Server...
</strong>
<div class="wp-caption alignnone">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/03/create-new-linked-server-ssms.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/03/create-new-linked-server-ssms.png" alt="Add Linked Server in SQL Server" />
</a>
<p class="wp-caption-text">Adding Linked Server in SQL Server</p>

</div></li>
 	<li>Now enter the linked server name, select Provider as SQL Native Client.</li>
 	<li>Enter data source as <strong><span class="lang:default decode:true crayon-inline">GatewayServerName,PORT_NUMBER</span></strong> where server name is where ZappySys Gateway is running (can be the same as SQL Server machine or a remote machine). Default PORT_NUMBER is 5000 but confirm that on the Gateway &gt; General tab in case it's different.</li>
 	<li>Enter Catalog Name. This must match name from Data gateway Data sources grid &gt; Name column
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/ssms-sql-server-configure-linked-server-2.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/ssms-sql-server-configure-linked-server-2.png" alt="Configure Linked Server Provider, Catalog, Server, Port for ZappySys Data Gateway Connection" />
</a>
<p class="wp-caption-text">Configure Linked Server Provider, Catalog, Server, Port for ZappySys Data Gateway Connection</p>
</div>
<div style="color: #31708f;background-color: #d9edf7;border-color: #bce8f1;padding: 15px;margin-bottom: 20px;border: 1px solid transparent;border-radius: 4px;">
<strong>INFO:</strong><br/>
<ul>
    <li>
      For <strong>SQL Server 2012, 2014, 2016, 2017, and 2019</strong>, use the <em>SQL Server Native Client 11.0</em> as the Provider.
    </li>
    <li>
      For <strong>SQL Server 2022 or higher</strong>, use the <em>Microsoft OLE DB Driver for SQL Server</em> as the Provider.
    </li>
  </ul>
</div></li>
 	<li>Click on Security Tab and select the last option "<strong>Be made using this security context</strong>". Enter your gateway user account here.
<div class="wp-caption alignnone">
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-5456" src="https://zappysys.com/blog/wp-content/uploads/2018/11/add-linked-server-sql-server-3-security-2.png" alt="" width="690" height="625" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/add-linked-server-sql-server-3-security-2.png 690w, https://zappysys.com/blog/wp-content/uploads/2018/11/add-linked-server-sql-server-3-security-2-300x272.png 300w" sizes="(max-width: 690px) 100vw, 690px" />
<p class="wp-caption-text">Configuring Linked Server credentials</p>
</li>
<li>
        <p>Optional: Under the Server Options Tab, Enable <b>RPC</b> and <b>RPC Out</b> and Disable Promotion of Distributed Transactions<b>(MSDTC)</b>.</p>
		<div class="wp-caption alignnone">
			<img decoding="async" class="block margin-bottom-10 img-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2018/11/linked-server-options-rpc-msdtc.png" title="RPC and MSDTC Settings" alt="RPC and MSDTC Settings" />
			<p class="wp-caption-text">RPC and MSDTC Settings</p>
		</div>
        <hr />
        <p>
            You need to enable RPC Out if you plan to use <b><i>EXEC(...) AT [MY_LINKED_SERVER_NAME]</i></b> rather than OPENQUERY.
            <br />
            If don't enabled it, you will encounter the <i>'Server "MY_LINKED_SERVER_NAME" is not configured for RPC'</i> error.
        </p>
        <p>
            Query Example:
            <code class="sql">EXEC('Select * from Products') AT [MY_LINKED_SERVER_NAME]</code>
        </p>
        <hr />
        <p>
            If you plan to use <b><i>'INSERT INTO...EXEC(....) AT [MY_LINKED_SERVER_NAME]'</i></b> in that case you need to Disable Promotion of Distributed Transactions(MSDTC).
            <br />
            If don't disabled it, you will encounter the <i>'The operation could not be performed because OLE DB provider "SQLNCLI11/MSOLEDBSQL" for linked server "MY_LINKED_SERVER_NAME" was unable to begin a distributed transaction.'</i> error.
        </p>
        <p>
            Query Example:
<pre class="">Insert Into dbo.Products 
EXEC('Select * from Products') AT [MY_LINKED_SERVER_NAME]</pre>
        </p>
        <hr />
</li>
 	<li>Click OK to save the Linked Server.</li>
</ol></div>
<h3>Writing data into Power BI dataset from SQL Server</h3>
<p>Once you add a Linked Server you can execute a query to push data into a Power BI streaming dataset:</p>
<ol style="margin-left: 0;">
<li>In the same SQL Server Management Studio create a new query and paste the code below. In <em>Body</em> attribute, we pass the JSON in the same format which was shown when we created a Power BI dataset:<br />
<pre class="crayon-plain-tag">SELECT * FROM
OPENQUERY([GATEWAY], 'SELECT * FROM $
WITH (Body=''[ 
	{ "Timestamp" :"2018-11-15T02:57:04.547Z", "Temperature" : 50.5 },
	{ "Timestamp" :"2018-11-16T02:57:04.547Z", "Temperature" : 55.5 },
	{ "Timestamp" :"2018-11-17T02:57:04.547Z", "Temperature" : 60.5 },
	{ "Timestamp" :"2018-11-18T02:57:04.547Z", "Temperature" : 57.5 },
	{ "Timestamp" :"2018-11-19T02:57:04.547Z", "Temperature" : 62.3 }
]''
,meta=''[ { "Name": "Dummy", "Type": "String" }]'' )')</pre>
<div class="su-note"  style="border-color:#e5da9d;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:#fff4b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>Note:</strong> Use the same Linked Server name you created in a previous step. In our case, it is &#8220;GATEWAY&#8221;.</div></div></li>
<li>Execute the query.</li>
</ol>
<h2>The results: creating a Power BI report</h2>
<p>Now it&#8217;s time to check the results and see if data went through:</p>
<ol style="margin-left: 0;">
<li>Go to Power BI portal.</li>
<li>Select <strong>Datasets </strong>and click on the add new report icon:
<div id="attachment_5447" style="width: 705px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5447" class="wp-image-5447 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-report-from-streaming-dataset-1.png" alt="Create new Power BI Report for real time dataset" width="695" height="384" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-report-from-streaming-dataset-1.png 695w, https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-report-from-streaming-dataset-1-300x166.png 300w" sizes="(max-width: 695px) 100vw, 695px" /><p id="caption-attachment-5447" class="wp-caption-text">Create new Power BI Report for real time dataset</p></div></li>
<li>Add a Line Chart, a Table and link them to the dataset.</li>
<li>You should see the data we pushed to the dataset:
<div id="attachment_5448" style="width: 596px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5448" class="wp-image-5448 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-report-from-streaming-dataset-2.png" alt="Showing real time data in Power BI dashboard" width="586" height="343" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-report-from-streaming-dataset-2.png 586w, https://zappysys.com/blog/wp-content/uploads/2018/11/powerbi-create-report-from-streaming-dataset-2-300x176.png 300w" sizes="(max-width: 586px) 100vw, 586px" /><p id="caption-attachment-5448" class="wp-caption-text">Showing real time data in Power BI dashboard</p></div></li>
</ol>
<div class="su-note"  style="border-color:#e5da9d;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:#fff4b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>Note:</strong> To see real-time data, pin a visual to a dashboard. Live data can be seen only in a dashboard since only there data is refreshed when a new piece of data is received. However, it does not work with reports &#8211; if you pin a whole report to a dashboard it won&#8217;t update data in real-time. </div></div>
<h2>Conclusion</h2>
<p style="text-align: justify;">You learned how to push data into a Power BI streaming dataset directly from SQL Server. It was possible to achieve that with ZappySys Data Gateway and SQL Server Linked Server option. At first, we created a streaming dataset in Power BI, then configured a datasource in the Gateway, followed with adding a Linked Server to the Gateway, executed T-SQL query in SSMS and pushed some data to the dataset and finally created a Power BI report to check the received data.</p>
<p style="text-align: justify;">When we set <strong>Historic data analysis</strong> option when creating a dataset, we, in turn, created a dataset of type <strong>Push </strong>(if we left it off, it would be of type <strong>Streaming</strong>). It allowed us to create a report easily on top of it, but it has certain <a href="https://docs.microsoft.com/en-us/power-bi/developer/api-rest-api-limitations" target="_blank" rel="noopener">limitations</a>. Just be aware when using this option and check <a href="https://docs.microsoft.com/en-us/power-bi/service-real-time-streaming" target="_blank" rel="noopener">Power BI service documentation</a> for more info.</p>
<p style="text-align: justify;">Finally, in SSMS, we executed a query with predefined data. Therefore in real life, if you want to push data from an existing table, you will have to build JSON from it. Make sure you construct <a href="https://jsonlint.com/" target="_blank" rel="noopener">a valid JSON</a> and escape the symbols that need to be escaped (<a href="https://www.json.org/" target="_blank" rel="noopener">such as a double-quote or a backslash</a>).</p>
<h2>References</h2>
<p><a href="https://powerbi.microsoft.com/en-us/" target="_blank" rel="noopener">https://powerbi.microsoft.com/en-us/</a></p>
<p><a href="https://docs.microsoft.com/en-us/rest/api/power-bi/" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/rest/api/power-bi/</a></p>
<p><a href="https://docs.microsoft.com/en-us/power-bi/service-real-time-streaming" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/power-bi/service-real-time-streaming</a></p>
<p><a href="https://docs.microsoft.com/en-us/power-bi/developer/api-rest-api-limitations" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/power-bi/developer/api-rest-api-limitations</a></p>
<p>The post <a href="https://zappysys.com/blog/push-data-into-power-bi-dataset-from-sql-server/">Push data into a Power BI dataset from SQL Server</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
