<?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>xml Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/xml/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/xml/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 19 Mar 2025 14:03:33 +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>xml Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/xml/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Export / Create JSON File in Informatica (from SQL Query / Database Tables)</title>
		<link>https://zappysys.com/blog/export-create-json-file-informatica-sql-query-database-tables/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 30 Mar 2023 17:17:30 +0000</pubDate>
				<category><![CDATA[ZappyShell]]></category>
		<category><![CDATA[command line tools]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=10020</guid>

					<description><![CDATA[<p>Introduction In this article, you will learn how to create simple or complex JSON file in Informatica just in a few clicks. We will use the Powerful Export JSON Command line Builder from ZappyShell. Using this Portable / xCopy style command line you can build nested/complex JSON / XML or even CSV from single / [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/export-create-json-file-informatica-sql-query-database-tables/">Export / Create JSON File in Informatica (from SQL Query / Database Tables)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this article, you will learn how to create simple or complex JSON file in Informatica just in a few clicks. We will use the Powerful Export JSON Command line Builder from <a href="https://zappysys.com/products/zappyshell/data-export-command-line-tools-json-excel-csv-pdf/">ZappyShell</a>. Using this Portable / xCopy style command line you can build nested/complex JSON / XML or even CSV from single / multiple SQL Queries as Input or Select Database Tables as Source. Later you can copy generated command line from Tool and execute in any tool like Informatica / Talend / DataStage or Automation Script like Python / PowerShell.</p>
<h2>Prerequisite</h2>
<p>This article assumes you have access to Informatica Developer Tools and basic knowledge of command-line tools.</p>
<ol>
<li><a href="https://zappysys.com/products/zappyshell/">Download ZappyShell</a> Command line utility (Click on Download Button). You can get msi and Zip (Poratble / xCopy version)</li>
<li>If you want to use the Portable version just extract ZappyShell-xCopy zip to some folder lets say (C:\ZappyShell). If you installed MSI then its usually in C:\Program Files (x86)\ZappySys</li>
<li>Double click on DbCommandBuilder.exe <a href="https://zappysys.com/onlinehelp/zappyshell/index.htm#page=db/db.htm">as listed here</a>  to get started. At the end of this exercise, you will be able to generate something like the below JSON File in few clicks in Informatica or any other Tool / Programming Language you prefer which has option to invoke command line&#8230;</li>
<li>For all possible command line options <a href="https://zappysys.com/onlinehelp/zappyshell/scr/db/db-db-export.htm" target="_blank" rel="noopener">Refer this</a></li>
<li>So lets get started</li>
</ol>
<h2>Sample JSON Created by ZappyShell from Informatica</h2>
<p>&nbsp;</p>
<div style="width: 680px" class="wp-caption alignnone"><img fetchpriority="high" decoding="async" class="figureimage" title="Sample JSON Created by Informatica Workflow (Create From Database SQL Query or Tables)" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-output.png" alt="Sample JSON Created by Informatica Workflow (Create From Database SQL Query or Tables)" width="670" height="626" /><p class="wp-caption-text">Sample JSON Created by Informatica Workflow (Create From Database SQL Query or Tables)</p></div>
<h2>Create Command Line to Export JSON File from Database SQL Query / Tables</h2>
<p>In this section, we will see how to build Command Line which you can then execute in Informatica Command Time and later Schedule Export Job to Produce JSON File on a predefined schedule or manually.</p>
<ol>
<li>Open DbCommandBuilder.exe and configure the Connection / Data source(s) <a href="https://zappysys.com/onlinehelp/zappyshell/index.htm#page=db/db.htm">as listed here</a> .<img decoding="async" class="figureimage" title="ZappyShell - Open Installed File or Directory" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/open-zappyshell.png" alt="ZappyShell - Open Installed File or Directory" /></li>
<li>Select JSON Export Option from the Dropdown. You can also choose XML, Excel or CSV<img decoding="async" class="figureimage" title="XML file generate" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-xml.png" alt="XML file generate" /></li>
<li>You can use the Custom Layout Option if you wish to Export using custom Output Layout else just choose tables you like to export or type SQL query.<br />
<img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-layout.png" alt="JSON Custom Layout" /></li>
<li>Configure your Input Dataset(s) (can be SQL Queries or Tables) and define Desired Layout for your Output File.<img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-layout-add-dataset.png" alt="JSON Custom Layout - Add Dataset" /></li>
<li>Here is just an example of how to define an Array for a nested layout in a JSON or XML file.<img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-layout-add-element-in-document-array.png" alt="Layout Editor to define Structure of JSON / XML Output" /></li>
<li>t the end of configuration you may see command line like below (more examples <a href="https://zappysys.com/onlinehelp/zappyshell/scr/db/db-db-export.htm">listed here</a>)<strong>Example: Simple mode Export (Microsoft SQL Server)</strong><br />
<pre class="crayon-plain-tag">db.exe export customers --json -o c:\data\cust.json --connstr "Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;" -y</pre>
<strong>Example: For Simple mode Export (MySQL SQL Server &#8211; ODBC Driver)</strong><br />
<pre class="crayon-plain-tag">export customers --out c:\data\customers.json --json --overwrite --connstr "Driver={MySQL ODBC 5.2 ANSI Driver};Server=your_server_name_or_ip;Port=3306;Uid=user1;pwd=SomeP@ssword;Database=your_db_name"</pre>
<strong><strong>Example: For custom layout mode Export<br />
</strong></strong><br />
<pre class="crayon-plain-tag">export --map c:\data\MySampleMap.xml -o c:\data\customers.json --json --connstr "Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;" -y</pre>
</li>
<li>Once the Command line is created you can click <strong>Run</strong> to test and then copy it into tools like Informatica Command Task (see next section).</li>
</ol>
<h2>Export / Create JSON File In Informatica</h2>
<ol>
<li>Once the command line is prepared (see previous section) we can open Informatica Developer (D)</li>
<li>Connect to your Repository and create a new workflow</li>
<li>Drag new Command Task, from Toolbox and double click to edit
<div id="attachment_10021" style="width: 691px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task.png"><img decoding="async" aria-describedby="caption-attachment-10021" class="size-full wp-image-10021" src="https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task.png" alt="Informatica Command Task" width="681" height="281" srcset="https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task.png 681w, https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task-300x124.png 300w" sizes="(max-width: 681px) 100vw, 681px" /></a><p id="caption-attachment-10021" class="wp-caption-text">Informatica Command Task</p></div></li>
<li>Enter the sample command line we obtained from the previous step</li>
<li>Save the workflow and run it&#8230; That&#8217;s it you will see the JSON file generated</li>
</ol>
<h2>Export / Create XML File In Informatica</h2>
<p>Same Steps as above except choose File format as XML and you will see output like the below once you run the command line.</p>
<div style="width: 905px" class="wp-caption alignnone"><img decoding="async" class="figureimage" title="Export / Create XML File In Informatica" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-xml.png" alt="Export / Create XML File In Informatica" width="895" height="160" /><p class="wp-caption-text">Export / Create XML File In Informatica</p></div>
<h2>Export / Create CSV File In Informatica</h2>
<p>Same Steps as above except choose File format as CSV and you will see output like the below once you run the command line.</p>
<div style="width: 817px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="figureimage" title="Generate CSV Files in Informatica" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-csv-output.png" alt="Generate CSV Files in Informatica" width="807" height="507" /><p class="wp-caption-text">Generate CSV Files in Informatica</p></div>
<h2>Export / Create Excel File In Informatica</h2>
<p>Same Steps as above except choose File format as Excel and you will see output like the below once you run the command line.</p>
<p><img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/export-sql-server-table-to-excel-split-by-column.png" alt="Export SQL Server Table to Excel files (split automatically using group by column)" /></p>
<h2>Conclusion</h2>
<p>In this post, we just saw how easy it is to generate JSON / XML / Excel or CSV files in tools like Informatica, Talend, python, PowerShell in few clicks without coding. You can schedule job to generate JSON / XML files from Database tables or SQL Query. <a href="https://zappysys.com/products/zappyshell/download/">Download ZappyShell</a> Today and try it to see what else you can do with it.</p>
<p>The post <a href="https://zappysys.com/blog/export-create-json-file-informatica-sql-query-database-tables/">Export / Create JSON File in Informatica (from SQL Query / Database Tables)</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>Parse XML string into multiple columns and rows using SSIS</title>
		<link>https://zappysys.com/blog/parse-xml-string-multiple-columns-rows-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 17 Aug 2019 09:15:15 +0000</pubDate>
				<category><![CDATA[SSIS XML Parser Transform]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7788</guid>

					<description><![CDATA[<p>Introduction In our previous blog we saw How to export XML from SQL Server using SSIS. Now in this blog, we will Parse XML string into multiple columns and rows using SSIS XML Parser Transform can (Helpful to extract data from raw XML string stored as database column or coming from other source). Ability to de-normalize nested XML [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/parse-xml-string-multiple-columns-rows-using-ssis/">Parse XML string into multiple columns and rows 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/08/ssis-xml-parser-transform.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-7790 size-full alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-xml-parser-transform.png" alt="SSIS XML Parser Transform" width="128" height="128" /></a>In our previous blog we saw <a href="https://zappysys.com/blog/tutorial-create-xml-in-ssis-export-xml-file-output/" target="_blank" rel="noopener">How to export XML from SQL Server using SSIS</a>. Now in this blog, we will Parse XML string into multiple columns and rows using SSIS <a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-parser-transform/" target="_blank" rel="noopener">XML Parser Transform</a> can (Helpful to extract data from raw XML string stored as database column or coming from other source). Ability to de-normalize nested XML data into flat structure. Support for expression to extract nested data and convert single node into multiple rows (e.g. extract orders from customer document using expression $.Customer.Orders[*])</p>
<p>In nutshell, this post will focus on how to Parse XML string into multiple columns and rows using respective XML Parser Transform.</p>
<p>&nbsp;</p>
<h2>Prerequisite</h2>
<ol>
<li>First, you will need to have SSIS installed</li>
<li>Secondly, make sure to have SSDT</li>
<li>Finally, do not forget to install ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a></li>
</ol>
<h2>How to Extract Data from SQL Server Table and Parse xml string into multiple columns and rows.</h2>
<p>Let´s start with an example. In this SSIS XML Parser Transform example, we will Parse database column string into multiple columns and rows.</p>
<ol>
<li>First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
<div id="attachment_7934" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="size-full wp-image-7934" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-7934" class="wp-caption-text">Drag and Drop : SSIS Data Flow Task from SSIS Toolbox</p></div></li>
<li>Furthermore, drag and drop the OLE DB Source.
<div id="attachment_7289" style="width: 515px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7289" class="size-full wp-image-7289" src="https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop.png" alt="OLE DB Source - Drag and Drop" width="505" height="190" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop.png 505w, https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop-300x113.png 300w" sizes="(max-width: 505px) 100vw, 505px" /></a><p id="caption-attachment-7289" class="wp-caption-text">OLE DB Source &#8211; Drag and Drop</p></div></li>
<li>Double click on OLE DB Source for configure it and click on OK.
<div style="width: 515px" class="wp-caption aligncenter"><a href="https://i2.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-oledb-source-editor-manager.png"><img loading="lazy" decoding="async" class="size-full wp-image-7289" src="https://i2.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-oledb-source-editor-manager.png" alt="Configure OLE DB Source Editor" width="505" height="190" /></a><p class="wp-caption-text">Configure OLE DB Source Editor</p></div></li>
<li>Now drag and drop XML Parser Transform and connect it with the ole db source.</li>
<li>Double click on XML Parser Transform and select that column from the drop down and enter sample data and click on Preview.
<div id="attachment_7793" style="width: 643px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-xml-parser-transform-confihuration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7793" class="size-full wp-image-7793" src="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-xml-parser-transform-confihuration.png" alt="SSIS XML Parser Transform – Parse XMl Document" width="633" height="533" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-xml-parser-transform-confihuration.png 633w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-xml-parser-transform-confihuration-300x253.png 300w" sizes="(max-width: 633px) 100vw, 633px" /></a><p id="caption-attachment-7793" class="wp-caption-text">SSIS XML Parser Transform – Parse XML Document</p></div></li>
<li>That&#8217;s it, now you can use that data in desire destination.
<div id="attachment_7793" style="width: 643px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/xml-parser-transform/ssis-xml-parser-transform-convert-xml-to-csv.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7793" class="size-full wp-image-7793" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/xml-parser-transform/ssis-xml-parser-transform-convert-xml-to-csv.png" alt="SSIS XML Parser Transform – Parse XMl Document" width="633" height="533" /></a><p id="caption-attachment-7793" class="wp-caption-text">SSIS XML Parser Transform – Parse XML Document, Convert XML to CSV or save to RDBMS (e.g. SQL Server, MySQL)</p></div></li>
</ol>
<div class="mceTemp"></div>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>After all, we saw you how to Parse string into multiple columns and rows using SSIS XML Parser Transform from SQL Server Table using OLE DB Connection. To explore many other scenarios not discussed in this article download <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack from here (includes 70+ Components)</a>.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following URL for more information.</p>
<ul>
<li>Help File: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-xml-parser-transform.htm" target="_blank" rel="noopener">XML Parser Transform</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/parse-xml-string-multiple-columns-rows-using-ssis/">Parse XML string into multiple columns and rows using SSIS</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>Import Azure Blob files into SQL Server (CSV/JSON/XML Driver)</title>
		<link>https://zappysys.com/blog/import-azure-blob-files-sql-server-csv-json-xml-driver/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 07 Aug 2019 15:52:30 +0000</pubDate>
				<category><![CDATA[Azure Blob CSV Driver]]></category>
		<category><![CDATA[Azure Blob JSON Driver]]></category>
		<category><![CDATA[Azure Blob XML Driver]]></category>
		<category><![CDATA[ODBC Drivers]]></category>
		<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[blob]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[linked server]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7638</guid>

					<description><![CDATA[<p>Introduction There might be a case when you have many CSV, JSON or XML files in Azure Blob 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 Azure [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-azure-blob-files-sql-server-csv-json-xml-driver/">Import Azure Blob 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-7639 size-thumbnail alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/08/blob-to-sql-150x150.png" alt="" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/blob-to-sql-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/08/blob-to-sql-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/blob-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 Azure Blob 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 Azure Blob CSV, Azure Blob JSON and Azure Blob XML drivers that let you connect to an Azure Storage Explorer and read the contents from the files in the Container. Bringing in ZappySys Data Gateway allows doing that right from a SQL Server. Let&#8217;s begin and see how to Import Azure Blob files into SQL Server (CSV/JSON/XML Driver).</p>
<p>These drivers are related to this article:</p>
<div class="content_block" id="custom_post_widget-7641"><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/odbc-powerpack/odbc-azure-blob-csv-driver.png" alt="Azure Blob CSV Driver" 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/azure-blob-odbc-driver-csv-files/" target="_blank" rel="noopener">Azure Blob Driver (for CSV Files)</a></div>
</div></div>
<div class="content_block" id="custom_post_widget-7643"><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://zappysys.com/images/odbc-powerpack/odbc-azure-blob-json-driver.png" alt="Azure Blob JSON Driver" 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/azure-blob-odbc-driver-json-files/" target="_blank" rel="noopener">Azure Blob Driver (for JSON Files)</a></div>
</div></div>
<div class="content_block" id="custom_post_widget-7645"><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/odbc-powerpack/odbc-azure-blob-xml-driver.png" alt="Azure Blob XML Driver" 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/azure-blob-odbc-driver-xml-files/" target="_blank" rel="noopener">Azure Blob Driver (for XML Files)</a></div>
</div></div>
<h2>Prerequisites</h2>
<ol>
<li>Firstly, Download and install <a href="https://go.microsoft.com/fwlink/?LinkId=717179&amp;clcid=0x4009" target="_blank" rel="noopener">Microsoft Azure Storage Emulator</a> and <a href="https://azure.microsoft.com/en-us/features/storage-explorer/" target="_blank" rel="noopener">Microsoft Azure Storage Explorer.</a></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>
<p><strong>NOTE:</strong> If you want to use Live account (Azure Storage) then you can skip Step #3</p>
<h2>Getting started</h2>
<p>In order to start, we will show several examples. ZappySys includes Data Gateway that will help you in reading data of Azure Blob files. Here we are showing you is, how to Import Azure Blob files into SQL Server (CSV/JSON/XML Driver).</p>
<p>You can connect to Azure Storage Service from SSIS, you will need Storage Account Name and Access Key. Ask your SysAdmin or responsible person to provide that information to you. <a href="https://zappysys.com/forums/topic/azure-blob-storage-how-to-create-new-storage-account-and-get-access-key/" target="_blank" rel="noopener">Click here</a> to read more about how to get your Storage Account Name and Access Key. Here are sample Credentials.</p><pre class="crayon-plain-tag">Account Name: mystorageaccount
Access Key: Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==</pre><p>
If you don&#8217;t have Azure Storage account then you can try offline mode on your local machine. You can just <a href="http://www.microsoft.com/en-us/download/details.aspx?id=42317" target="_blank" rel="noopener">download Azure Storage Emulator</a> and start testing.</p>
<h2><span id="Setup_Azure_Storage_client_tools_and_Create_Queue"><span id="Setup_Azure_Storage_client_tools">Setup Azure Storage Explorer</span></span></h2>
<p>Setup Azure Storage client tools we will start from a simple example of how to load Invoice Data from a CSV that is located in Azure Blob, then we will load JSON contacts data from them and finally, we will proceed by loading contacts from many XML files those are compressed in ZIP.</p>
<ol>
<li>Once you have <a href="https://go.microsoft.com/fwlink/?LinkId=717179&amp;clcid=0x4009" target="_blank" rel="noopener">downloaded and installed storage emulator</a> You can launch Microsoft Azure Storage Emulator from its Physical location or from the desktop or start menu shortcut.
<div id="attachment_3631" class="wp-caption aligncenter">
<p><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-emulator-location.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-3631 size-full" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-emulator-location.png?resize=720%2C79&amp;ssl=1" alt="Azure Storage Emulator Physical Location" width="643" height="70" srcset="https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-emulator-location.png 859w, https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-emulator-location-300x33.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-emulator-location-768x84.png 768w" sizes="(max-width: 643px) 100vw, 643px" /></a></p>
<p class="wp-caption-text">Azure Storage Emulator Physical Location</p>
</div>
</li>
<li>If you can see the below-attached Command Prompt screen after Emulator started. Then you can proceed to start Microsoft Azure Storage Explorer as the Azure Storage Emulator is started successfully.
<div id="attachment_3633" class="wp-caption aligncenter">
<p><a href="https://i2.wp.com/zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-emulator-screen-after-started-e1552723801433.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-3633 size-full" src="https://i2.wp.com/zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-emulator-screen-after-started-e1552723801433.png?resize=700%2C237&amp;ssl=1" alt="Command Prompt Screen after Microsoft Azure Storage Emulator Started" width="643" height="218" /></a></p>
<p class="wp-caption-text">Command Prompt Screen after Microsoft Azure Storage Emulator Started</p>
</div>
</li>
<li>Now, you have to <a href="https://azure.microsoft.com/en-us/features/storage-explorer/" target="_blank" rel="noopener">download and install Microsoft Azure Storage Explorer</a> and then you can launch Microsoft Azure Storage Explorer from its Physical location or from the desktop or start menu shortcut.
<div id="attachment_3635" class="wp-caption aligncenter">
<p><a href="https://i0.wp.com/zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-explorer-location.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-3635 size-full" src="https://i0.wp.com/zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-explorer-location.png?resize=720%2C84&amp;ssl=1" alt="Microsoft Azure Storage Explorer Location" width="643" height="75" srcset="https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-explorer-location.png 827w, https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-explorer-location-300x35.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-explorer-location-768x90.png 768w" sizes="(max-width: 643px) 100vw, 643px" /></a></p>
<p class="wp-caption-text">Microsoft Azure Storage Explorer Location.</p>
</div>
</li>
<li>For Creating a Blob Container, First of all, you need to go to Microsoft Storage Explorer Window. Then you can go through like this way (Storage Accounts –&gt; (Development) –&gt; Blob Containers).
<div id="attachment_3637" style="width: 556px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-explorer-create-blob-container-e1552723740747.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3637" class="size-full wp-image-3637" src="https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-explorer-create-blob-container-e1552723740747.png" alt="Microsoft Azure Storage Explorer : Create Blob Container" width="546" height="584" srcset="https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-explorer-create-blob-container-e1552723740747.png 546w, https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-explorer-create-blob-container-e1552723740747-280x300.png 280w" sizes="(max-width: 546px) 100vw, 546px" /></a><p id="caption-attachment-3637" class="wp-caption-text">Microsoft Azure Storage Explorer: Create a Blob Container</p></div></li>
</ol>
<h2><span style="font-size: 14pt;">Open and Configure ZappySys Data Gateway</span></h2>
<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>
<h2>Import CSV file located at Azure Blob into SQL Server</h2>
<h3>Overview</h3>
<p>Let&#8217;s say you have CSV file that is located in Azure Blob Container, and you want them all data into your SQL Server. We will follow the same steps for that we will do for import JSON and XML file into SQL Server.</p>
<div id="attachment_7719" style="width: 612px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/azure-blob-csv-file-list.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7719" class="wp-image-7719 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/azure-blob-csv-file-list.png" alt="Azure Blob Container - CSV File Located" width="602" height="418" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/azure-blob-csv-file-list.png 602w, https://zappysys.com/blog/wp-content/uploads/2019/08/azure-blob-csv-file-list-300x208.png 300w" sizes="(max-width: 602px) 100vw, 602px" /></a><p id="caption-attachment-7719" class="wp-caption-text">Azure Blob Container &#8211; CSV File Located</p></div>
<h3>Create an Azure Blob CSV 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. In the Data Source tab, Just click on <strong>Add</strong> button, give the data source a name, e.g. &#8220;<strong>MyInvoiceCSV</strong>&#8220;, and then select <strong>Native &#8211; ZappySys Azure Blob CSV Driver</strong><strong>.</strong>
<div id="attachment_7746" style="width: 572px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/azure-blob-csv-data-source-e1565697707852.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7746" class="wp-image-7746 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/azure-blob-csv-data-source-e1565697707852.png" alt="Create Data Source - Azure Blob CSV Driver" width="562" height="539" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/azure-blob-csv-data-source-e1565697707852.png 562w, https://zappysys.com/blog/wp-content/uploads/2019/08/azure-blob-csv-data-source-e1565697707852-300x288.png 300w" sizes="(max-width: 562px) 100vw, 562px" /></a><p id="caption-attachment-7746" class="wp-caption-text">Create Data Source &#8211; Azure Blob CSV Driver</p></div></li>
<li>Then click on <strong>Edit</strong> and add the Data Gateway user you created in the <strong>Users</strong> tab. We will use this user later when adding a Linked Server to the Data Gateway to authenticate:<img loading="lazy" decoding="async" class="size-full wp-image-7864 aligncenter" src="https://zappysys.com/blog/wp-content/uploads/2019/08/import-csv-from-azure-blob-storage-to-sql-server-add-user.png" alt="" width="681" height="629" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/import-csv-from-azure-blob-storage-to-sql-server-add-user.png 681w, https://zappysys.com/blog/wp-content/uploads/2019/08/import-csv-from-azure-blob-storage-to-sql-server-add-user-300x277.png 300w" sizes="(max-width: 681px) 100vw, 681px" /></li>
<li>Now, click on the Edit button to configure &#8220;<strong>MyInvoiceCSV</strong>&#8221; Azure Blob CSV Data Source.
<div id="attachment_7722" style="width: 572px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/edit-azure-blob-csv-data-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7722" class="wp-image-7722 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/edit-azure-blob-csv-data-source.png" alt="Configure Data Gateway" width="562" height="539" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/edit-azure-blob-csv-data-source.png 562w, https://zappysys.com/blog/wp-content/uploads/2019/08/edit-azure-blob-csv-data-source-300x288.png 300w" sizes="(max-width: 562px) 100vw, 562px" /></a><p id="caption-attachment-7722" class="wp-caption-text">Configure Data Gateway</p></div></li>
<li>When a window open, click on <strong>Click here to Configure the Connection</strong> and select Use the Microsoft Azure Storage Emulator. If you have Online <em>Storage Account</em> and <em><em>Account Key </em></em>then Select Enter Storage Account Credentials and enter it.<em><em><br />
</em></em></p>
<div style="width: 503px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/images/azure-blob-json-driver/azure-blob-json-driver-create-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/odbc-powerpack/scr/images/azure-blob-json-driver/azure-blob-json-driver-create-connection.png" alt="Create Azure Storage Connection" width="493" height="499" /></a><p class="wp-caption-text">Create Azure Storage Connection</p></div></li>
<li>Now, Select Azure Blob Container and file from it and In the Data Format / Compression (Zip / GZip) tab set suitable file Compression Format (Zip or GZip).
<div id="attachment_7721" style="width: 753px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/configure-azure-blob-csv-data-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7721" class="wp-image-7721 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/configure-azure-blob-csv-data-source.png" alt="ZappySys Azure Blob CSV - Configure Driver" width="743" height="623" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/configure-azure-blob-csv-data-source.png 743w, https://zappysys.com/blog/wp-content/uploads/2019/08/configure-azure-blob-csv-data-source-300x252.png 300w" sizes="(max-width: 743px) 100vw, 743px" /></a><p id="caption-attachment-7721" class="wp-caption-text">ZappySys Azure Blob CSV &#8211; Configure Driver</p></div></li>
<li>Go to the <strong>Preview</strong> tab and click on the <strong>Preview Data</strong> button to make sure everything is configured correctly and preview the results.
<div id="attachment_7726" style="width: 753px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/preview-azure-blob-csv-data-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7726" class="wp-image-7726 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/preview-azure-blob-csv-data-source.png" alt="ZappySys Azure Blob CSV - Preview Data" width="743" height="570" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/preview-azure-blob-csv-data-source.png 743w, https://zappysys.com/blog/wp-content/uploads/2019/08/preview-azure-blob-csv-data-source-300x230.png 300w" sizes="(max-width: 743px) 100vw, 743px" /></a><p id="caption-attachment-7726" class="wp-caption-text">ZappySys Azure Blob CSV &#8211; Preview Data</p></div></li>
<li>Now, Click on OK button also Save and Restart Service.
<div id="attachment_7724" style="width: 572px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/save-and-restart-service-data-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7724" class="wp-image-7724 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/save-and-restart-service-data-source.png" alt="ZappySys Data Gateway Service - Save and Restart" width="562" height="539" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/save-and-restart-service-data-source.png 562w, https://zappysys.com/blog/wp-content/uploads/2019/08/save-and-restart-service-data-source-300x288.png 300w" sizes="(max-width: 562px) 100vw, 562px" /></a><p id="caption-attachment-7724" class="wp-caption-text">ZappySys Data Gateway Service &#8211; Save and Restart</p></div></li>
<li>That&#8217;s all, now we are ready to proceed and add a Linked Server to this data source.</li>
</ol>
<h3 id="Set-up-a-SQL-Server-Linked-Server">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>Once again, if you created the Linked Server with name &#8220;GATEWAY&#8221;, execute this SQL query in SSMS:</p>
<p><code>SELECT * INTO MyInvoices FROM OPENQUERY([GATEWAY], 'SELECT * FROM $')<br />
SELECT * FROM MyInvoices</code></p>
<h3>The results</h3>
<p>You should see a similar view, once you execute the query:</p>
<div id="attachment_7862" style="width: 713px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7862" class="wp-image-7862 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/80-import-csv-from-azure-blob-storage-into-sql-server-the-results-data-is-loaded-into-sql-server.png" alt="The results of loading many CSVs from Azure Blob into SQL Server" width="703" height="441" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/80-import-csv-from-azure-blob-storage-into-sql-server-the-results-data-is-loaded-into-sql-server.png 703w, https://zappysys.com/blog/wp-content/uploads/2019/08/80-import-csv-from-azure-blob-storage-into-sql-server-the-results-data-is-loaded-into-sql-server-300x188.png 300w" sizes="(max-width: 703px) 100vw, 703px" /><p id="caption-attachment-7862" class="wp-caption-text">The results of loading many CSVs from Azure Blob into SQL Server</p></div>
<h2>Import JSON file located at Azure Blob into SQL Server</h2>
<h3>Overview</h3>
<p>Let&#8217;s say you have JSON file that is located in Azure Blob Container, and you want them all data into your SQL Server. We will follow the same steps of the import CSV file into SQL Server and we will do for XML file into SQL Server.</p>
<h3>Create an Azure Blob JSON data source in ZappySys Data Gateway</h3>
<p>Follow the steps as in Create an Azure Blob CSV data source in ZappySys Data Gateway section when adding a new data source, except for these two steps:</p>
<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 Azure Blob JSON Driver.</strong>
<div id="attachment_7663" style="width: 637px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/10-create-new-data-source-in-data-gateway-to-load-json-files-from-azure-blob-into-sql-server-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7663" class="wp-image-7663 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/10-create-new-data-source-in-data-gateway-to-load-json-files-from-azure-blob-into-sql-server-1.png" alt="ZappySys Data Gateway - Create New Data Source" width="627" height="583" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/10-create-new-data-source-in-data-gateway-to-load-json-files-from-azure-blob-into-sql-server-1.png 627w, https://zappysys.com/blog/wp-content/uploads/2019/08/10-create-new-data-source-in-data-gateway-to-load-json-files-from-azure-blob-into-sql-server-1-300x279.png 300w" sizes="(max-width: 627px) 100vw, 627px" /></a><p id="caption-attachment-7663" class="wp-caption-text">ZappySys Data Gateway &#8211; Create New Data Source</p></div>
<div class="mceTemp"></div>
<div class="mceTemp"></div>
</li>
<li>After that, select a JSON file from container 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_7670" style="width: 667px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/40-configure-azure-blob-json-data-source-to-load-data-into-sql-server-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7670" class="wp-image-7670 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/40-configure-azure-blob-json-data-source-to-load-data-into-sql-server-1.png" alt="Configuring the JSON data source to load a JSON from Azure Blob container into SQL Server" width="657" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/40-configure-azure-blob-json-data-source-to-load-data-into-sql-server-1.png 657w, https://zappysys.com/blog/wp-content/uploads/2019/08/40-configure-azure-blob-json-data-source-to-load-data-into-sql-server-1-281x300.png 281w" sizes="(max-width: 657px) 100vw, 657px" /></a><p id="caption-attachment-7670" class="wp-caption-text">Configuring the JSON data source to load a JSON from Azure Blob container into SQL Server</p></div></li>
</ol>
<p>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>Set up a SQL Server Linked Server</h3>
<p>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 CSV data source</a>, except that change <em>Catalog</em> property of the Linked Server to match the name of the Azure Blob JSON data source we created. Once you do that, you are ready to load JSON into your SQL Server.</p>
<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 the following 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 aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/600-the-results-of-importing-amazon-s3-data-into-sql-server-using-json-driver.png" target="_blank" rel="noopener"><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="The results of getting JSON data straight from Azure Blob JSON" 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" /></a><p id="caption-attachment-7536" class="wp-caption-text">The results of getting JSON data straight from Azure Blob JSON</p></div>
<p>Now we are ready to proceed to the next section and import many XML files at once.</p>
<h2>Import many XML files located at Azure Blob 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_7675" style="width: 616px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/65-load-many-compressed-xml-files-from-azure-blob-container-into-sql-server.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7675" class="wp-image-7675 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/65-load-many-compressed-xml-files-from-azure-blob-container-into-sql-server.png" alt="Zipped XML files located in Azure Blob container to be loaded into SQL Server" width="606" height="415" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/65-load-many-compressed-xml-files-from-azure-blob-container-into-sql-server.png 606w, https://zappysys.com/blog/wp-content/uploads/2019/08/65-load-many-compressed-xml-files-from-azure-blob-container-into-sql-server-300x205.png 300w" sizes="(max-width: 606px) 100vw, 606px" /></a><p id="caption-attachment-7675" class="wp-caption-text">Zipped XML files located in Azure Blob container 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 Azure Blob XML Driver. Let&#8217;s proceed and just do that.</p>
<h3>Create an Azure Blob XML data source in ZappySys Data Gateway</h3>
<p>Follow the same steps as in Create an Azure Blob JSON data source in ZappySys Data Gateway 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 Azure Blob XML Driver</strong> as <em>Connector Type.</em>
<div id="attachment_7674" style="width: 430px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/67-create-new-azure-blob-xml-data-source-in-data-gateway-to-load-xml-files-into-sql-selver.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7674" class="wp-image-7674 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/67-create-new-azure-blob-xml-data-source-in-data-gateway-to-load-xml-files-into-sql-selver.png" alt="Choosing &quot;ZappySys Azure Blob XML Driver&quot; to load XMLs to SQL Server" width="420" height="296" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/67-create-new-azure-blob-xml-data-source-in-data-gateway-to-load-xml-files-into-sql-selver.png 420w, https://zappysys.com/blog/wp-content/uploads/2019/08/67-create-new-azure-blob-xml-data-source-in-data-gateway-to-load-xml-files-into-sql-selver-300x211.png 300w" sizes="(max-width: 420px) 100vw, 420px" /></a><p id="caption-attachment-7674" class="wp-caption-text">Choosing &#8220;ZappySys Azure Blob XML Driver&#8221; to load XMLs to SQL Server</p></div>
<div class="mceTemp"></div>
</li>
<li>Then click on <strong>Edit</strong> and select Azure Blob Container and file from it and In the Data Format / Compression (Zip / GZip) tab set suitable file Compression Format (Zip or GZip).
<div id="attachment_7673" style="width: 667px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/70-configure-azure-blob-xml-data-source-to-load-into-sql-server.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7673" class="wp-image-7673 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/70-configure-azure-blob-xml-data-source-to-load-into-sql-server.png" alt="Configuring data source based on ZappySys Azure Blob XML Driver to load XMLs into SQL Server" width="657" height="515" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/70-configure-azure-blob-xml-data-source-to-load-into-sql-server.png 657w, https://zappysys.com/blog/wp-content/uploads/2019/08/70-configure-azure-blob-xml-data-source-to-load-into-sql-server-300x235.png 300w" sizes="(max-width: 657px) 100vw, 657px" /></a><p id="caption-attachment-7673" class="wp-caption-text">Configuring data source based on ZappySys Azure Blob XML Driver to load XMLs into SQL Server</p></div></li>
<li>Now we are ready to set up a Linked Server to this newly created data source.</li>
</ol>
<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 CSV data source</a>, except that change <em>Catalog</em> property of the Linked Server to match the name of the Azure Blob 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 the following 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 aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/750-the-result-of-importing-xml-data-from-amazon-s3-into-sql-server.png" target="_blank" rel="noopener"><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 Azure Blob Container 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" /></a><p id="caption-attachment-7550" class="wp-caption-text">The data of many XMLs loaded from Azure Blob Container 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>Conclusion</h2>
<p style="text-align: justify;">We had a goal to import Azure Blob files into SQL Server from SQL Server itself. We learned how to Import Azure Blob files into SQL Server (CSV/JSON/XML Driver), 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; Azure Blob JSON Driver, Azure Blob XML Driver, and Azure Blob 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 Azure Blob straight from SQL queries in SSMS.</p>
<h2>References</h2>
<p>Finally, you can use the following links for more information:</p>
<ul>
<li><a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/azure-blob-csv-odbc-driver-intro.htm" target="_blank" rel="noopener">Azure Blob CSV Driver</a></li>
<li><a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/azure-blob-json-odbc-driver-intro.htm" target="_blank" rel="noopener">Azure Blob JSON Driver</a></li>
<li><a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/azure-blob-xml-odbc-driver-intro.htm" target="_blank" rel="noopener">Azure Blob XML Driver</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/import-azure-blob-files-sql-server-csv-json-xml-driver/">Import Azure Blob 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 Read/Write Azure Table Storage data in SSIS</title>
		<link>https://zappysys.com/blog/read-write-azure-table-storage-data-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 02 Aug 2019 13:03:21 +0000</pubDate>
				<category><![CDATA[SSIS Azure Table Storage Destination]]></category>
		<category><![CDATA[SSIS Azure Table Storage Source]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[Client]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[Destination]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[Setup]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[write]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7561</guid>

					<description><![CDATA[<p>Introduction In our previous blog, we saw how to read/write Azure Blob Storage Files in SSIS (CSV, JSON, XML Format files). Now in this blog, we will see how to Read/Write Azure Table Storage data in SSIS. To illustrate, we will use ZappySys SSIS PowerPack, which includes several tasks to import/export data from multiples sources to multiple destinations like [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-write-azure-table-storage-data-ssis/">How to Read/Write Azure Table Storage data in SSIS</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="size-thumbnail wp-image-7562 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-azure-table-storage-source-150x150.png" alt="" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-azure-table-storage-source-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-azure-table-storage-source-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-azure-table-storage-source.png 448w" sizes="(max-width: 150px) 100vw, 150px" />In our previous blog, we saw how to read/write <a href="https://zappysys.com/blog/read-azure-blob-storage-files-ssis-csv-json-xml/" target="_blank" rel="noopener">Azure Blob Storage Files in SSIS (CSV, JSON, XML Format files).</a> Now in this blog, we will see how to Read/Write Azure Table Storage data in SSIS. To illustrate, we will use <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a>, which includes several tasks to import/export data from multiples sources to multiple destinations like flat files, Azure, AWS, databases, Office files and more. They are Coding free, drag and drop high-performance suite of <em>Custom SSIS Components</em> and <em>SSIS Tasks.</em> If you like to perform other operations on Azure Blob Storage Files (e.g. Download, Upload, Create, Delete) then <a href="https://zappysys.com/blog/category/ssis/tasks/ssis-azure-blob-storage-task/" target="_blank" rel="noopener">check these articles</a>.</p>
<p>&nbsp;</p>
<h2>Component Mentioned in this article</h2>
<div class="su-table su-table-alternate">
<table style="height: 44px;width: 307px">
<tbody>
<tr style="height: 22px">
<td style="height: 22px;width: 1px"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-source/ssis-azure-table-storage-source.png"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-source/ssis-azure-table-storage-source.png" alt="" width="40" height="40" /></a></td>
<td style="height: 22px;width: 247px"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/azure-table-storage-source.htm" target="_blank" rel="noopener">Azure Table Storage Source</a></td>
</tr>
<tr style="height: 22px">
<td style="height: 22px;width: 1px"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-storage-destination-adapter.png"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-storage-destination-adapter.png" alt="" width="40" height="40" /></a></td>
<td style="height: 22px;width: 247px"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/azure-table-storage-destination.htm" target="_blank" rel="noopener">Azure Table Storage Destination</a></td>
</tr>
</tbody>
</table>
</div>
<h2><span id="Prerequisite"><span id="Requirements">Prerequisite</span></span></h2>
<ol>
<li>First, you will need to have SSIS installed</li>
<li>Secondly, make sure to have SSDT</li>
<li>Download and install <a href="https://go.microsoft.com/fwlink/?LinkId=717179&amp;clcid=0x4009" target="_blank" rel="noopener">Microsoft Azure Storage Emulator</a></li>
<li>Download and install <a href="https://azure.microsoft.com/en-us/features/storage-explorer/" target="_blank" rel="noopener">Microsoft Azure Storage Explorer</a></li>
<li>Finally, do not forget to install ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a></li>
</ol>
<p><strong>NOTE:</strong> If you want to use Live account (Azure Blob Storage) then you can skip Step #3</p>
<h2><span id="What_is_Azure_Blob_Storage">What is Azure Table Storage?</span></h2>
<p>Azure Table storage stores large amounts of structured data. The service is a NoSQL datastore which accepts authenticated calls from inside and outside the Azure cloud. Azure tables are ideal for storing structured, non-relational data. Common uses of Table storage include:</p>
<div id="attachment_7567" style="width: 310px" class="wp-caption alignright"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-azure-table-storage-intro.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7567" class="wp-image-7567 size-medium" src="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-azure-table-storage-intro-300x158.png" alt="Microsoft Azure Table Storage Introduction" width="300" height="158" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-azure-table-storage-intro-300x158.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-azure-table-storage-intro.png 468w" sizes="(max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-7567" class="wp-caption-text">Microsoft Azure Table Storage Introduction</p></div>
<ul>
<li>Storing TBs of structured data capable of serving web-scale applications</li>
<li>Storing datasets that don&#8217;t require complex joins, foreign keys, or stored procedures and can be denormalized for fast access</li>
<li>Quickly querying data using a clustered index</li>
<li>Accessing data using the OData protocol and LINQ queries with WCF Data Service .NET Libraries</li>
</ul>
<p>&nbsp;</p>
<p>You can use Table storage to store and query huge sets of structured, non-relational data, and your tables will scale as demand increases.</p>
<h2><span id="Getting_Started">Getting Started</span></h2>
<p>In order to start, we will show several examples. Zappysys includes an <a href="https://zappysys.com/products/ssis-powerpack/ssis-azure-table-storage-source/" target="_blank" rel="noopener">SSIS Azure Table Storage Source.</a> Here we are showing you is, how to Read/Write Azure Table Storage data in SSIS.</p>
<p>You can connect to your Azure Storage Account by entering your storage account credentials. Here I am showing an example of the use of the local Azure Storage Emulator.</p>
<h2><span id="Setup_Azure_Storage_client_tools">Setup Azure Storage client tools and Create Table</span></h2>
<ol>
<li>Once you have <a href="https://go.microsoft.com/fwlink/?LinkId=717179&amp;clcid=0x4009" target="_blank" rel="noopener">downloaded and installed a storage emulator</a> You can launch Microsoft Azure Storage Emulator from its Physical location or from the desktop or start menu shortcut.
<div id="attachment_3631" style="width: 869px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-emulator-location.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3631" class="wp-image-3631 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-emulator-location.png" alt="Azure Storage Emulator Physical Location" width="859" height="94" srcset="https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-emulator-location.png 859w, https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-emulator-location-300x33.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-emulator-location-768x84.png 768w" sizes="(max-width: 859px) 100vw, 859px" /></a><p id="caption-attachment-3631" class="wp-caption-text">Azure Storage Emulator Physical Location</p></div></li>
<li>If you can see the below-attached Command Prompt screen after Emulator started. Then you can proceed to start Microsoft Azure Storage Explorer as the Azure Storage Emulator is started successfully.
<div id="attachment_3633" style="width: 710px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-emulator-screen-after-started-e1552723801433.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3633" class="wp-image-3633 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-emulator-screen-after-started-e1552723801433.png" alt="Command Prompt Screen after Microsoft Azure Storage Emulator Started" width="700" height="237" /></a><p id="caption-attachment-3633" class="wp-caption-text">Command Prompt Screen after Microsoft Azure Storage Emulator Started</p></div></li>
<li>Now, you have to <a href="https://azure.microsoft.com/en-us/features/storage-explorer/" target="_blank" rel="noopener">download and install Microsoft Azure Storage Explorer</a> and then you can launch Microsoft Azure Storage Explorer from its Physical location or from the desktop or start menu shortcut.
<div id="attachment_3635" style="width: 837px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-explorer-location.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3635" class="wp-image-3635 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-explorer-location.png" alt="Microsoft Azure Storage Explorer Location" width="827" height="97" srcset="https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-explorer-location.png 827w, https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-explorer-location-300x35.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/04/microsoft-azure-storage-explorer-location-768x90.png 768w" sizes="(max-width: 827px) 100vw, 827px" /></a><p id="caption-attachment-3635" class="wp-caption-text">Microsoft Azure Storage Explorer Location.</p></div></li>
<li>If you don&#8217;t have Azure Storage account then it&#8217;s easy to <a href="http://azure.microsoft.com/en-us/pricing/free-trial/" target="_blank" rel="noopener">get FREE Trial Azure Storage account</a> or use your MSDN to get credit each month which will be more than enough for real testing. If you prefer to avoid all this hassle then Microsoft provides another great way to test Azure Storage functionality is totally offline mode on your local machine. You can just <a href="http://www.microsoft.com/en-us/download/details.aspx?id=42317" target="_blank" rel="noopener">download Azure Storage Emulator</a> and start testing.</li>
<li> <a href="http://msdn.microsoft.com/en-us/library/azure/hh403989.aspx" target="_blank" rel="noopener">Click here</a> to learn more about how to configure Azure Storage Emulator for Testing and Development purposes. In order to connect to Azure Storage Service from SSIS, you will need Storage AccountName and an AccessKey. Ask your SysAdmin or responsible person to provide that information to you. Here are sample Account Name and Access Key(<b>this is just example key which may differ in your case</b>)<br />
<pre class="crayon-plain-tag">Account Name: mystorageaccount 
Access Key: Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==</pre>
</li>
<li>For Creating a Tables, First of all, you need to go to Microsoft Storage Explorer Window. Then you can go through like this way (Storage Accounts –&gt; Emulator &#8211; Default Ports(Key) –&gt; Tables. Right-click on Tables and Select Create Table and put your table name you want.
<div style="width: 360px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-storage-destination-create-table.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-storage-destination-create-table.png" alt="Create Tables in Azure Table Storage Emulator" width="350" height="479" /></a><p class="wp-caption-text">Create Tables in Azure Table Storage Emulator</p></div></li>
</ol>
<h2>Write data using ZS Azure Table Storage Destination</h2>
<p>In this tutorial, you will learn how to write data into Azure Table Storage. You can use <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/dummydata-source.htm" target="_blank" rel="noopener">ZS DummyData Source</a> for practice it(In this case it&#8217;s from SQL Server Source). So, Let&#8217;s start with an example. In this SSIS we will write data into Azure Table Storage using ZS Azure Table Storage Destination.</p>
<ol>
<li>Once you have created Azure Storage Table and you got valid Account Name and AccessKey (for the local emulator you don&#8217;t need this) you may proceed to create a new SSIS package. In BIDS/SSDT create new SSIS package</li>
<li>From the SSIS toolbox drag and drop Data Flow Task on the control flow designer surface.
<div id="attachment_7934" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="wp-image-7934 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-7934" class="wp-caption-text">Drag and Drop SSIS Data Flow Task from SSIS Toolbox</p></div></li>
<li>Double click on the DataFlow task to see DataFlow designer surface.</li>
<li>Here, In Visual Studio, drag and drop the OLE DB Source and Azure Table Storage Destination in the design surface and join the components with the blue arrow.
<div style="width: 567px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-storage-destination-adapter-drag.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-storage-destination-adapter-drag.png" alt="SSIS Azure Table Storage Destination - Drag and Drop" width="557" height="167" /></a><p class="wp-caption-text">SSIS Azure Table Storage Destination &#8211; Drag and Drop</p></div></li>
<li>Now, we need two connection, OLE DB Connection, and Azure Storage Connection. Click <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/azure-storage-connection-manager.htm" target="_blank" rel="noopener">here</a> to create Azure Storage Connection.</li>
</ol>
<h3>How to create OLE DB Connection</h3>
<ol>
<li>Let&#8217;s, Right-click on Connection Managers Panel to Create OLE DB Connection, so you can use Source and Context Menu will appear, Select New OLE DB Connection from the Context Menu.
<div style="width: 485px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-1.png" alt="OLE DB Connection - Create New Connection" width="475" height="353" /></a><p class="wp-caption-text">OLE DB Connection &#8211; Create New Connection</p></div></li>
<li>Now, click on New Button to create Connection.
<div style="width: 665px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-2.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-2.png" alt="OLE DB Connection - Create New Connection" width="655" height="558" /></a><p class="wp-caption-text">OLE DB Connection &#8211; Create New Connection</p></div></li>
<li>Let&#8217;s Configure Connection Manager, just Follow steps one by one as we have created.
<div style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-3.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-3.png" alt="OLE DB Connection - Configure Connection" width="720" height="625" /></a><p class="wp-caption-text">OLE DB Connection &#8211; Configure Connection</p></div></li>
<li>Click on the OK button to save configure Setting UI.</li>
</ol>
<h3>Write data into Azure Storage Table in SSIS</h3>
<ol>
<li>Double click on OLE DB Source for configure it.</li>
<li>Let&#8217;s Configure in Connection Manager, just follow the below image steps.
<div style="width: 828px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-oledb-source-editor-manager.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-oledb-source-editor-manager.png" alt="OLE DB Source - Configure" width="818" height="560" /></a><p class="wp-caption-text">OLE DB Source &#8211; Configure</p></div></li>
<li>Click OK to Save OLE DB Source Editor UI Settings.</li>
<li>Now double click Azure Table Storage Destination to configure it.</li>
<li>On [Connection Manager] tab select Azure Storage Connection manager.
<div style="width: 800px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-storage-destination-select-adapter-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-storage-destination-select-adapter-connection.png" alt="ZS Azure Table Storage Destination - Connection Manager" width="790" height="287" /></a><p class="wp-caption-text">ZS Azure Table Storage Destination &#8211; Connection Manager</p></div></li>
<li>Click on [Component Properties] tab and select AccessMode=Table and Pick destination Table from the Tables dropdown list.<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;">If you choose Reload option then target table is first truncated before inserting records so be careful with Reload option.</div></div>
<div style="width: 800px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-storage-destination-select-table.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-storage-destination-select-table.png" alt="ZS Azure Table Storage Destination - Component Properties" width="790" height="509" /></a><p class="wp-caption-text">ZS Azure Table Storage Destination &#8211; Component Properties</p></div></li>
<li>Click on [Mappings] tab and verify mapping. Drop CustomerID and RecordID mappings and reconnect as shown below. This is just to make sure PrimaryKey columns are mapped.
<div style="width: 800px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-storage-destination-select-mappings.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-storage-destination-select-mappings.png" alt="ZS Azure Table Storage Destination - Column Mappings" width="790" height="479" /></a><p class="wp-caption-text">ZS Azure Table Storage Destination &#8211; Column Mappings</p></div></li>
<li>Click OK to save settings.</li>
<li>Execute the package and verify the target data.
<div style="width: 359px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-write-data-sample.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-write-data-sample.png" alt="ZS Azure Table Storage Destination - Execute the Package" width="349" height="317" /></a><p class="wp-caption-text">ZS Azure Table Storage Destination &#8211; Execute the Package</p></div>
<div style="width: 892px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-console-verify-record-count.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-destination/ssis-azure-table-console-verify-record-count.png" alt="ZS Azure Table Storage Verify Customers Table Data" width="882" height="413" /></a><p class="wp-caption-text">ZS Azure Table Storage &#8211; Verify Customers Table Data</p></div></li>
</ol>
<h2>Read data using ZS Azure Table Storage Source</h2>
<p>In this tutorial, you will learn how to read data from Azure Table Storage in SSIS using the ZS Azure Table Storage Source adapter. In this SSIS we will read data with SQL Query and Table Mode. So Let&#8217;s begin it.</p>
<ol>
<li>You may proceed to create a new SSIS package. In BIDS/SSDT create a new SSIS package.</li>
<li>From the SSIS toolbox drag and drop Data Flow Task on the control flow designer surface.
<div style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="SSIS Data Flow Task - Drag and Drop" width="460" height="155" /></a><p class="wp-caption-text">SSIS Data Flow Task &#8211; Drag and Drop</p></div></li>
<li>Double click on the DataFlow task to see DataFlow designer surface.</li>
<li>From the SSIS toolbox drag and drop Azure Table Storage Source on the data flow designer surface.
<div style="width: 538px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-source/ssis-azure-table-storage-source-drag.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-source/ssis-azure-table-storage-source-drag.png" alt="ZS Azure Table Storage Source - Drag and Drop" width="528" height="99" /></a><p class="wp-caption-text">ZS Azure Table Storage Source &#8211; Drag and Drop</p></div></li>
<li>Now, we need an Azure Storage connection. Click <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/azure-storage-connection-manager.htm" target="_blank" rel="noopener">here</a> to Create Connection.</li>
</ol>
<h3>Extract data with Query Mode</h3>
<ol>
<li>Here, we are getting data using Query Mode with Dynamic expression value.</li>
<li>Lets, create a Variable with correct DataType and Value, use the following image.
<div style="width: 442px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-source/ssis-azure-table-storage-source-create-variable.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-source/ssis-azure-table-storage-source-create-variable.png" alt="SSIS Variables - Create Variable and Store Value" width="432" height="133" /></a><p class="wp-caption-text">SSIS Variables &#8211; Create Variable and Store Value</p></div></li>
<li>Double click Azure Table Storage Source to configure it.</li>
<li>Select the connection we have created before, set AccessMode to Query. You can use the following SQL Query and select Variable. Click here for more <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=azure-table-storage-source.htm#A_QueryLanguage" target="_blank" rel="noopener">Azure Table Storage Query Examples.</a><br />
<pre class="crayon-plain-tag">SELECT * FROM Customers
WHERE Country = '{{User::varCountry}}'</pre>
<div style="width: 850px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-source/ssis-azure-table-storage-source-query-data-preview.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-source/ssis-azure-table-storage-source-query-data-preview.png" alt="ZS Azure Table Storage Source - Configure Query Mode" width="840" height="673" /></a><p class="wp-caption-text">ZS Azure Table Storage Source &#8211; Configure Query Mode</p></div></li>
<li>Click on the Preview button to see Data Preview and OK button to save configure setting UI.</li>
<li>From the SSIS toolbox drag and drop Trash Destination on the data flow designer surface.
<div style="width: 529px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/trash-destination/ssis-trash-destination-adapter-drag.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/trash-destination/ssis-trash-destination-adapter-drag.png" alt="ZS Trash Destination - Drag and Drop" width="519" height="121" /></a><p class="wp-caption-text">ZS Trash Destination &#8211; Drag and Drop</p></div></li>
<li>Now single click on the Azure Table Storage Source, once you see the blue arrow from the source &#8230; connect it to Trash Destination.</li>
<li>Double click on ZS Trash Destination to Configure it.
<div style="width: 622px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/trash-destination/ui-trash-destination-settings.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/trash-destination/ui-trash-destination-settings.png" alt="ZS Trash Destination - Configure" width="612" height="523" /></a><p class="wp-caption-text">ZS Trash Destination &#8211; Configure</p></div></li>
<li>Click on the OK button to save Trash Destination configure setting UI.</li>
<li>Execute the package and verify source data in the data viewer.
<div style="width: 282px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-source/ssis-azure-table-storage-source-extract-data-query-mode.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-source/ssis-azure-table-storage-source-extract-data-query-mode.png" alt="SSIS ZS Azure Table Storage Source - Execute the Package" width="272" height="314" /></a><p class="wp-caption-text">SSIS ZS Azure Table Storage Source &#8211; Execute the Package</p></div></li>
</ol>
<h3>Extract data with Table Mode</h3>
<ol>
<li>So, Double click Azure Table Storage Source to configure it.</li>
<li>In the Azure Table Storage Source, Select the connection we have created, set AccessMode to Table and Select Table from the Tables dropdown.
<div style="width: 646px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-source/ssis-azure-table-storage-source-table-data-preview.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-source/ssis-azure-table-storage-source-table-data-preview.png" alt="SSIS ZS Azure Table Source - Configure Table Mode" width="636" height="473" /></a><p class="wp-caption-text">SSIS ZS Azure Table Source &#8211; Configure Table Mode</p></div></li>
<li>Click on the Preview button to see Data Preview and OK button to save configure setting UI.</li>
<li>From the SSIS toolbox drag and drop Trash Destination on the data flow designer surface.
<div style="width: 529px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/trash-destination/ssis-trash-destination-adapter-drag.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/trash-destination/ssis-trash-destination-adapter-drag.png" alt="ZS Trash Destination - Drag and Drop" width="519" height="121" /></a><p class="wp-caption-text">ZS Trash Destination &#8211; Drag and Drop</p></div></li>
<li>Now single click on the Azure Table Storage Source, once you see the blue arrow from the source &#8230; connect it to Trash Destination.</li>
<li>Double click on ZS Trash Destination to Configure it.
<div style="width: 622px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/trash-destination/ui-trash-destination-settings.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/trash-destination/ui-trash-destination-settings.png" alt="ZS Trash Destination - Configure" width="612" height="523" /></a><p class="wp-caption-text">ZS Trash Destination &#8211; Configure</p></div></li>
<li>Click on the OK button to save Trash Destination configure setting UI.</li>
<li>In the last, Execute the package and verify source data in the data viewer.
<div style="width: 283px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-source/ssis-azure-table-storage-source-extract-data-sample.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/azure-table-storage-source/ssis-azure-table-storage-source-extract-data-sample.png" alt="ZS Azure Table Storage Source - Execute the Package" width="273" height="310" /></a><p class="wp-caption-text">ZS Azure Table Storage Source &#8211; Execute the Package</p></div></li>
</ol>
<h2>Conclusion</h2>
<p>After all, In this blog, we learned how to write data in Azure Table Storage in SSIS. We used the Azure Table Storage Destination for write and Azure Table Storage Source to read data from Microsoft Azure Table Storage using Query and Table mode. You can <a href="https://zappysys.com/products/ssis-powerpack/">download SSIS PowerPack here</a> to try many other scenarios not discussed in this blog along with 70+ other components.</p>
<h2><span id="References">References</span></h2>
<p>There are a few details you should use the following links for more information:</p>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-azure-table-storage-destination/" target="_blank" rel="noopener">Azure Table Storage Destination</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-azure-table-storage-source/" target="_blank" rel="noopener">Azure Table Storage Source</a></li>
<li><a href="https://zappysys.com/blog/category/ssis/components/ssis-trash-destination/" target="_blank" rel="noopener">ZS Trash Destination</a></li>
<li><a href="https://docs.microsoft.com/en-us/azure/cosmos-db/table-storage-overview" target="_blank" rel="noopener">Microsoft Azure Table Storage</a></li>
<li><strong>Help File:</strong>
<ul>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/azure-table-storage-destination.htm" target="_blank" rel="noopener">Azure Table Storage Destination</a></li>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/azure-table-storage-source.htm" target="_blank" rel="noopener">Azure Table Storage Source</a></li>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/trash-destination.htm" target="_blank" rel="noopener">ZS Trash Destination</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/read-write-azure-table-storage-data-ssis/">How to Read/Write Azure Table Storage data in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Import SAP S/4HANA OData Service Data Into Ms Access via ODBC Driver</title>
		<link>https://zappysys.com/blog/import-sap-s-4hana-odata-service-data-ms-access-via-odbc-driver/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 27 Jul 2019 06:34:32 +0000</pubDate>
				<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Reporting - Microsoft Access]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[hana]]></category>
		<category><![CDATA[ms access]]></category>
		<category><![CDATA[odata]]></category>
		<category><![CDATA[s/4hana]]></category>
		<category><![CDATA[sap]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7506</guid>

					<description><![CDATA[<p>Introduction In our previous blog we saw how to read JIRA data in SQL Server. Now let’s learn how to Import SAP S/4HANA OData Service Data Into MS Access. SAP S/4HANA provides OData REST API interface to access data in your application using HTTP Protocol. We will use ODBC XML Driver to read SAP data and load [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-sap-s-4hana-odata-service-data-ms-access-via-odbc-driver/">Import SAP S/4HANA OData Service Data Into Ms Access via ODBC Driver</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/SAP_S4HANA.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignleft wp-image-7491 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/07/SAP_S4HANA.png" alt="SAP S/4HANA" width="150" height="150" /></a></p>
<p>In our previous blog we saw how to <a href="https://zappysys.com/blog/load-jira-data-sql-server-odbc-call-rest-api/" target="_blank" rel="noopener">read JIRA data in SQL Server</a>. Now let’s learn how to Import SAP S/4HANA OData Service Data Into MS Access. SAP S/4HANA provides OData REST API interface to access data in your application using HTTP Protocol. We will use <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML Driver</a> to read SAP data and load into MS Access.</p>
<p>So, let’s get started.</p>
<div id="custom_post_widget-2523" class="content_block">
<h2></h2>
<h2></h2>
<h2><span id="Requirements">Requirements</span></h2>
<ol>
<li>A first requirement, make sure that Microsoft Access installed</li>
<li>Finally, make sure to have <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed.</li>
</ol>
</div>
<h2><span id="About_SAP_HANA_OData_REST_API_Service">About SAP HANA / OData REST API Service</span></h2>
<p>You can expose your SAP Data using ODATA REST API Service. Here is a <a href="https://www.erpworkbench.com/sap-webapps/segw-odata-gateway-service.htm" target="_blank" rel="noopener">good article</a> which shows how to expose data as OData Service.   For more information on SAP OData Service feature check this <a href="https://help.sap.com/doc/05d53b2d3bbb43d2ab5efa23829b2777/1610%20001/en-US/frameset.htm?ecaeea50ca692309e10000000a445394.html" target="_blank" rel="noopener">SAP help page</a>. If you are new to OData Standard then <a href="https://www.odata.org/getting-started/basic-tutorial/" target="_blank" rel="noopener">read here</a> to know more how OData can facilitate data extraction using HTTP REST API. If you need Sample XML based OData Service then use below test URLs.</p><pre class="crayon-plain-tag">https://services.odata.org/Northwind/Northwind.svc/
https://services.odata.org/Northwind/Northwind.svc/Customers
https://services.odata.org/Northwind/Northwind.svc/Orders
https://services.odata.org/Northwind/Northwind.svc/Invoices
https://services.odata.org/Northwind/Northwind.svc/Products</pre><p>
Now let’s look at how to read SAP Data using ODBC Driver. At this point we assume you have exposed your data as OData Endpoint.</p>
<h2><span id="Read_SAP_HANA_data_using_XML_Source">Read SAP S/4HANA data using XML Driver</span></h2>
<p>First let’s look at steps to configure XML Driver. We will read data from SAP S/4HANA OData Service and then in next section we will look at how to load data into MS Access or other target.</p>
<ol>
<li>First, <strong>Windows search</strong>, write <strong>ODBC</strong> and select the <strong>ODBC Data sources (32 bits)</strong>
<div id="attachment_2780" class="wp-caption aligncenter">
<div id="attachment_2780" style="width: 395px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2780" class="wp-image-2780 size-full" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?zoom=0.8999999761581421&amp;resize=385%2C520&amp;ssl=1" alt="Open ODBC Data source" width="385" height="520" /></a><p id="caption-attachment-2780" class="wp-caption-text">Open ODBC Data Source</p></div>
</div>
</li>
<li>As a second step, in ODBC Data source Administrator press the <strong>Add</strong> button.
<div id="attachment_2725" style="width: 600px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2725" class="wp-image-2725 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png" alt="Add ZappySys" width="590" height="423" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png 590w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys-300x215.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></a><p id="caption-attachment-2725" class="wp-caption-text">Add ZappySys</p></div></li>
<li>In this step, create the new data source, select <strong>ZappySys XML Driver.</strong>
<div id="attachment_2772" style="width: 302px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2772" class="wp-image-2772 size-medium" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?zoom=0.8999999761581421&amp;resize=292%2C218&amp;ssl=1" alt="add new zappysys" width="292" height="217" /></a><p id="caption-attachment-2772" class="wp-caption-text">Add new zappysys xml driver</p></div></li>
<li>Now edit that XML data source to configure it. Enter your OData Service URL its typically like below. Replace 3 parts with your own value (i.e. replace {MY-INSTANCE},  {MY-PROJECT}, {MY-TABLE})<br />
<pre class="crayon-plain-tag">https://{MY-INSTANCE}/sap/opu/odata/sap/{MY-PROJECT}/{MY-TABLE}</pre>
For example if you are hosting SAP HANA in Cloud Instance then your URL may look like below<br />
<pre class="crayon-plain-tag">https://myXXXXXX-api.s4hana.ondemand.com/sap/opu/odata/sap/MyTestProject/PurchaseOrders</pre>
And create New ZS-HTTP connection in it select <a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/" target="_blank" rel="noopener">Basic Authentication</a> and enter your SAP HANA UserID / Password to call OData Service and select the desire filter.</p>
<div id="attachment_7497" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7497" class="wp-image-7497 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-768x537.png" alt="XML Driver : SAP S/4HANA OData Service Configuration" width="720" height="503" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-768x537.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-300x210.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service.png 1019w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7497" class="wp-caption-text">XML Driver : SAP S/4HANA OData Service Configuration</p></div></li>
<li>Now go to Data Format / Compression (Zip/GZip) tab and select Data Format as OData to get all the records.
<div id="attachment_7498" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7498" class="wp-image-7498 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-768x446.png" alt="Data Format : Odata" width="720" height="418" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-768x446.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-300x174.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format.png 792w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7498" class="wp-caption-text">Data Format : Odata</p></div></li>
<li>Finally, now using Query Builder and Code Generator we will generate the query and click on Preview the data.
<div id="attachment_6416" style="width: 766px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6416" class="wp-image-6416 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png" alt="odbc-json-driver-generate-quickbooks-query" width="756" height="432" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png 756w, https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query-300x171.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></a><p id="caption-attachment-6416" class="wp-caption-text">Generate Query</p></div></li>
<li>That’s it we are ready to load SAP S/4HANA OData Service data to MS Access.</li>
</ol>
<h2>Load SAP S/4HANA OData Service in MS Access</h2>
<ol>
<li>In MS Access, go to <strong>External Data</strong> Ribbon and select <strong>New Data Source</strong> and select <strong>From Other Sources</strong> and <strong>ODBC Database</strong>.
<div id="attachment_5171" style="width: 1235px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5171" class="wp-image-5171 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png" alt="Configuration in MS Access: Import Data From REST API" width="1225" height="572" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png 1225w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-300x140.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-768x359.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-1024x478.png 1024w" sizes="(max-width: 1225px) 100vw, 1225px" /></a><p id="caption-attachment-5171" class="wp-caption-text">A configuration in MS Access: Import Data From REST API</p></div></li>
<li>Select the Source and destination of the data, select <strong>Import the source data into a new table in the current database</strong> and press OK.
<div id="attachment_2726" class="wp-caption alignnone">
<div id="attachment_5172" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5172" class="wp-image-5172 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png" alt="Get External Data - ODBC Database" width="736" height="543" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png 736w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc-300x221.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-5172" class="wp-caption-text">Get External Data &#8211; ODBC Database</p></div>
</div>
</li>
<li>Select your newly created JSON Driver Data Source and click<strong><strong><strong> OK.<br />
</strong></strong></strong></p>
<div id="attachment_5223" style="width: 455px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5223" class="wp-image-5223 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png" alt="Get External Data - Select your newly created ODBC Data Source (JSON Driver)" width="445" height="395" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png 445w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1-300x266.png 300w" sizes="(max-width: 445px) 100vw, 445px" /></a><p id="caption-attachment-5223" class="wp-caption-text">Get External Data &#8211; Select your newly created ODBC Data Source (JSON Driver)</p></div>
<p>&nbsp;</li>
<li>Select tables from the list of tables in the Import Objects screen and click <strong><strong>OK.<br />
</strong></strong></p>
<div id="attachment_5174" style="width: 473px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5174" class="wp-image-5174 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png" alt="Get External Data - Select tables from Import Objects Screen" width="463" height="452" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png 463w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables-300x293.png 300w" sizes="(max-width: 463px) 100vw, 463px" /></a><p id="caption-attachment-5174" class="wp-caption-text">Get External Data &#8211; Select tables from Import Objects Screen</p></div></li>
<li>Select <strong>Save Import Steps</strong> from the screen and click on <strong>Save Import</strong> button.
<div id="attachment_5175" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5175" class="wp-image-5175 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png" alt="Get External Data - Select Save Import Steps" width="736" height="576" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png 736w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps-300x235.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-5175" class="wp-caption-text">Get External Data &#8211; Select Save Import Steps</p></div></li>
<li>That&#8217;s it If everything is OK, you will be able to see the data.
<div id="attachment_5176" style="width: 1353px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5176" class="wp-image-5176 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png" alt="Data Imported Successfully in MS Access DB Table" width="1343" height="404" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png 1343w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-300x90.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-768x231.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-1024x308.png 1024w" sizes="(max-width: 1343px) 100vw, 1343px" /></a><p id="caption-attachment-5176" class="wp-caption-text">Data Imported Successfully in MS Access DB Table</p></div></li>
</ol>
<h2><span id="How_to_import_REST_API_data_to_Excel">How to link REST API data to Access</span></h2>
<p>The linking process is very similar to importing data into the Access table. Follow steps of the previous paragraph &#8211; <a href="#how-to-import-data">How to import REST API data to Access</a> &#8211; but on step 2 select the second option to create a <em><strong>linked table</strong></em><b><i> </i></b>instead. Then at last it&#8217;s asked to select a unique record identifier, don&#8217;t select anything:</p>
<div id="attachment_7445" style="width: 326px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7445" class="wp-image-7445 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack.png" alt="Link table approach - don't select unique record identifier" width="316" height="382" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack.png 316w, https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack-248x300.png 248w" sizes="(max-width: 316px) 100vw, 316px" /><p id="caption-attachment-7445" class="wp-caption-text">Linked table approach &#8211; Don&#8217;t select a unique Record identifier</p></div>
<h2><span id="Step-by-Step_Import_REST_API_into_Power_BI">SAP S/4HANA Integration with Other BI Tools</span></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>
<div class="content_block" id="custom_post_widget-8935"><h2>Troubleshooting Errors</h2>
<p>While running in Access\Excel\other and reading data from DSN created with ODBC PowerPack, if you get this error "<strong>License type [ODBC_PP_TRIAL] not found or its expired</strong>"</p>

<p>Please refer to this article for the same:  <a href="https://zappysys.zendesk.com/hc/en-us/articles/360042521533-Troubleshooting-License-type-ODBC-PP-TRIAL-not-found-or-its-expired-error-in-Microsoft-Access" target="_blank" rel="noopener">Troubleshooting "License type [ODBC_PP_TRIAL] not found or its expired" error in Microsoft Access</a></p></div>
<h2><span id="Step-by-Step_Import_REST_API_into_Power_BI">Conclusion</span></h2>
<p>So in this blog, we learned how to Import SAP S/4HANA OData Service Data in Access using <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML / SOAP API Driver</a> in a very simple way. You can achieve many more functionalities with this tool. Check our blogs/articles on <strong><a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/" target="_blank" rel="noopener">XML File / REST API Driver</a> </strong>to find out what <em>this tool</em> is capable of more.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information about the use of SAP S/4HANA OData Service with our tools:</p>
<ul>
<li><a href="https://api.sap.com/" target="_blank" rel="noopener">SAP API Business Hub</a></li>
<li><strong>Landing Page</strong> for <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML / SOAP API Driver</a>, you can also find <a href="https://youtu.be/iwezz0Z3D4U" target="_blank" rel="noopener">Tutorial Video</a> here.</li>
<li><strong>Help File:</strong> Documentation of XML Driver.</li>
<li><strong>Blog/articles link</strong>: <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/" target="_blank" rel="noopener">https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/import-sap-s-4hana-odata-service-data-ms-access-via-odbc-driver/">Import SAP S/4HANA OData Service Data Into Ms Access via ODBC Driver</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Import SAP S/4HANA OData Service Data Into Sql Server via ODBC Driver</title>
		<link>https://zappysys.com/blog/import-sap-s-4hana-odata-service-sql-server/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 20 Jul 2019 10:01:04 +0000</pubDate>
				<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[T-SQL (SQL Server)]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[hana]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[s/4hana]]></category>
		<category><![CDATA[sap]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7490</guid>

					<description><![CDATA[<p>Introduction In our previous blog we saw how to read JIRA data in SQL Server. Now let’s learn how to Import SAP S/4HANA OData Service Data Into Sql Server. SAP S/4HANA provides OData REST API interface to access data in your application using HTTP Protocol. We will use ODBC XML Driver to read SAP data and load [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-sap-s-4hana-odata-service-sql-server/">Import SAP S/4HANA OData Service Data Into Sql Server via ODBC Driver</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/SAP_S4HANA.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignleft wp-image-7491 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/07/SAP_S4HANA.png" alt="SAP S/4HANA" width="150" height="150" /></a></p>
<p>In our previous blog we saw how to <a href="https://zappysys.com/blog/load-jira-data-sql-server-odbc-call-rest-api/" target="_blank" rel="noopener">read JIRA data in SQL Server</a>. Now let’s learn how to Import SAP S/4HANA OData Service Data Into Sql Server. SAP S/4HANA provides OData REST API interface to access data in your application using HTTP Protocol. We will use <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML Driver</a> to read SAP data and load into SQL Server.</p>
<p>So, let’s get started.</p>
<div id="custom_post_widget-2523" class="content_block">
<h2></h2>
<h2></h2>
<h2><span id="Requirements">Requirements</span></h2>
<ol>
<li>A first requirement will be to SQL Server Database Engine Installed</li>
<li>The second requirement will be SSMS installed</li>
<li>Finally, make sure to have <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed.</li>
</ol>
</div>
<h2><span id="About_SAP_HANA_OData_REST_API_Service">About SAP HANA / OData REST API Service</span></h2>
<p>You can expose your SAP Data using ODATA REST API Service. Here is a <a href="https://www.erpworkbench.com/sap-webapps/segw-odata-gateway-service.htm" target="_blank" rel="noopener">good article</a> which shows how to expose data as OData Service.   For more information on SAP OData Service feature check this <a href="https://help.sap.com/doc/05d53b2d3bbb43d2ab5efa23829b2777/1610%20001/en-US/frameset.htm?ecaeea50ca692309e10000000a445394.html" target="_blank" rel="noopener">SAP help page</a>. If you are new to OData Standard then <a href="https://www.odata.org/getting-started/basic-tutorial/" target="_blank" rel="noopener">read here</a> to know more how OData can facilitate data extraction using HTTP REST API. If you need Sample XML based OData Service then use below test URLs.</p><pre class="crayon-plain-tag">https://services.odata.org/Northwind/Northwind.svc/
https://services.odata.org/Northwind/Northwind.svc/Customers
https://services.odata.org/Northwind/Northwind.svc/Orders
https://services.odata.org/Northwind/Northwind.svc/Invoices
https://services.odata.org/Northwind/Northwind.svc/Products</pre><p>
Now let’s look at how to read SAP Data using ODBC Driver. At this point we assume you have exposed your data as OData Endpoint.</p>
<h2><span id="Read_SAP_HANA_data_using_XML_Source">Read SAP S/4HANA data using XML Driver</span></h2>
<p>First let’s look at steps to configure XML Driver. We will read data from SAP S/4HANA OData Service and then in next section we will look at how to load data into SQL Server or other target.</p>
<ol>
<li>To do this, first of all, we will open the ZappySys Data Gateway Configuration:
<div id="attachment_5283" style="width: 410px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5283" class="wp-image-5283 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png" alt="Open ZappySys Data Gateway" width="400" height="315" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png 400w, https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway-300x236.png 300w" sizes="(max-width: 400px) 100vw, 400px" /></a><p id="caption-attachment-5283" class="wp-caption-text">Open ZappySys Data Gateway</p></div></li>
<li>Add the Native &#8211; ZappySys XML Driver Data source.
<div id="attachment_5284" style="width: 568px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-data-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5284" class="wp-image-5284 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-data-source.png" alt="Add Gateway Data Source" width="558" height="533" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-data-source.png 558w, https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-data-source-300x287.png 300w" sizes="(max-width: 558px) 100vw, 558px" /></a><p id="caption-attachment-5284" class="wp-caption-text">Add Gateway Data Source</p></div></li>
<li>Now edit that XML data source to configure it. Enter your OData Service URL its typically like below. Replace 3 parts with your own value (i.e. replace {MY-INSTANCE},  {MY-PROJECT}, {MY-TABLE})<br />
<pre class="crayon-plain-tag">https://{MY-INSTANCE}/sap/opu/odata/sap/{MY-PROJECT}/{MY-TABLE}</pre>
For example if you are hosting SAP HANA in Cloud Instance then your URL may look like below<br />
<pre class="crayon-plain-tag">https://myXXXXXX-api.s4hana.ondemand.com/sap/opu/odata/sap/MyTestProject/PurchaseOrders</pre>
And create New ZS-HTTP connection in it select <a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/" target="_blank" rel="noopener">Basic Authentication</a> and enter your SAP HANA UserID / Password to call OData Service and select the desire filter.</p>
<div id="attachment_7497" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7497" class="wp-image-7497 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-768x537.png" alt="XML Driver : SAP S/4HANA OData Service Configuration" width="720" height="503" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-768x537.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-300x210.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service.png 1019w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7497" class="wp-caption-text">XML Driver : SAP S/4HANA OData Service Configuration</p></div></li>
<li>Now go to Data Format / Compression (Zip/GZip) tab and select Data Format as OData to get all the records.
<div id="attachment_7498" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7498" class="wp-image-7498 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-768x446.png" alt="Data Format : Odata" width="720" height="418" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-768x446.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-300x174.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format.png 792w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7498" class="wp-caption-text">Data Format : Odata</p></div></li>
<li>Finally, now using Query Builder and Code Generator we will generate the query.
<div id="attachment_6416" style="width: 766px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6416" class="wp-image-6416 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png" alt="odbc-json-driver-generate-quickbooks-query" width="756" height="432" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png 756w, https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query-300x171.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></a><p id="caption-attachment-6416" class="wp-caption-text">Generate Query</p></div></li>
<li>That’s it we are ready to load SAP S/4HANA OData Service data to SQL Server.</li>
</ol>
<h2>Load SAP S/4HANA OData Service in MS SQL Server</h2>
<div class="content_block" id="custom_post_widget-6457">Once you configured the data source in Gateway, we can now setup Linked Server in SQL Server to query API data.
<ol style="margin-left: 10px;">
 	<li>Assuming you have installed SQL Server and SSMS. If not then get both for FREE from here: <a href="https://www.microsoft.com/en-us/sql-server/sql-server-editions-express" target="_blank" rel="noopener">Get SQL Server Express</a> and  <a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms" target="_blank" rel="noopener">Get SSMS</a></li>
 	<li>Open SSMS and connect to 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://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-linked-server-ssms.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-linked-server-ssms.png?w=720&amp;ssl=1" alt="Add Linked Server in SQL Server" width="420" height="262" /></a>
<p class="wp-caption-text">Add 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 same as SQL Server machine or remote machine). Default PORT_NUMBER is 5000 but confirm on Data gateway &gt; General tab in case its 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 last option "<strong>Be made using this security context</strong>". Enter your gateway user account here.</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 Linked Server</li>
 	<li>In SSMS execute below SQL query to test your connectivity.
<pre class="">SELECT * FROM OPENQUERY( MY_LINKED_SERVER_NAME, 'SELECT * FROM $')</pre>
</li>
 	<li>Here is the preview after you run some REST API query in SQL Server. Notice that you can override default configuration by supplying <a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/json-odbc-driver-connectionstring.htm" target="_blank" rel="noopener">many parameters</a> in WITH clause (second query example in the screenshot).
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc_json_driver__api_query_data_in_mssqlserver.png" target="_blank" rel="noopener">
<img loading="lazy" decoding="async" width="750" height="354" class="wp-image-6455 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc_json_driver__api_query_data_in_mssqlserver.png" alt="odbc_json_driver_api_query_data_in_mssqlserver" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc_json_driver__api_query_data_in_mssqlserver.png 750w, https://zappysys.com/blog/wp-content/uploads/2019/01/odbc_json_driver__api_query_data_in_mssqlserver-300x142.png 300w" sizes="(max-width: 750px) 100vw, 750px" />
</a>
<p class="wp-caption-text">SSMS Output - Query REST API via Linked Server OPENQUERY statement (Connect to ZappySys Data Gateway)</p>

</div></li>
 	<li>You can wrap your queries inside View or wrap inside Stored procedure to parameterize. Here is an example of creating the view which calls REST API queries.
<pre class="lang:tsql decode:true">CREATE VIEW dbo.vw_MyAPICall_View 
AS 
/*Call REST API inside SQL Server View*/
SELECT * FROM OPENQUERY( MY_LINKED_SERVER_NAME , 'SELECT * FROM $');

GO
</pre>
</li>
 	<li>Notice in above approach if you parameterize Stored Procedure then <a href="https://zappysys.com/blog/create-csv-list-sql-server-table-columns-datatypes/" target="_blank" rel="noopener">check this article to understand Dynamic Metadata</a>.</li>
 	<li>Now let's insert API data into the new data table "tblMyAPiData" in the SQL server database. For that, we need to execute below SQL query.
<pre class="lang:tsql decode:true ">Select * into tblMyAPiData FROM OPENQUERY( MY_LINKED_SERVER_NAME , 'SELECT * FROM $')</pre>
<div class="wp-caption alignnone">

<a href="https://zappysys.com/blog/wp-content/uploads/2019/02/odbc_json_driver_insert_data_in_sql.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" width="681" height="571" class="wp-image-6469 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/odbc_json_driver_insert_data_in_sql.png" alt="odbc_json_driver_insert_data_in_sql" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/odbc_json_driver_insert_data_in_sql.png 681w, https://zappysys.com/blog/wp-content/uploads/2019/02/odbc_json_driver_insert_data_in_sql-300x252.png 300w" sizes="(max-width: 681px) 100vw, 681px" /></a>
<p class="wp-caption-text">Insert data into the new table</p>

</div></li>
 	<li>Let's insert and update records into the already created table <span class="lang:default decode:true crayon-inline">"tblMyAPiData"</span>
<ul>
 	<li>To do that first we need to insert the new API data into the <span class="lang:default decode:true crayon-inline">"#temp_tblMyAPiData"</span> temporary database table.</li>
 	<li>Now let's delete the old records from the database table which are updated.</li>
 	<li>At the last insert all new API data into the database table.</li>
 	<li>To do that, we need to query like below SQL queries.</li>
</ul>
<pre class="lang:default decode:true">SELECT * into #temp_tblMyAPiData FROM OPENQUERY(MY_LINKED_SERVER_NAME, 'SELECT * FROM $')

DELETE FROM [dbo].[tblMyAPiData] WHERE id in (SELECT id FROM #temp_tblMyAPiData)

INSERT INTO tblMyAPiData
SELECT * FROM #temp_tblMyAPiData</pre>
&nbsp;</li>
 	<li>In the upper step, we see how to insert and update new records. Now if you want to update particular fields records only then you need to query like this.
<pre class="lang:default decode:true">Update dbtbl_1
set dbtbl_1.field1 = dbtbl_2.field1,
    dbtbl_1.field2 = dbtbl_2.field2
FROM tblMyAPiData dbtbl_1
JOIN (SELECT * FROM OPENQUERY(MY_LINKED_SERVER_NAME, 'SELECT * FROM $')) dbtbl_2 on dbtbl_1.id=dbtbl_2.id</pre>
<div class="su-note-inner su-clearfix" style="background-color: #fff4b7;border-color: #fffdf1;color: #333333">
<blockquote>*NOTE: If you are getting error like : "<strong>Cannot resolve the collation conflict between “Latin1_General_CI_AI” and “SQL_Latin1_General_CP1_CI_AS” in the equal to operation</strong>" then you need to query like this :
<pre class="lang:default decode:true">Update dbtbl_1
set dbtbl_1.field1 = dbtbl_2.field1,
    dbtbl_1.field2 = dbtbl_2.field2
FROM tblMyAPiData dbtbl_1
JOIN (SELECT * FROM OPENQUERY(MY_LINKED_SERVER_NAME, 'SELECT * FROM $')) dbtbl_2 
on dbtbl_1.id=dbtbl_2.id 
<strong>COLLATE SQL_Latin1_General_CP1_CI_AS</strong></pre>
&nbsp;</blockquote>
</div></li>
</ol></div>
<h2>SAP S/4HANA Integration with Other BI Tools (Power BI, Excel, SSRS, MS Access&#8230;)</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>
<h2><span id="Step-by-Step_Import_REST_API_into_Power_BI">Conclusion</span></h2>
<p>So in this blog, we learned how to Import SAP S/4HANA OData Service Data in MS SQL Server using <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML / SOAP API Driver</a> in a very simple way. You can achieve many more functionalities with this tool. Check our blogs/articles on <strong>XML File / REST API Driver </strong><a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/">https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/</a> to find out what <em>this tool</em> is capable of more.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information about the use of SAP S/4HANA OData Service with our tools:</p>
<ul>
<li><a href="https://api.sap.com/" target="_blank" rel="noopener">SAP API Business Hub</a></li>
<li><strong>Landing Page</strong> for <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML / SOAP API Driver</a>, you can also find <a href="https://youtu.be/iwezz0Z3D4U" target="_blank" rel="noopener">Tutorial Video</a> here.</li>
<li><strong>Help File:</strong> Documentation of <a href="https://zappysys.com/onlinehelp/odbc-powerpack/index.htm#page=xml-odbc-driver-intro.htm" target="_blank" rel="noopener">XML Driver</a>.</li>
<li><strong>Blog/articles link</strong>: <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/" target="_blank" rel="noopener">https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/import-sap-s-4hana-odata-service-sql-server/">Import SAP S/4HANA OData Service Data Into Sql Server via ODBC Driver</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Import Bing Ads data into SQL Server (Performance Reports)</title>
		<link>https://zappysys.com/blog/import-bing-ads-data-sql-server-performance-reports/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 13 Jun 2019 21:04:57 +0000</pubDate>
				<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[T-SQL (SQL Server)]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[Bing Ads]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7217</guid>

					<description><![CDATA[<p>Introduction In our previous blog post we saw how to import REST / SOAP API in SQL Server. Using same concepts let&#8217;s look at how to import Bing Ads data into SQL Server. We will explore many techniques to call Bing Ads API and learn how to automate data extraction without doing any ETL. You [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-bing-ads-data-sql-server-performance-reports/">Import Bing Ads data into SQL Server (Performance Reports)</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/06/bing-ads-logo.png"><img loading="lazy" decoding="async" class=" wp-image-7363 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/06/bing-ads-logo.png" alt="" width="190" height="158" /></a>In our previous blog post we saw how to <a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">import REST / SOAP API in SQL Server</a>. Using same concepts let&#8217;s look at how to import Bing Ads data into SQL Server. We will explore many techniques to call Bing Ads API and learn how to automate data extraction without doing any ETL. You can call Bing Ads API just using T-SQL code (Yes you heard it right). At the end of this article you will learn how to <strong>Download Performance Reports from Bing Ads Account</strong> without any coding (See sample screenshot below). Please go through full article carefully.</p>
<p><strong>NOTE:</strong> Bing Ads now renamed as Microsoft Advertising but this article will use popular name for time being.</p>
<h2></h2>
<div id="attachment_7218" style="width: 841px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7218" class="size-full wp-image-7218" src="https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table.png" alt="Import Bing Ads data into SQL Server (Using SSMS T-SQL Code)" width="831" height="741" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table.png 831w, https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table-300x268.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table-768x685.png 768w" sizes="(max-width: 831px) 100vw, 831px" /></a><p id="caption-attachment-7218" class="wp-caption-text">Import Bing Ads data into SQL Server (Using SSMS T-SQL Code)</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="content_block" id="custom_post_widget-7048"><h2>Requirements</h2>
This article talks about few tools and techniques in order to load API data in SQL Server. Please make sure following prerequisites are met.
<ol>
 	<li>Download and Install <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> (This includes XML / JSON / REST API and few other drivers for SQL Server and ODBC connectivity in tools like Excel, Power BI, SSRS)</li>
 	<li>Make sure you have access to SQL Server Instance. If you cant find one still want to try what is mentioned in this article then install <a href="https://www.microsoft.com/en-us/sql-server/sql-server-editions-express" target="_blank" rel="noopener">FREE SQL Express Edition</a></li>
 	<li>Confirm that you have SSMS Installed. If you don't have then you can download <a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017">from here</a>.</li>
</ol></div>
<h2>About Bing Ads API / SOAP Web Service</h2>
<p>If you are new to Bing Ads API then <a href="https://docs.microsoft.com/en-us/advertising/" target="_blank" rel="noopener">start from here</a>. Bing Ads APIs are SOAP XML APIs. You can call it to automate <a href="https://docs.microsoft.com/en-us/advertising/guides/?view=bingads-13" target="_blank" rel="noopener">many scenarios</a> for Bing Ads. In this article we will mainly focus on read scenario (e.g. Read Performance Data) but you can use these techniques to write / update (e.g. Create New Campaign).</p>
<p>If you are new to SOAP WebService then <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">Check this article</a> to learn more. It will explain you how to use tools like <strong>SoapUI</strong> tool to craft SOAP Requests for Bing API or any other SOAP API.</p>
<p>For Bing API you can use Service WSDL files <a href="https://docs.microsoft.com/en-us/advertising/guides/web-service-addresses?view=bingads-13" target="_blank" rel="noopener">found here</a>. Use URL ending <strong>?wsdl</strong> to import in SoapUI.</p>
<h2>Example Bing API Request</h2>
<p>Here is raw API request for Bing API. This sample assumes you have completed 3-Legged OAuth Authorization to obtain AccessToken and RefreshToken (Explained later in this article). Below request uses AccessToken you might have already obtained via <a href="https://docs.microsoft.com/en-us/advertising/guides/get-started?view=bingads-13#get-developer-token" target="_blank" rel="noopener">process like this</a>. If you are using ZappySys tools then this will be generated automatically for you.</p>
<p><strong>Request Method / URL:</strong></p><pre class="crayon-plain-tag">POST https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v13/CustomerManagementService.svc</pre><p>
<strong>Headers:<br />
</strong>Notice that for each Api you may need correct <strong>SOAPAction</strong> in Header. If you are not sure then use SoapUI Tool. Execute request in SoapUI and then go to <strong>Raw tab </strong><a href="https://zappysys.com/blog/wp-content/uploads/2016/06/soapui-get-contenttype-soapaction-raw-tab.png" target="_blank" rel="noopener">like this one</a>.</p><pre class="crayon-plain-tag">Content-Type: text/xml; charset=utf-8
SOAPAction: "GetUser"</pre><p>
<strong>Body:<br />
</strong>Notice that you have to replace <strong>AuthenticationToken</strong> and <strong>DeveloperToken</strong> in below request. AccessToken is placed inside AuthenticationToken tag. This Auth token is short lived and extracted via OAuth Process and DeveloperToken you can extract as mentioned in the previous section <a href="https://developers.ads.microsoft.com/Account">or get it from here</a>.</p><pre class="crayon-plain-tag"><s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/Customer/v13">
    <Action mustUnderstand="1">GetUser</Action>
    <AuthenticationToken i:nil="false"><%access_token%></AuthenticationToken>
    <DeveloperToken i:nil="false">1052Bxxxxxxxxxxxxxx</DeveloperToken>
  </s:Header>
  <s:Body>
    <GetUserRequest xmlns="https://bingads.microsoft.com/Customer/v13">
      <UserId i:nil="true"></UserId>
    </GetUserRequest>
  </s:Body>
</s:Envelope></pre><p>
<strong>Response:</strong></p><pre class="crayon-plain-tag">&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Header&gt;
    &lt;h:TrackingId xmlns:h="https://bingads.microsoft.com/Customer/v13"&gt;fddf3cb9-e4c2-4e75-9546-f3bc20ea91a8&lt;/h:TrackingId&gt;
  &lt;/s:Header&gt;
  &lt;s:Body&gt;
    &lt;GetUserResponse xmlns="https://bingads.microsoft.com/Customer/v13"&gt;
      &lt;User xmlns:a="https://bingads.microsoft.com/Customer/v13/Entities" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;
        &lt;a:ContactInfo&gt;
          &lt;a:Address&gt;
            &lt;a:City i:nil="true" /&gt;
            &lt;a:CountryCode&gt;US&lt;/a:CountryCode&gt;
            &lt;a:Id i:nil="true" /&gt;
            &lt;a:Line1 i:nil="true" /&gt;
            &lt;a:Line2 i:nil="true" /&gt;
            &lt;a:Line3 i:nil="true" /&gt;
            &lt;a:Line4 i:nil="true" /&gt;
            &lt;a:PostalCode i:nil="true" /&gt;
            &lt;a:StateOrProvince i:nil="true" /&gt;
            &lt;a:TimeStamp i:nil="true" /&gt;
            &lt;a:BusinessName i:nil="true" /&gt;
          &lt;/a:Address&gt;
          &lt;a:ContactByPhone&gt;false&lt;/a:ContactByPhone&gt;
          &lt;a:ContactByPostalMail&gt;false&lt;/a:ContactByPostalMail&gt;
          &lt;a:Email&gt;someone@zappysys.com&lt;/a:Email&gt;
          &lt;a:EmailFormat i:nil="true" /&gt;
          &lt;a:Fax i:nil="true" /&gt;
          &lt;a:HomePhone i:nil="true" /&gt;
          &lt;a:Id&gt;48045678&lt;/a:Id&gt;
          &lt;a:Mobile i:nil="true" /&gt;
          &lt;a:Phone1&gt;111-222-3333&lt;/a:Phone1&gt;
          &lt;a:Phone2 i:nil="true" /&gt;
        &lt;/a:ContactInfo&gt;
        &lt;a:CustomerId&gt;19112345&lt;/a:CustomerId&gt;
        &lt;a:Id&gt;48012345&lt;/a:Id&gt;
        &lt;a:JobTitle i:nil="true" /&gt;
        &lt;a:LastModifiedByUserId&gt;48012345&lt;/a:LastModifiedByUserId&gt;
        &lt;a:LastModifiedTime&gt;2019-06-04T14:22:35.38&lt;/a:LastModifiedTime&gt;
        &lt;a:Lcid&gt;EnglishUS&lt;/a:Lcid&gt;
        &lt;a:Name&gt;
          &lt;a:FirstName&gt;Someone&lt;/a:FirstName&gt;
          &lt;a:LastName&gt;Good&lt;/a:LastName&gt;
          &lt;a:MiddleInitial i:nil="true" /&gt;
        &lt;/a:Name&gt;
        &lt;a:Password i:nil="true" /&gt;
        &lt;a:SecretAnswer i:nil="true" /&gt;
        &lt;a:SecretQuestion&gt;None&lt;/a:SecretQuestion&gt;
        &lt;a:UserLifeCycleStatus&gt;Active&lt;/a:UserLifeCycleStatus&gt;
        &lt;a:TimeStamp&gt;AAAAAJiX/cU=&lt;/a:TimeStamp&gt;
        &lt;a:UserName&gt;someone@zappysys.com&lt;/a:UserName&gt;
        &lt;a:ForwardCompatibilityMap i:nil="true" xmlns:b="http://schemas.datacontract.org/2004/07/System.Collections.Generic" /&gt;
      &lt;/User&gt;
      &lt;CustomerRoles xmlns:a="https://bingads.microsoft.com/Customer/v13/Entities" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;
        &lt;a:CustomerRole&gt;
          &lt;a:RoleId&gt;41&lt;/a:RoleId&gt;
          &lt;a:CustomerId&gt;19160000&lt;/a:CustomerId&gt;
          &lt;a:AccountIds i:nil="true" xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays" /&gt;
          &lt;a:LinkedAccountIds xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays" /&gt;
          &lt;a:CustomerLinkPermission i:nil="true" /&gt;
        &lt;/a:CustomerRole&gt;
      &lt;/CustomerRoles&gt;
    &lt;/GetUserResponse&gt;
  &lt;/s:Body&gt;
&lt;/s:Envelope&gt;</pre><p>
<div class="content_block" id="custom_post_widget-7357"><h2>Things to know about REST / SOAP API</h2>
Before we deep dive into calling your specific APIs you like to integrate, you must have basic understanding what is REST API / SOAP API. In this section we will cover few important concepts and difference about these two API styles REST vs SOAP.
<h3><strong>What is REST API (or RESTful API)</strong></h3>
As per wikipedia <a href="https://en.wikipedia.org/wiki/Representational_state_transfer" target="_blank" rel="noopener">REST</a> is an architecture style which can be used to to expose data over the internet using http / https. Using REST style you can expose data operations / functions which can be called by other users. With API calls You can read / write data or just call business functions which triggers some workflow.

Most APIs documents various aspects of calling API (REST or SOAP). You need to pass these details accurately. Refer to your API documentation <a href="https://developer.zendesk.com/rest_api/docs/support/introduction" target="_blank" rel="noopener">like this one for example</a> . If its an internal API then contact API developer to get more details.
<ul>
 	<li><strong>URL and Parameters</strong>  (or sometimes referred as endpoint)</li>
 	<li><strong>Request Method</strong> (or sometimes referred as Verb)- e.g. GET, POST, PUT, PATCH .....</li>
 	<li><strong>HTTP Headers</strong></li>
 	<li><strong>Request Body</strong></li>
</ul>
<strong>Sample REST API Call</strong>

<strong>Request:</strong>
<pre class="lang:default decode:true">POST http://myhost/api/v2/customers/new
X-SecretKey: Abcdxxxxxxxxxxxxxx
Content-Type: application/json

{ firstname: "Someone", lastname: "Good" }</pre>
<strong>Response:</strong>
<pre class="lang:default highlight:0 decode:true">{
 request_status: "CreatedOK",
 new_customer_id: "1234566"
}</pre>
<h3>What is SOAP Web Service (XML API)</h3>
<a href="https://en.wikipedia.org/wiki/SOAP" target="_blank" rel="noopener">SOAP Web Service</a> is an old standard developed before REST Style got popular. SOAP is strictly XML based API on the other hand RESTful API can be any format. As we said earlier REST is an architecture style,  and SOAP is a standard (XML Based Protocol to transfer data).

For more information on SOAP API <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">refer to this link / videos</a>
<h3>Other Concepts Calling REST / SOAP</h3>
There are few things you have to find out from your API Provider (Read their documentation <a href="https://developer.zendesk.com/rest_api/docs/support/introduction" target="_blank" rel="noopener">like this for example</a>). Few important concepts for API calling listed below.
<ul>
 	<li><strong>Authentication</strong> - Most APIs need some sort of credentials to verify your identity. Here are some common Auth mechanism
<ul>
 	<li><a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/">Basic Authentication</a>,</li>
 	<li><a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">OAuth 1a or 2.0</a></li>
 	<li><a href="https://zappysys.com/blog/call-soap-rest-api-using-dynamic-token-ssis/" target="_blank" rel="noopener">Dynamic Token Auth </a></li>
 	<li>Pass API key via URL Parameter
e.g. <span class="lang:default decode:true  crayon-inline">http://myhost/api/v1/getcustomers?apikey=###some-secret-key####</span></li>
 	<li>Pass API key via Header</li>
</ul>
</li>
 	<li><strong>Pagination</strong> - Most APIs don't return huge amount of data in a single requests so you must call next request to continue fetch more data until all rows are fetched. There is no standard around pagination so find out from your API provider how to paginate. <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">Check this article for example</a> to learn about various pagination patterns.</li>
 	<li><strong>Throttling (API calls rate limit)</strong> - Most API providers enforce API call rate limit. Which means you cannot call it more than X times in a given time. If you ever face such issue, You can enable <a href="https://zappysys.com/blog/wp-content/uploads/2018/09/http-retry-settings-oauth-connection.png" target="_blank" rel="noopener">error retry option like this</a> or simply <a href="https://zappysys.com/blog/wp-content/uploads/2016/01/rest-api-limit-throttling-pause-request-per-seconds.png" target="_blank" rel="noopener">add delay like this</a> to slow down.</li>
</ul>
<h3>Must have Tools for API Testing / Debugging</h3>
Before you start integrating API calls in ZappySys products like <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ODBC PowerPack</a> or <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> you can start testing API using tools like CURL, Postman or Fiddler.
<h4><strong>Fiddler</strong></h4>
Fiddler is the best API API debugger out there. It acts like a small Proxy server so you can see all Web requests on your system in a raw format. You can also use this tool to Test API requests (See Composer tab in Fiddler) however if API testing is your primary use case then use POSTMAN (see next) because it has more UI elements compared to Fiddler. Here is <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/">small tutorial to get started with Fiddler</a>.
<h4><strong>Postman</strong></h4>
<a href="https://www.getpostman.com/" target="_blank" rel="noopener">Postman</a> is probably the most popular tool to test API with full User interface. It's not data processing like ZappySys but you can pass various parts of API we talked earlier and test API before you can start using ZappySys for Data integration. Here is <a href="https://www.youtube.com/watch?v=t5n07Ybz7yI">Video Tutorial to get started with Postman</a>.
<h4><strong>cURL</strong></h4>
<a href="https://curl.haxx.se/">CURL</a> is a simple yet most popular command line tool to call / test APIs. It doesn't have UI elements like previous two tools so have to learn about each options you can pass to this command line.</div>
<h2>Step-By-Step: How to Import Bing Ads Data into SQL Server</h2>
<p>Now let&#8217;s look at how to import Bing Ads Data into SQL Server Table. This tutorial will require 10-15 mins of your time. At the end of this tutorial you will be able to Read Bing Ads Performance Report and Import data into SQL Server. Step listed in this tutorial may help you to call Bing API in other tools like <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/">SSIS</a>, <a href="https://zappysys.com/blog/call-soap-api-power-bi-read-xml-web-service-data/">Power BI</a>, SSRS, Tableau and so on.</p>
<p>So let&#8217;s get started.</p>
<h3>Register OAuth App for Bing Ads API (Azure Active Directory App)</h3>
<p>Very first thing to call any Bing API is to register OAuth App (Under Azure Active Directory Tab).</p>
<p>Here is how to register OAuth App which can be used to call Bing Ads API later on.</p>
<ol>
<li>
    <strong>Login to Azure Portal:</strong></p>
<ul>
<li>Navigate to the <a href="https://portal.azure.com/#home" target="_blank" rel="noopener"><strong>Azure Portal</strong></a> and log in using your credentials.</li>
</ul>
</li>
<li>
    <strong>Access Azure Active Directory:</strong></p>
<ul>
<li>In the left-hand menu, click on <a target="_blank" href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/Overview" rel="noopener"><strong>Azure Active Directory</strong></a>.</li>
</ul>
</li>
<li>
    <strong>Register a New Application:</strong></p>
<ul>
<li>Go to <a target="_blank" href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps" rel="noopener"><strong>App registrations</strong></a> and click on <strong>New registration</strong>.<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2019/07/register-azure-active-directory-oauth-app.png"><img loading="lazy" decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2019/07/register-azure-active-directory-oauth-app.png" alt="" width="638" height="368" class="alignnone size-full wp-image-7344" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/register-azure-active-directory-oauth-app.png 638w, https://zappysys.com/blog/wp-content/uploads/2019/07/register-azure-active-directory-oauth-app-300x173.png 300w" sizes="(max-width: 638px) 100vw, 638px" /></a>
</li>
<li><strong>Application Name:</strong> Enter a name for your application.<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2019/07/create-new-azure-oauth-app-select-type.png"><img loading="lazy" decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2019/07/create-new-azure-oauth-app-select-type.png" alt="" width="392" height="567" class="alignnone size-full wp-image-7345" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/create-new-azure-oauth-app-select-type.png 392w, https://zappysys.com/blog/wp-content/uploads/2019/07/create-new-azure-oauth-app-select-type-207x300.png 207w" sizes="(max-width: 392px) 100vw, 392px" /></a>
</li>
<li><strong>Supported Account Types:</strong> Choose the account types your app will support. For example, select <strong>Accounts in this organizational directory only</strong> if you need access to data in your organization only.</li>
<li><strong>Redirect URI:</strong>
<ul>
<li>Set the type to <strong>Web</strong>.</li>
<li>In the textbox enter <b>https://login.microsoftonline.com/common/oauth2/nativeclient</b> as the Redirect URI or any other valid redirect URL, e.g., <b>https://zappysys.com/oauth</b>.</li>
<li>Use this Redirect URI in the <strong>Redirect URL</strong> grid row.</li>
</ul>
</li>
</ul>
</li>
<li>
    <strong>Save Client ID:</strong></p>
<ul>
<li>After registering the app, copy the <strong>Application (client) ID</strong> and paste it into the <strong>Client ID</strong> field in the API Connection Manager configuration.</li>
</ul>
</li>
<li>
    <strong>Set Authorization &amp; Token URLs:</strong></p>
<ul>
<li>Click on the <strong>Endpoints</strong> link in the App registration overview.</li>
<li><strong>Authorization URL:</strong> Copy the <strong>OAuth 2.0 authorization endpoint (v2)</strong> URL (e.g., <code>https://login.microsoftonline.com/{your-tenant-id}/oauth2/v2.0/authorize</code>) and paste it into the <strong>Authorization URL</strong> field in the configuration grid.</li>
<li><strong>Token URL:</strong> Copy the <strong>OAuth 2.0 token endpoint (v2)</strong> URL (e.g., <code>https://login.microsoftonline.com/{your-tenant-id}/oauth2/v2.0/token</code>) and paste it into the <strong>Token URL</strong> field.</li>
</ul>
</li>
<li>
    <strong>Create a Client Secret:</strong></p>
<ul>
<li>In the <strong>Certificates &amp; secrets</strong> tab, click <strong>New client secret</strong>.</li>
<li>Set an expiration period for the secret.</li>
<li>Copy the generated client secret and paste it into the <strong>Client Secret</strong> field in the API Connection Manager configuration.</li>
</ul>
</li>
<li>
    <strong>Configure API Permissions:</strong></p>
<ul>
<li>Go to the <strong>API Permissions</strong> section.</li>
<li>Click on <strong>Add a permission</strong>, select <strong>Microsoft Graph</strong>, and choose <strong>Delegated Permissions</strong>.</li>
<li>Add the required permissions:
<ul>
<li>offline_access</li>
<li>openid</li>
<li>profile</li>
<li>Sites.Read.All</li>
<li>Sites.ReadWrite.All</li>
<li>User.Read</li>
<li>email</li>
</ul>
<div id="attachment_11177" style="width: 903px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/azure-ad-app-required-app-permissions.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11177" src="https://zappysys.com/blog/wp-content/uploads/2019/06/azure-ad-app-required-app-permissions.jpg" alt="azure-ad-app-required-app-permissions" width="893" height="681" class="size-full wp-image-11177" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/azure-ad-app-required-app-permissions.jpg 893w, https://zappysys.com/blog/wp-content/uploads/2019/06/azure-ad-app-required-app-permissions-300x229.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/azure-ad-app-required-app-permissions-768x586.jpg 768w" sizes="(max-width: 893px) 100vw, 893px" /></a><p id="caption-attachment-11177" class="wp-caption-text">Azure AD App &#8211; Required API Permissions</p></div>
      </li>
<li><strong>Grant Admin Consent</strong> for the permissions that require it.</li>
</ul>
</li>
<li>
    <strong>Generate Tokens:</strong></p>
<ul>
<li>Use the <strong>Generate Token</strong> feature in the API Connection Manager to generate authentication tokens.</li>
</ul>
</li>
<li>
    <strong>Use a Generic Account for Automation:</strong></p>
<div style="background-color: #f5f2c4; border-style: solid; border-color: #000000; border-width: 1px; margin-top: 3px; margin-bottom: 6px; padding: 6px;">
		<b>NOTE</b>: If you are planning to use your current data connection/token for automated processes, we recommend that you use a generic account for token generation when the login box appears (e.g. sales_automation@mycompany.com instead of bob_smith@mycompany.com). When you use a personal account which is tied to a specific employee profile and that employee leaves the company, the token may become invalid and any automated processes using that token will fail. Another potentially unwanted effect of using a personal token is incorrect logging; the API calls (e.g. Read, Edit, Delete, Upload) made with that token will record the specific user as performing the calls instead of an automated process.
    </div>
</li>
<li>That&#8217;s it!</li>
</ol>
<h3>Get Bing API Developer Token</h3>
<p>Once we have OAuth App registered next thing is to obtain Developer Token for Bing Ads API. <a href="https://developers.ads.microsoft.com/Account" target="_blank" rel="noopener">Click here to request new token</a> or view existing Developer token.</p>
<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>Create new Bing Ads API Data Source in Gateway</h3>
<p>Once you setup Data Gateway user we can move to next step. To call Bing API we need to setup Connection for XML Driver in ZappySys Data Gateway.</p>
<ol>
<li>Click on Add New Data source. Name as <strong>BingAds</strong> and select <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener"><strong>Native &#8211; ZappySys XML Driver</strong></a> option.
<div id="attachment_5557" style="width: 572px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_add_native_driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5557" class="size-full wp-image-5557" src="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_add_native_driver.png" alt="Add Gateway Data Source" width="562" height="539" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_add_native_driver.png 562w, https://zappysys.com/blog/wp-content/uploads/2018/11/odbc_json_driver_add_native_driver-300x288.png 300w" sizes="(max-width: 562px) 100vw, 562px" /></a><p id="caption-attachment-5557" class="wp-caption-text">Add Gateway Data Source</p></div></li>
<li>Now click Edit to Configure Settings. For now we will only care OAuth Connection settings. All other options are overwritten in SQL Query.
<div id="attachment_5440" style="width: 572px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-2-2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5440" class="size-full wp-image-5440" src="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-2-2.png" alt="Edit Gateway Data Source Settings" 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" /></a><p id="caption-attachment-5440" class="wp-caption-text">Edit Gateway Data Source Settings</p></div></li>
<li>When UI opens Click on Load ConnectionString and Paste below connection string after changing some items (<strong>Screenshot may be differ</strong>). Make sure to replace following attributes.<strong>RefreshTokenFilePath</strong> &#8211; Enter some valid file path which will hold refresh token<br />
<strong>ClientId</strong> &#8211; get Application Id from Azure Portal under App we created earlier)<br />
<strong>DeveloperToken</strong> &#8211; Replace 1052Bxxxxxxxxxxxx with your own devloper token.</p>
<div id="attachment_7024" style="width: 996px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7024" class="size-full wp-image-7024" src="https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring.png" alt="Load ZappySys Driver ConnectionString to configure UI" width="986" height="454" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring.png 986w, https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring-300x138.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring-768x354.png 768w" sizes="(max-width: 986px) 100vw, 986px" /></a><p id="caption-attachment-7024" class="wp-caption-text">Load ZappySys Driver ConnectionString to configure UI</p></div>
<p><strong>Use below string and replace parameters </strong></p><pre class="crayon-plain-tag">DRIVER={ZappySys XML Driver};
DataPath='https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v13/CustomerManagementService.svc';
DataConnectionType=OAuth;
AuthUrl='https://login.microsoftonline.com/common/oauth2/v2.0/authorize';
TokenUrl='https://login.microsoftonline.com/common/oauth2/v2.0/token';
ReturnUrl='https://login.microsoftonline.com/common/oauth2/nativeclient';
RefreshTokenFilePath='c:\xxxxxx_some_folder_xxxxxxx\BingAds_RefreshToken.txt';
ScopeSeparator='{space}';
Scope='https://ads.microsoft.com/ads.manage offline_access';
ClientId='xxxxxxxxxxxxxx';
UseCustomApp=True;
RequestData='&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Header&gt;
    &lt;h:ApplicationToken i:nil="true" xmlns:h="https://bingads.microsoft.com/Customer/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:AuthenticationToken xmlns:h="https://bingads.microsoft.com/Customer/v13"&gt;&lt;%access_token%&gt;&lt;/h:AuthenticationToken&gt;
    &lt;h:DeveloperToken xmlns:h="https://bingads.microsoft.com/Customer/v13"&gt;1052Bxxxxxxxxxxxx&lt;/h:DeveloperToken&gt;
    &lt;h:Password i:nil="true" xmlns:h="https://bingads.microsoft.com/Customer/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:UserName i:nil="true" xmlns:h="https://bingads.microsoft.com/Customer/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
  &lt;/s:Header&gt;
  &lt;s:Body&gt;
    &lt;GetUserRequest xmlns="https://bingads.microsoft.com/Customer/v13"&gt;
      &lt;UserId i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;/GetUserRequest&gt;
  &lt;/s:Body&gt;
&lt;/s:Envelope&gt;';
RequestContentTypeCode=TextXml;
RequestMethod='POST';
RequestHeaders='SOAPAction: "GetUser"'</pre><p>
</li>
<li>Next to <strong>OAuth</strong> Click on <strong>Configure Settings</strong></li>
<li>By default most of settings on OAuth connections should be pre-populated for you but still lets Notice few things. This is how to setup redirect URI</li>
<li>
<div id="attachment_7360" style="width: 1027px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/configure-oauth-redirect-url-azure-active-directory-oauth-app.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7360" class="size-full wp-image-7360" src="https://zappysys.com/blog/wp-content/uploads/2019/06/configure-oauth-redirect-url-azure-active-directory-oauth-app.png" alt="Configure Redirect URI for Bing Ads API OAuth Connection" width="1017" height="486" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/configure-oauth-redirect-url-azure-active-directory-oauth-app.png 1017w, https://zappysys.com/blog/wp-content/uploads/2019/06/configure-oauth-redirect-url-azure-active-directory-oauth-app-300x143.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/configure-oauth-redirect-url-azure-active-directory-oauth-app-768x367.png 768w" sizes="(max-width: 1017px) 100vw, 1017px" /></a><p id="caption-attachment-7360" class="wp-caption-text">Configure Redirect URI for Bing Ads API OAuth Connection</p></div></li>
<li>Here is where you setup <a href="https://zappysys.zendesk.com/hc/en-us/articles/115004555334-How-to-handle-Changing-OAuth-RefreshToken-in-SSIS-ODBC-" target="_blank" rel="noopener">Changing Refresh Token File path</a>. if you dont supply this path then your refresh token extracted first time will expire in 60 days.
<div id="attachment_7361" style="width: 609px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/handle-oauth-changing-refresh-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7361" class="size-full wp-image-7361" src="https://zappysys.com/blog/wp-content/uploads/2019/06/handle-oauth-changing-refresh-token.png" alt="Refresh Token File path (Only needed if API issues new Refresh Token when you request AccessToken)" width="599" height="355" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/handle-oauth-changing-refresh-token.png 599w, https://zappysys.com/blog/wp-content/uploads/2019/06/handle-oauth-changing-refresh-token-300x178.png 300w" sizes="(max-width: 599px) 100vw, 599px" /></a><p id="caption-attachment-7361" class="wp-caption-text">Refresh Token File path (Only needed if API issues new Refresh Token when you request AccessToken)</p></div></li>
<li>Once you verify all settings <strong>click</strong> <strong>Generate Token</strong> and Finish the process. It will populate <strong>AccessToken</strong> and <strong>RefreshToken</strong> Fields if everything goes well.
<div id="attachment_7359" style="width: 1054px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/configure-zppysys-bing-ads-driver-oauth-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7359" class="size-full wp-image-7359" src="https://zappysys.com/blog/wp-content/uploads/2019/06/configure-zppysys-bing-ads-driver-oauth-connection.png" alt="Configure Bing Ads API Connection (OAuth 2.0)" width="1044" height="605" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/configure-zppysys-bing-ads-driver-oauth-connection.png 1044w, https://zappysys.com/blog/wp-content/uploads/2019/06/configure-zppysys-bing-ads-driver-oauth-connection-300x174.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/configure-zppysys-bing-ads-driver-oauth-connection-768x445.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/configure-zppysys-bing-ads-driver-oauth-connection-1024x593.png 1024w" sizes="(max-width: 1044px) 100vw, 1044px" /></a><p id="caption-attachment-7359" class="wp-caption-text">Configure Bing Ads API Connection (OAuth 2.0)</p></div></li>
<li>Click OK to save OAuth Connection UI to go back to main UI</li>
<li>You can now <strong>Click Test Connection</strong> to confirm everything</li>
<li>If you need to access Gateway from Other machine then go to <strong>Firewall tab</strong> and Click Add Rule</li>
<li><strong>Click Save</strong> button <strong>on Gateway UI</strong> to save and restart the service.</li>
</ol>
<h3>Create a new Linked Server for Bing Ads API</h3>
<p>Once we setup setup Bing Ads Data Source in Gateway we can move to next step which is create a Linked Server which points to Data gateway Data source we created. This will create a bridge between ZappySys Driver and SQL Server so you can call API via T-SQL.</p>
<ol>
<li>If you are using Latest ODBC PowerPack then on Data gateway UI you will See <strong>App Integration Tab</strong>. Copy Code and run it in SSMS to create a new linked server.
<div id="attachment_7366" style="width: 774px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/data-gateway-code-generator-sql-linked-server.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7366" class="size-full wp-image-7366" src="https://zappysys.com/blog/wp-content/uploads/2019/06/data-gateway-code-generator-sql-linked-server.png" alt="ZappySys Data Gateway code generator for Linked Server" width="764" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/data-gateway-code-generator-sql-linked-server.png 764w, https://zappysys.com/blog/wp-content/uploads/2019/06/data-gateway-code-generator-sql-linked-server-300x276.png 300w" sizes="(max-width: 764px) 100vw, 764px" /></a><p id="caption-attachment-7366" class="wp-caption-text">ZappySys Data Gateway code generator for Linked Server</p></div></li>
<li>If things go well when you execute code you may see some result in grid.</li>
</ol>
<h3>Run sample Queries to call Bing API in SQL Server / Import Data</h3>
<p>Once Linked Server is created we can run various queries like below.</p>
<p><strong>Example-1</strong></p><pre class="crayon-plain-tag">--use all default settings from gateway data source UI
--Read
Select * from OPENQUERY( [YourLinkedServer] , 'select * from $')&amp;nbsp;

/*
--import
Select * into #tempTable from OPENQUERY( [YourLinkedServer] , 'select * from $') 
Select * from #tempTable
*/</pre><p>
<strong>Example-2</strong></p><pre class="crayon-plain-tag">--use Filter to extract specific Node from response XML
Select * from OPENQUERY( [YourLinkedServer] , 
'select * from $
WITH(Filter=''$.s:Envelope.s:Body.GetUserRequest[*]'', 
  ElementsToTreatAsArray=''GetUserResponse'' 
   )'
)</pre><p>
&nbsp;</p>
<p><strong>Example-3</strong></p><pre class="crayon-plain-tag">--Override URL, Headers and Body Settings. Change DeveloperToken in below request
--Header, Filter, URL, Request data is different for each Endpoint

SELECT * FROM OPENQUERY([YourLinkedServer]
, 'SELECT * FROM $
WITH(
	 ElementsToTreatAsArray=''GetUserResponse''
	,Src=''https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v13/CustomerManagementService.svc''
	,Filter=''$.s:Envelope.s:Body.GetUserResponse[*]''	
	,Header=''SOAPAction: "GetUser"''	
	,RequestData=''&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v13="https://bingads.microsoft.com/Customer/v13"&gt;
&lt;soapenv:Header&gt;
   &lt;v13:DeveloperToken&gt;1052xxxxxxxxxxxxx&lt;/v13:DeveloperToken&gt;
   &lt;v13:AuthenticationToken&gt;&lt;%access_token%&gt;&lt;/v13:AuthenticationToken&gt;
&lt;/soapenv:Header&gt;
&lt;soapenv:Body&gt;
   &lt;v13:GetUserRequest&gt;
      &lt;v13:UserId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/&gt;
   &lt;/v13:GetUserRequest&gt;
&lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;''
)')</pre><p>
&nbsp;</p>
<h3>Download Bing Ads Performance Data in SQL Server Table</h3>
<p>Now lets look at more complex example to read data from Bing Performance Report. Calling This API is tricky due to many steps involved in data extraction. But not to worry if you use ZappySys Drivers. This is API is somewhat similar as <a href="https://zappysys.com/blog/import-amazon-mws-data-sql-server-t-sql/" target="_blank" rel="noopener">Amazon MWS Report Request (See last section)</a>.</p>
<p>Here are high level steps needs to be performed to call API for Bing Ads Report (e.g. Performance Report)</p>
<ol>
<li>Call <a href="https://docs.microsoft.com/en-us/advertising/reporting-service/submitgeneratereport?view=bingads-13" target="_blank" rel="noopener">SubmitGenerateReportResponse</a> API to request new Report. This returns ReportRequestId</li>
<li>Now we have to keep checking every few seconds see report is ready or not. Call <a href="https://docs.microsoft.com/en-us/advertising/reporting-service/pollgeneratereport?view=bingads-13" target="_blank" rel="noopener">PollGenerateReport</a> until Status field is Success from Pending</li>
<li>Once previous step returns Success extract Report Download URL (Its Zip File which may contain data in CSV or XML)</li>
</ol>
<p>So lets get started to implement above login in a single T-SQL Query and load data into Table. There is a known limitation with Query Size we can send to data gateway from SSMS so we can use some tricks to read Body from File rather than hard coding in SQL. We can use IsMultiPart=True and then supply Filepath in RequestBody (Path must start with @ symbol)</p>
<ol>
<li>Bing Report API needs 2 additional values along with DeveloperToken we got earlier. You need to supply <strong>AccountId</strong> and <strong>CustomerId</strong> part of Body so obtain it by visiting below page in your bing account.<br />
Visit <a href="https://ads.microsoft.com/cc/accounts" target="_blank" rel="noopener">https://ads.microsoft.com/cc/accounts</a></p>
<div id="attachment_7362" style="width: 666px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/how-to-get-bing-ads-accountid-customerid.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7362" class="size-full wp-image-7362" src="https://zappysys.com/blog/wp-content/uploads/2019/06/how-to-get-bing-ads-accountid-customerid.png" alt="Obtain Bing Ads AccountId, ClientId for APi calls" width="656" height="556" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/how-to-get-bing-ads-accountid-customerid.png 656w, https://zappysys.com/blog/wp-content/uploads/2019/06/how-to-get-bing-ads-accountid-customerid-300x254.png 300w" sizes="(max-width: 656px) 100vw, 656px" /></a><p id="caption-attachment-7362" class="wp-caption-text">Obtain Bing Ads AccountId, ClientId for APi calls</p></div></li>
<li>Create new XML file for first step in a Notepad. Enter below content and save as <strong>C:\Requests\BingAds\sql_body1.xml</strong><br />
Replace Following Values as per your settingsCustomerAccountId (Found 2 places)<br />
CustomerId<br />
DeveloperToken<br />
<pre class="crayon-plain-tag">&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Header&gt;
    &lt;h:ApplicationToken i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:AuthenticationToken xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;&lt;%access_token%&gt;&lt;/h:AuthenticationToken&gt;
    &lt;h:CustomerAccountId xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;481xxxxxxxxxxx&lt;/h:CustomerAccountId&gt;
    &lt;h:CustomerId xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;191xxxxxxxxxxx&lt;/h:CustomerId&gt;
    &lt;h:DeveloperToken xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;1052Bxxxxxxxxxxx&lt;/h:DeveloperToken&gt;
    &lt;h:Password i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:UserName i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
  &lt;/s:Header&gt;
  &lt;s:Body&gt;
    &lt;SubmitGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v13"&gt;
      &lt;ReportRequest i:type="CampaignPerformanceReportRequest" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;
        &lt;ExcludeColumnHeaders&gt;false&lt;/ExcludeColumnHeaders&gt;
        &lt;ExcludeReportFooter&gt;false&lt;/ExcludeReportFooter&gt;
        &lt;ExcludeReportHeader&gt;false&lt;/ExcludeReportHeader&gt;
        &lt;Format&gt;Xml&lt;/Format&gt;
        &lt;ReportName&gt;My Campaign Performance Report&lt;/ReportName&gt;
        &lt;ReturnOnlyCompleteData&gt;false&lt;/ReturnOnlyCompleteData&gt;
        &lt;Aggregation&gt;Hourly&lt;/Aggregation&gt;
        &lt;Columns&gt;
          &lt;CampaignPerformanceReportColumn&gt;TimePeriod&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;AccountId&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;CampaignId&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;CampaignName&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;CampaignStatus&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;DeviceType&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;BidMatchType&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;QualityScore&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;AdRelevance&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;LandingPageExperience&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Revenue&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Assists&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;ExpectedCtr&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;DeliveredMatchType&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;AveragePosition&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Conversions&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;AdDistribution&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Network&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Clicks&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Impressions&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Ctr&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;AverageCpc&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;Spend&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;LowQualityClicks&lt;/CampaignPerformanceReportColumn&gt;
          &lt;CampaignPerformanceReportColumn&gt;LowQualityConversionRate&lt;/CampaignPerformanceReportColumn&gt;
        &lt;/Columns&gt;
        &lt;Filter&gt;
          &lt;AccountStatus i:nil="true" /&gt;
          &lt;AdDistribution i:nil="true" /&gt;
          &lt;DeviceOS i:nil="true" /&gt;
          &lt;DeviceType i:nil="true" /&gt;
          &lt;Status i:nil="true" /&gt;
        &lt;/Filter&gt;
        &lt;Scope&gt;
          &lt;AccountIds xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"&gt;
            &lt;a:long&gt;481xxxxxxxxxxx&lt;/a:long&gt;
          &lt;/AccountIds&gt;
          &lt;Campaigns i:nil="true" /&gt;
        &lt;/Scope&gt;
        &lt;Time&gt;
          &lt;CustomDateRangeEnd i:nil="true" /&gt;
          &lt;CustomDateRangeStart i:nil="true" /&gt;
          &lt;PredefinedTime&gt;Yesterday&lt;/PredefinedTime&gt;
          &lt;ReportTimeZone&gt;PacificTimeUSCanadaTijuana&lt;/ReportTimeZone&gt;
        &lt;/Time&gt;
      &lt;/ReportRequest&gt;
    &lt;/SubmitGenerateReportRequest&gt;
  &lt;/s:Body&gt;
&lt;/s:Envelope&gt;</pre>
&nbsp;</li>
<li>Create another XML file for second step in a Notepad. Enter below content and save as <strong>C:\Requests\BingAds\sql_body2.xml</strong><br />
Replace following values as per your need.<br />
<pre class="crayon-plain-tag">&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Header&gt;
    &lt;h:ApplicationToken i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:AuthenticationToken xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;&lt;%access_token%&gt;&lt;/h:AuthenticationToken&gt;
    &lt;h:CustomerAccountId xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;480xxxxxxxxxxx&lt;/h:CustomerAccountId&gt;
    &lt;h:CustomerId xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;191xxxxxxxxxxx&lt;/h:CustomerId&gt;
    &lt;h:DeveloperToken xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;1052Bxxxxxxxxxxx&lt;/h:DeveloperToken&gt;
    &lt;h:Password i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:UserName i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
  &lt;/s:Header&gt;
  &lt;s:Body&gt;
    &lt;PollGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v13"&gt;
      &lt;ReportRequestId&gt;[$a.ReportRequestId$]&lt;/ReportRequestId&gt;
    &lt;/PollGenerateReportRequest&gt;
  &lt;/s:Body&gt;
&lt;/s:Envelope&gt;</pre>
&nbsp;</li>
<li>Now try to execute below query. This should generate Performance report and download it in a SQL table for you.<br />
<pre class="crayon-plain-tag">select * into tmpBingAdsReport from OPENQUERY(Zs_BingAds,
'SELECT c.* FROM $
WITH(
	--submit report request for XML format

	 alias=''a'' 
	,Src=''https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc''
	,Filter=''$.s:Envelope.s:Body.SubmitGenerateReportResponse''
	,RequestData=''@C:\Requests\BingAds\sql_body1.xml''
	,IsMultiPart=''True''
	,RequestContentTypeCode=''TextXml''
	,Header=''SOAPAction: "SubmitGenerateReport"''
	,RequestMethod=''POST''
	,EnableBodyPlaceholderForMultiPart=''True''
	,Meta=''[{"Name": "ReportRequestId","Type": "Int64"}]''

	--keep checking status until report is ready - returns final url when done

	,join1_alias=''b''
	,join1_Filter=''$.s:Envelope.s:Body.PollGenerateReportResponse.ReportRequestStatus''
	,join1_RequestData=''@C:\Requests\BingAds\sql_body2.xml''
	,join1_IsMultiPart=''True''
	,join1_Src=''https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc''
	,join1_RequestContentTypeCode=''TextXml''
	,join1_Header=''SOAPAction: "PollGenerateReport"''
	,join1_RequestMethod=''POST''
	,join1_EnableBodyPlaceholderForMultiPart=''True''
	,join1_EnableStatusCheck=''True'', 
	,join1_StatucCheckMaxWaitSeconds=300, --wait max 5 mins?
	,join1_StatucCheckIterationWaitSeconds=5, --check every 5 sec?
	,join1_StatusSuccessValue=''Success'', --look for success word in response

	--Download report (Zip file) and Parse rows

	,join2_alias=''c''
	,join2_DataConnectionType=''Default''
	,join2_Src=''[$b.ReportDownloadUrl$]''
	,join2_Filter=''$.Report.Table.Row[*]''
	,join2_ElementsToTreatAsArray=''Row''	
	,join2_RequestMethod=''GET''
	,join2_IsMultiPart=''False''
	,join2_FileCompressionType=''Zip''	
)')

select * from tmpBingAdsReport</pre>
<div id="attachment_7218" style="width: 841px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7218" class="size-full wp-image-7218" src="https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table.png" alt="" width="831" height="741" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table.png 831w, https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table-300x268.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/import-bing-ads-data-into-sql-server-table-768x685.png 768w" sizes="(max-width: 831px) 100vw, 831px" /></a><p id="caption-attachment-7218" class="wp-caption-text">Import Bing Ads data into SQL Server</p></div></li>
</ol>
<h2>Multi Step Query to download Report</h2>
<p>So in previous section we saw how to write a single query to get your Performance Report from Bing Ads. However there will be time you want to split 3 steps into seperate queries.</p>
<p>Here is how to do.</p><pre class="crayon-plain-tag">/*
RPC and RPC OUT options must be turned on to run this proc

EXEC master.dbo.sp_serveroption @server=N'Zs_BingAds', @optname=N'rpc', @optvalue=N'true'
EXEC master.dbo.sp_serveroption @server=N'Zs_BingAds', @optname=N'rpc out', @optvalue=N'true'
--Below needed to support EXEC + INSERT (dynamic query)
EXEC master.dbo.sp_serveroption @server=N'Zs_BingAds, @optname=N'remote proc transaction promotion', @optvalue=N'false'
Also 
1. Change Body file path
2. Change CustomerAccountId, CustomerId, DeveloperToken
*/

ALTER proc usp_Api_BingAds_Reports
as
--///////////////////////////////////////////////////////////////////////////////
--Step-1 - submit report request for XML format
--///////////////////////////////////////////////////////////////////////////////
create table #tmpBingAdsReport_Step1(ReportRequestId bigint)
INSERT into #tmpBingAdsReport_Step1
EXEC(
'SELECT * FROM $
WITH(
 Src=''https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc''
,Filter=''$.s:Envelope.s:Body.SubmitGenerateReportResponse''
,RequestData=''@c:\BWProjects\Requests\BingAds\sql_body1.xml''
,IsMultiPart=''True''
,RequestContentTypeCode=''TextXml''
,Header=''SOAPAction: "SubmitGenerateReport"''
,RequestMethod=''POST''
,EnableBodyPlaceholderForMultiPart=''True''
,Meta=''[{"Name": "ReportRequestId","Type": "Int64"}]''
)') AT zs_BingAds


--///////////////////////////////////////////////////////////////////////////////
--Step2 - keep checking status until report is ready - returns final url when done
--///////////////////////////////////////////////////////////////////////////////

declare @reportid varchar(100)
select top 1 @reportid=cast(ReportRequestId as varchar(100)) from #tmpBingAdsReport_Step1

create table #tmpBingAdsReport_Step2(ReportDownloadUrl varchar(500))
INSERT into #tmpBingAdsReport_Step2 
EXEC(
'SELECT * FROM $
WITH(
 Filter=''$.s:Envelope.s:Body.PollGenerateReportResponse.ReportRequestStatus''
,RequestData=''&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Header&gt;
    &lt;h:ApplicationToken i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:AuthenticationToken xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;&lt;%access_token%&gt;&lt;/h:AuthenticationToken&gt;
    &lt;h:CustomerAccountId xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;480xxxxxxxxx&lt;/h:CustomerAccountId&gt;
    &lt;h:CustomerId xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;191xxxxxxxxx&lt;/h:CustomerId&gt;
    &lt;h:DeveloperToken xmlns:h="https://bingads.microsoft.com/Reporting/v13"&gt;105xxxxxxxxxxx&lt;/h:DeveloperToken&gt;
    &lt;h:Password i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;h:UserName i:nil="true" xmlns:h="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
  &lt;/s:Header&gt;
  &lt;s:Body&gt;
    &lt;PollGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v13"&gt;
      &lt;ReportRequestId&gt;'+ @reportid +'&lt;/ReportRequestId&gt;
    &lt;/PollGenerateReportRequest&gt;
  &lt;/s:Body&gt;
&lt;/s:Envelope&gt;''
--,IsMultiPart=''True''
,Src=''https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc''
,RequestContentTypeCode=''TextXml''
,Header=''SOAPAction: "PollGenerateReport"''
,RequestMethod=''POST''
--,EnableBodyPlaceholderForMultiPart=''True''
,EnableStatusCheck=''True'', 
,StatucCheckMaxWaitSeconds=300, --wait max 5 mins?
,StatucCheckIterationWaitSeconds=5, --check every 5 sec?
,StatusSuccessValue=''Success'', --look for success word in response
,Meta=''[{"Name": "ReportDownloadUrl","Type": "String",Length:"300"}]''
)') AT zs_BingAds


declare @reportpath varchar(500)
select top 1 @reportpath=ReportDownloadUrl from #tmpBingAdsReport_Step2

select * from #tmpBingAdsReport_Step1
select * from #tmpBingAdsReport_Step2

--///////////////////////////////////////////////////////////////////////////////
--Step-3 - Get report file
--///////////////////////////////////////////////////////////////////////////////
--Static table
--//INSERT INTO BingAdsReport
EXEC(
'SELECT * FROM $
WITH(
 DataConnectionType=''Default''
,Src='''+ @reportpath +'''
,Filter=''$.Report.Table.Row[*]''
,ElementsToTreatAsArray=''Row''	
,RequestMethod=''GET''
,IsMultiPart=''False''
,FileCompressionType=''Zip''	
)') AT zs_BingAds


--select * from tmpBingAdsReport_Step3
--select * from openquery(Bing, 'select * from $')


/*
select * into tmpBingAdsReport from OPENQUERY(zs_BingAds,
'SELECT c.* FROM $
WITH(
--submit report request for XML format

alias=''a'' 
,Src=''https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc''
,Filter=''$.s:Envelope.s:Body.SubmitGenerateReportResponse''
,RequestData=''@c:\BWProjects\Requests\BingAds\sql_body1.xml''
,IsMultiPart=''True''
,RequestContentTypeCode=''TextXml''
,Header=''SOAPAction: "SubmitGenerateReport"''
,RequestMethod=''POST''
,EnableBodyPlaceholderForMultiPart=''True''
,Meta=''[{"Name": "ReportRequestId","Type": "Int64"}]''

--keep checking status until report is ready - returns final url when done

,join1_alias=''b''
,join1_Filter=''$.s:Envelope.s:Body.PollGenerateReportResponse.ReportRequestStatus''
,join1_RequestData=''@c:\BWProjects\Requests\BingAds\sql_body2.xml''
,join1_IsMultiPart=''True''
,join1_Src=''https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc''
,join1_RequestContentTypeCode=''TextXml''
,join1_Header=''SOAPAction: "PollGenerateReport"''
,join1_RequestMethod=''POST''
,join1_EnableBodyPlaceholderForMultiPart=''True''
,join1_EnableStatusCheck=''True'', 
,join1_StatucCheckMaxWaitSeconds=300, --wait max 5 mins?
,join1_StatucCheckIterationWaitSeconds=5, --check every 5 sec?
,join1_StatusSuccessValue=''Success'', --look for success word in response

--Download report (Zip file) and Parse rows

,join2_alias=''c''
,join2_DataConnectionType=''Default''
,join2_Src=''[$b.ReportDownloadUrl$]''
,join2_Filter=''$.Report.Table.Row[*]''
,join2_ElementsToTreatAsArray=''Row''	
,join2_RequestMethod=''GET''
,join2_IsMultiPart=''False''
,join2_FileCompressionType=''Zip''	
)')

select * from tmpBingAdsReport

select * from openquery(Bing, 'select * from $')
*/
go</pre><p>
&nbsp;</p>
<h2>Conclusion</h2>
<p>In this article we saw how to import Bing Ads API data in SQL Server without any coding using <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack (SOAP / XML Driver)</a>. Download it it and try it for FREE to explore many API integration features not discussed in this article.</p>
<p>The post <a href="https://zappysys.com/blog/import-bing-ads-data-sql-server-performance-reports/">Import Bing Ads data into SQL Server (Performance Reports)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read SFTP / FTP Files in SSIS (CSV, JSON, XML)</title>
		<link>https://zappysys.com/blog/read-sftp-ftp-files-ssis-csv-json-xml/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 23 Mar 2019 08:54:48 +0000</pubDate>
				<category><![CDATA[SSIS SFTP / FTP Connection]]></category>
		<category><![CDATA[SSIS SFTP CSV Source]]></category>
		<category><![CDATA[SSIS SFTP JSON Source]]></category>
		<category><![CDATA[SSIS SFTP Task]]></category>
		<category><![CDATA[SSIS SFTP XML Source]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[ftps]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6632</guid>

					<description><![CDATA[<p>Introduction In our previous blog, we saw how to perform SFTP / FTP File Operations in SSIS. Now in this blog, we will see How to Read SFTP / FTP Files in SSIS (CSV, JSON, XML Format files). To illustrate, we will use ZappySys SSIS PowerPack, which includes several tasks to import/export data from multiples sources [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-sftp-ftp-files-ssis-csv-json-xml/">Read SFTP / FTP Files in SSIS (CSV, JSON, XML)</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/2018/03/ssis-sftp-ftp-ftps-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-3058 size-full alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis-sftp-ftp-ftps-task.png" alt="" width="100" height="100" /></a>In our previous blog, we saw <a href="https://zappysys.com/blog/ssis-sftp-task-examples-upload-download-move-delete-files-folders/" target="_blank" rel="noopener">how to perform SFTP / FTP File Operations in SSIS</a>. Now in this blog, we will see <strong>How to Read SFTP / FTP Files in SSIS (CSV, JSON, XML Format files)</strong>. To illustrate, we will use <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a>, which includes several tasks to import/export data from multiples sources to multiple destinations like flat files, Azure, AWS, databases, Office files and more. They are Coding free, drag and drop high-performance suite of <em>Custom SSIS Components</em> and <em>SSIS Tasks.</em> If you like to perform file operations on FTP Files (e.g. Download, Upload, Create, Delete) then <a href="https://zappysys.com/blog/category/ssis/tasks/ssis-sftp-task/" target="_blank" rel="noopener">check these articles</a>.</p>
<p>In nutshell, this post will focus on how to Read files from secure FTP Storage (CSV, JSON and XML Files) and load into SQL Server Table in few clicks.</p>
<p><strong>Components Mentioned in this article</strong><br />
<div class="su-table su-table-alternate">
<table style="width: 407px;height: 187px">
<tbody>
<tr>
<td style="width: 32.3864px"><img loading="lazy" decoding="async" src="https://i1.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/secure-ftp-json-source/ssis-secure-ftp-json-file-source.png?w=720&amp;ssl=1" alt="SSIS Amazon S3 CSV File Source" width="32" height="32" /></td>
<td style="width: 358.75px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-secure-ftp-json-file-source/" target="_blank" rel="noopener">Secure FTP Source for JSON File</a></td>
</tr>
<tr>
<td style="width: 32.3864px"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/secure-ftp-xml-source/ssis-secure-ftp-xml-file-source.png?w=720&amp;ssl=1" alt="SSIS Amazon S3 CSV File Destination" width="32" height="32" /></td>
<td style="width: 358.75px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-secure-ftp-xml-file-source/" target="_blank" rel="noopener">Secure FTP Source for XML File</a></td>
</tr>
<tr>
<td style="width: 32.3864px"><img loading="lazy" decoding="async" src="https://i2.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/secure-ftp-csv-source/ssis-secure-ftp-csv-file-source.png?w=720&amp;ssl=1" alt="SSIS Amazon S3 XML File Source" width="32" height="32" /></td>
<td style="width: 358.75px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-secure-ftp-csv-file-source/" target="_blank" rel="noopener">Secure FTP Source for CSV File</a></td>
</tr>
<tr>
<td style="width: 32.3864px"><img loading="lazy" decoding="async" src="https://i1.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/secure-ftp-csv-destination/ssis-secure-ftp-csv-file-destination.png?w=720&amp;ssl=1" alt="SSIS Amazon S3 JSON File Source" width="32" height="32" /></td>
<td style="width: 358.75px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-secure-ftp-csv-file-destination/" target="_blank" rel="noopener">Secure FTP Destination for CSV File</a><br />
<b></b></td>
</tr>
</tbody>
</table>
</div>
<h2>Prerequisite</h2>
<ol>
<li>First, you will need to have SSIS installed</li>
<li>Secondly, make sure to have SSDT</li>
<li>You have obtained FTP/SFTP Credential.</li>
<li>Finally, do not forget to install ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a></li>
</ol>
<h2><span id="Whats_is_FTP_FTPS_SFTP_FTPSSL">What is FTP, FTPS, SFTP, FTP/SSL?</span></h2>
<p>Many people still have confusion over various protocols around FTP terminology. Most common terms you hear are as below.</p>
<ul>
<li>FTP</li>
<li>Classic FTP</li>
<li>Secure FTP</li>
<li>SFTP</li>
<li>FTPS</li>
<li>FTP/SSL</li>
<li>FTP over SSL</li>
<li>FTP Over SSH</li>
</ul>
<p>You must be overwhelmed by now? So are they all same or different? See below for quick clarification in nutshell.</p>
<p>Mainly there are 2 protocols for FTP and yes they are very different but still used to do Files Transfer to/from the remote server.</p>
<ol>
<li><strong>Classic FTP</strong> – sometimes referred as just <strong>FTP</strong> (Typically server runs on Port 21)</li>
<li><strong>SFTP</strong> – Sometimes referred as <strong>Secure FTP</strong> or <strong>FTP over SSH</strong> (Typically server runs on Port 22)</li>
</ol>
<p>So in short SFTP is not the same as the Classic FTP protocol. SFTP is more secure because traffic is always encrypted. On the other hand, Classic FTP is not encrypted by default but you can use <strong>FTP over SSL</strong> to request encrypted traffic in classic FTP. <strong>FTP over SSL</strong> also referred to as <strong>FTPS or FTP/SSL</strong>.</p>
<h2>Getting Started</h2>
<p>In order to start, we will show several examples. ZappySys includes an <a href="https://zappysys.com/products/ssis-powerpack/#cat_secure_ftp" target="_blank" rel="noopener">SSIS Secure FTP Source for CSV/JSON/XML File</a> that will help you in reading CSV, JSON and XML Files from FTP to the Local machine, Upload files(s) to FTP Storage. It will also support Delete, Rename, List, Get Property, Copy, Move, Create, Set Permission … and many more operations. Here we are showing you is, How to download files from FTP Storage.</p>
<p>You can connect to your FTP by entering your FTP credentials.</p>
<h2>Read SFTP / FTP Files in SSIS (CSV, JSON, XML)</h2>
<p>Let´s start with an example. First of all, In this SSIS FTP Source for CSV/JSON/XML File task example, we will read CSV/JSON/XML files from FTP to SQL Server database.</p>
<ol>
<li>First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit
<div id="attachment_7934" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="wp-image-7934 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-7934" class="wp-caption-text">Drag and Drop SSIS Data Flow Task from SSIS Toolbox</p></div></li>
<li>Now drag and drop relevant Secure FTP for CSV/JSON/XML File Task from the SSIS Toolbox.
<div id="attachment_6635" style="width: 1118px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/Drag-and-drop-FTP-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6635" class="wp-image-6635 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/Drag-and-drop-FTP-source.png" alt="Drag and Drop FTP Source" width="1108" height="473" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/Drag-and-drop-FTP-source.png 1108w, https://zappysys.com/blog/wp-content/uploads/2019/03/Drag-and-drop-FTP-source-300x128.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/03/Drag-and-drop-FTP-source-768x328.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/03/Drag-and-drop-FTP-source-1024x437.png 1024w" sizes="(max-width: 1108px) 100vw, 1108px" /></a><p id="caption-attachment-6635" class="wp-caption-text">Drag and Drop FTP</p></div></li>
<li>Create a connection for Secure FTP Account.
<div id="attachment_6636" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/create-ftp-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6636" class="wp-image-6636 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/03/create-ftp-connection-768x514.png" alt="Create FTP Connection" width="720" height="482" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/create-ftp-connection-768x514.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/03/create-ftp-connection-300x201.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/03/create-ftp-connection-272x182.png 272w, https://zappysys.com/blog/wp-content/uploads/2019/03/create-ftp-connection.png 1022w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-6636" class="wp-caption-text">Create FTP Connection</p></div></li>
<li>Likewise, select the relevant single file to read from FTP in their relevant source of CSV/JSON/XML File Task.
<div id="attachment_6539" style="width: 944px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-Azure-Blob-Source-select-File.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6539" class="wp-image-6539 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-Azure-Blob-Source-select-File.png" alt="Select File From Azure Blob Storage" width="934" height="582" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-Azure-Blob-Source-select-File.png 934w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-Azure-Blob-Source-select-File-300x187.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-Azure-Blob-Source-select-File-768x479.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-Azure-Blob-Source-select-File-436x272.png 436w" sizes="(max-width: 934px) 100vw, 934px" /></a><p id="caption-attachment-6539" class="wp-caption-text">Select File From FTP Storage</p></div></li>
<li>Similarly, we can also read the multiple files stored in FTP Storage using wildcard pattern supported e.g. dbo.tblNames*.csv / dbo.tblNames*.json / dbo.tblNames*.xml in relevant source task
<div id="attachment_6540" style="width: 557px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-Azure-Blob-Source-set-multiple-Filepath.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6540" class="wp-image-6540 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-Azure-Blob-Source-set-multiple-Filepath.png" alt="Use wildcard pattern .* to read multiple files data" width="547" height="178" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-Azure-Blob-Source-set-multiple-Filepath.png 547w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-Azure-Blob-Source-set-multiple-Filepath-300x98.png 300w" sizes="(max-width: 547px) 100vw, 547px" /></a><p id="caption-attachment-6540" class="wp-caption-text">Use wildcard pattern .* to read multiple files data</p></div></li>
<li>We can also read the zip and gzip compressed files also without extracting it in the specific FTP Storage for CSV/JSON/XML File Task.
<div id="attachment_6541" style="width: 698px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-azure-blob-storage-source-read-zip-gzip-compressed-files.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6541" class="wp-image-6541 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-azure-blob-storage-source-read-zip-gzip-compressed-files.png" alt="Reading zip and gzip compressed files (stream mode)" width="688" height="273" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-azure-blob-storage-source-read-zip-gzip-compressed-files.png 688w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-azure-blob-storage-source-read-zip-gzip-compressed-files-300x119.png 300w" sizes="(max-width: 688px) 100vw, 688px" /></a><p id="caption-attachment-6541" class="wp-caption-text">Reading zip and gzip compressed files (stream mode)</p></div></li>
<li>Finally, we are ready to load this file(s) data into the SQL Server.</li>
</ol>
<h2>Load Secure FTP files data into SQL Server</h2>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>Above all, in this blog, we learned how to Read Secure FTP Storage Files in SSIS. Even more, we used <a href="https://zappysys.com/products/ssis-powerpack/ssis-secure-ftp-csv-file-source/" target="_blank" rel="noopener">Secure FTP Source for CSV File</a>, <a href="https://zappysys.com/products/ssis-powerpack/ssis-secure-ftp-json-file-source/" target="_blank" rel="noopener">Secure FTP Source for JSON File</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-secure-ftp-xml-file-source/" target="_blank" rel="noopener">Secure FTP Source for XML File</a> to read the file(s) from FTP Storage and load data into SQL server. You can <a href="https://zappysys.com/products/ssis-powerpack/">download SSIS PowerPack here</a> to try many other scenarios not discussed in this blog along with 70+ other components.</p>
<h2><span id="References">References</span></h2>
<p>Finally, You can use the following links for more information:</p>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/#cat_secure_ftp" target="_blank" rel="noopener">SSIS Secure FTP Source for CSV/JSON/XML File</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/">About SSIS PowerPack</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-sftp-task-ftp-ftps/">About Secure FTP Task</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/read-sftp-ftp-files-ssis-csv-json-xml/">Read SFTP / FTP Files in SSIS (CSV, JSON, XML)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
