<?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>Azure Blob JSON Driver Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/azure-blob-json-driver/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/azure-blob-json-driver/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 03 Oct 2019 13:51:02 +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>Azure Blob JSON Driver Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/azure-blob-json-driver/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<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>
	</channel>
</rss>
