<?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>amazon Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/amazon/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/amazon/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 05 Feb 2020 15:42:23 +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>amazon Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/amazon/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Download the Latest File from Amazon S3 Storage using SSIS</title>
		<link>https://zappysys.com/blog/download-latest-file-amazon-s3-storage-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 27 Dec 2019 12:33:04 +0000</pubDate>
				<category><![CDATA[S3 (Simple Storage Service)]]></category>
		<category><![CDATA[SSIS Amazon S3 Connection]]></category>
		<category><![CDATA[SSIS Amazon Storage Task]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[storage]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8626</guid>

					<description><![CDATA[<p>Introduction In our previous article, we saw SSIS Amazon S3 Storage Task examples. Now let&#8217;s look at how to Download the Latest File from Amazon S3 Storage using SSIS. Microsoft SSIS includes the Amazon S3 Storage Task that allows us to upload files to Amazon S3 Storage, download files, creating local and remote directories an more. In [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/download-latest-file-amazon-s3-storage-using-ssis/">Download the Latest File from Amazon S3 Storage using SSIS</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/03/s3-e1553183075864.png"><img decoding="async" class="wp-image-6547 size-full alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/03/s3-e1553183075864.png" alt="Amazon S3" width="150" height="150" /></a></p>
<p>In our previous article, we saw <a href="https://zappysys.com/blog/ssis-amazon-s3-storage-task-examples-download-upload-move-delete-files-folders/" target="_blank" rel="noopener">SSIS Amazon S3 Storage Task examples</a>. Now let&#8217;s look at how to Download the Latest File from Amazon S3 Storage using SSIS. Microsoft SSIS includes the Amazon S3 Storage Task that allows us to upload files to Amazon S3 Storage, download files, creating local and remote directories an more. In this article, we will show how to use the <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-task/" target="_blank" rel="noopener">SSIS Amazon S3 Storage task</a> included in ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>.</p>
<p>In nutshell, this post will focus on how to Download the Latest File from Amazon S3 Storage.</p>
<div style="clear: both;"><div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div></div>
<h2><span id="What_is_Amazon_S3_Storage">What is Amazon S3 Storage</span></h2>
<p>Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance. This means customers of all sizes and industries can use it to store and protect any amount of data for a range of use cases, such as websites, mobile applications, backup and restore, archive, enterprise applications, IoT devices, and big data analytics. Amazon S3 provides easy-to-use management features so you can organize your data and configure finely-tuned access controls to meet your specific business, organizational, and compliance requirements. Amazon S3 is designed for 99.999999999% (11 9’s) of durability, and stores data for millions of applications for companies all around the world.</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-amazon-s3-task/" target="_blank" rel="noopener">SSIS Amazon S3 Storage Task</a> that will allow you to access files/folders from Amazon S3 Storage to the Local machine, Upload files(s) to Amazon S3 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 the Latest File from Amazon S3 Storage.</p>
<h2><span id="SSIS_Amazon_S3_Storage_Task_Examples">Step-By-Step to Download the Latest File from Amazon S3 Storage</span></h2>
<p>Let´s start with an example. In this SSIS Amazon S3 Storage Task File task example, we will download the latest file using <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-task/" target="_blank" rel="noopener">Amazon S3 Storage Task</a>.</p>
<ol>
<li>First of All, Drag and Drop Amazon S3 Storage Task from SSIS Toolbox and double click it to edit
<div id="attachment_6708" style="width: 706px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-add-s3-task.png" target="_blank" rel="noopener"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-6708" class="wp-image-6708 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-add-s3-task.png" alt="Drag and Drop Amazon S3 Storage Task" width="696" height="404" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-add-s3-task.png 696w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-add-s3-task-300x174.png 300w" sizes="(max-width: 696px) 100vw, 696px" /></a><p id="caption-attachment-6708" class="wp-caption-text">Drag and Drop Amazon S3 Storage Task</p></div></li>
<li>The following options are available in Amazon S3 Storage Task:
<div id="attachment_6709" style="width: 723px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-aws-s3-storage-task-options.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6709" class="wp-image-6709 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-aws-s3-storage-task-options.png" alt="Options to upload, download files in SSIS" width="713" height="689" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-aws-s3-storage-task-options.png 713w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-aws-s3-storage-task-options-300x290.png 300w" sizes="(max-width: 713px) 100vw, 713px" /></a><p id="caption-attachment-6709" class="wp-caption-text">Options to upload, download files in SSIS</p></div></li>
<li>You can also overwrite files and folder, skip all, overwrite if the source is older, overwrite if the file size is different, rename files and more:
<div id="attachment_6678" style="width: 692px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/overwrite-action-ssis-za-am-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6678" class="wp-image-6678 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/overwrite-action-ssis-za-am-task.png" alt="Overwrite files in SSIS" width="682" height="492" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/overwrite-action-ssis-za-am-task.png 682w, https://zappysys.com/blog/wp-content/uploads/2019/03/overwrite-action-ssis-za-am-task-300x216.png 300w" sizes="(max-width: 682px) 100vw, 682px" /></a><p id="caption-attachment-6678" class="wp-caption-text">Overwrite files in SSIS</p></div></li>
<li>Let&#8217;s select the <strong>Download Amazon file(s) to local directory</strong>. Now select/add The Source path, Check Recursive Scan<em>(*Optional)</em> to get all the sub-files and subfolders and files, after that add Target Path if you want to, This option will download files. In Path AccessMode we can use Direct to write the path directly or to use an SSIS variable.
<div id="attachment_6735" style="width: 595px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-download-files.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6735" class="wp-image-6735 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-download-files.png" alt="ssis-az-blob-aws-s3-download-files" width="585" height="522" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-download-files.png 585w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-download-files-300x268.png 300w" sizes="(max-width: 585px) 100vw, 585px" /></a><p id="caption-attachment-6735" class="wp-caption-text">SSIS Amazon S3 Storage Task – Download files from Amazon S3 Storage</p></div></li>
<li>Now go to Advanced Filter &amp; Sorting and configure it like below screen to download the latest file only.
<div id="attachment_8629" style="width: 606px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-amazon-s3-and-azure-storage-task-filter-sorting.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8629" class="wp-image-8629 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-amazon-s3-and-azure-storage-task-filter-sorting.png" alt="Storage Task configuration to download the latest file only using sorting" width="596" height="567" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-amazon-s3-and-azure-storage-task-filter-sorting.png 596w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-amazon-s3-and-azure-storage-task-filter-sorting-300x285.png 300w" sizes="(max-width: 596px) 100vw, 596px" /></a><p id="caption-attachment-8629" class="wp-caption-text">Storage Task configuration to download the latest file only using sorting</p></div></li>
<li>That&#8217;s it now execute the package and it will download the latest file from the Amazon S3 Storage Task to Local File Machine.</li>
<li>Sometimes you may need to make advanced filtering on file path, file date, size, etc. for that refer to <a href="https://zappysys.com/blog/advanced-path-filtering-for-amazon-azure-storage-ssis-task/" target="_blank" rel="noopener">this article</a> for more details.</li>
</ol>
<h2>Conclusion</h2>
<p>To conclude, we can say that working with Amazon S3 Storage is now very simple. In this article, we looked at how to Download the Latest File from Amazon S3 Storage using SSIS. We used Adnavced Filtering &amp; sorting option. If you liked the tasks you can start using them by downloading SSIS PowerPack from our <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">web site here</a>.</p>
<p>Thanks for your time.</p>
<h2>References</h2>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">About SSIS PowerPack</a></li>
<li><a href="https://docs.microsoft.com/en-us/sql/integration-services/expressions/integration-services-ssis-expressions" target="_blank" rel="noopener">Integration Services (SSIS) Expressions</a></li>
<li>Help File: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=amazon-s3-storage-task.htm" target="_blank" rel="noopener">Amazon Storage Task</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/download-latest-file-amazon-s3-storage-using-ssis/">Download the Latest File from Amazon S3 Storage using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Merge / Upsert data in Amazon Redshift using SSIS</title>
		<link>https://zappysys.com/blog/ssis-amazon-redshift-upsert-update-insert-delete/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 06 Sep 2019 09:02:51 +0000</pubDate>
				<category><![CDATA[Redshift]]></category>
		<category><![CDATA[SSIS Upsert Destination]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[redshift]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[upsert]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7903</guid>

					<description><![CDATA[<p>Introduction In our previous blog we saw how update / insert data into SQL Server using SSIS Upsert Destination. In this post we will look at specific example on Data migration from Access to Amazon Redshift using SSIS Upsert Destination (Insert, Update, Delete), along with few other topics such as how to create table using [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-amazon-redshift-upsert-update-insert-delete/">Merge / Upsert data in Amazon Redshift using SSIS</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/09/Access-to-AmazonRedshift.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-7910 size-thumbnail alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/09/Access-to-AmazonRedshift-150x150.png" alt="Access-to-AmazonRedshift" width="150" height="150" /></a>In our previous blog we saw <a href="https://zappysys.com/blog/data-migration-access-sql-server/" target="_blank" rel="noopener">how update / insert data into SQL Server using SSIS Upsert Destination</a>. In this post we will look at specific example on <strong>Data migration from Access to Amazon Redshift using SSIS Upsert Destination (Insert, Update, Delete)</strong>, along with few other topics such as how to create table using <a href="https://zappysys.com/products/ssis-powerpack/ssis-upsert-destination/" target="_blank" rel="noopener">Upsert Destination</a>. how to read all Customers data from Ms Access Table and Merge it in the Amazon Redshift.</p>
<p>We will go through the steps to read data from Access and Load into Amazon Redshift.</p>
<p>In nutshell, this post will focus on how to read access table data in SSIS.</p>
<p>So let’s get started.</p>
<h2><span id="Requirements">Requirements</span></h2>
<ol>
<li>First, you will need to have SSIS installed</li>
<li>Secondly, make sure to have SSDT</li>
<li>Thirdly, do not forget to install ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a></li>
<li>Finally, Make sure that Microsoft Access installed.</li>
</ol>
<h2>How to Read MS Access table data and migrate that data in Amazon Redshift table.</h2>
<p>Let´s start with an example. In this article we will see Data migration from Access to Amazon Redshift.</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>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" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7289" class="wp-image-7289 size-full" 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 New Connection and configure connection as below to connect access database and click on OK.
<div id="attachment_7851" style="width: 722px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-ole-db-access-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7851" class="wp-image-7851 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-ole-db-access-connection.png" alt="OLE DB : Access Connection" width="712" height="618" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-ole-db-access-connection.png 712w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-ole-db-access-connection-300x260.png 300w" sizes="(max-width: 712px) 100vw, 712px" /></a><p id="caption-attachment-7851" class="wp-caption-text">OLE DB : Access Connection</p></div></li>
<li>Now in OLE DB Source Select the mode as Table or View and select Preview to view the access table data.
<div id="attachment_7852" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-ole-db-source-preview.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7852" class="wp-image-7852 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-ole-db-source-preview-768x472.png" alt="OLE DB Source Preview" width="720" height="443" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-ole-db-source-preview-768x472.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-ole-db-source-preview-300x184.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-ole-db-source-preview-1024x629.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-ole-db-source-preview.png 1165w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7852" class="wp-caption-text">OLE DB Source Preview</p></div></li>
<li>Now drag and drop Upsert Destination (Insert, Update, Delete) and create connection with Amazon Redshift Database.
<div id="attachment_8093" style="width: 690px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-upsert-aws-redshift-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8093" class="size-full wp-image-8093" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-upsert-aws-redshift-connection.png" alt="Upsert Destination : Amazon Redshift Connection" width="680" height="762" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-upsert-aws-redshift-connection.png 680w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-upsert-aws-redshift-connection-268x300.png 268w" sizes="(max-width: 680px) 100vw, 680px" /></a><p id="caption-attachment-8093" class="wp-caption-text">Upsert Destination : Amazon Redshift Connection</p></div></li>
<li>Now select Action as Sync and check all the checkboxes Insert, Update and Delete from target if not found in source. Select the table and Map all the columns and select the Key field(s) and click on OK.
<div id="attachment_7901" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-upsert-destination-select-table-and-key.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7901" class="wp-image-7901 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-upsert-destination-select-table-and-key-768x572.png" alt="Upsert Destination Configuration" width="720" height="536" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-upsert-destination-select-table-and-key-768x572.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-upsert-destination-select-table-and-key-300x224.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-upsert-destination-select-table-and-key.png 950w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7901" class="wp-caption-text">Upsert Destination Configuration</p></div></li>
<li>That&#8217;s it we are ready to migrate MS access table data into Amazon Redshift Table. Execute the package and it will migrate the data.
<div id="attachment_7860" style="width: 420px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-oledb-source-and-upsert-destination.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7860" class="wp-image-7860 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-oledb-source-and-upsert-destination.png" alt="Upsert Destination (Insert, Update, Delete)" width="410" height="225" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-oledb-source-and-upsert-destination.png 410w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-oledb-source-and-upsert-destination-300x165.png 300w" sizes="(max-width: 410px) 100vw, 410px" /></a><p id="caption-attachment-7860" class="wp-caption-text">Upsert Destination (Insert, Update, Delete)</p></div></li>
</ol>
<h2>Bulk Update data in Amazon Redshift</h2>
<p>So in previous example we saw bulk update or insert (Upsert) in Redshift Table. Now let&#8217;s look at how to update data in target table if record exists.</p>
<p>Here is how you can perform bulk update in Amazon Redshift using Upsert Destination.</p>
<ol>
<li>Double click on Upsert Destination for configure it.</li>
<li>Set Action Bulk Update =&gt; based on matching records on target. Select Connection and Target Table. Click on Map All to Mappings all columns and check on Only Primary Key columns.<br />
<img decoding="async" class="figureimage" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/upsert-destination/ssis-bulk-update.png" alt="SSIS Bulk Update rows in SQL Table" /></li>
<li>Thats all, Click on OK to save Upsert Destination settings UI.</li>
</ol>
<h2>Bulk Delete data in Amazon Redshift</h2>
<p>Here is how you can bulk delete data in Amazon Redshift.</p>
<ol>
<li>Double click on Upsert Destination for configure it.</li>
<li>Set Action Bulk Delete =&gt; based on matching records on target. Select Connection and Target Table. Click on Map All to Mappings all columns and check on Only Primary Key columns.<br />
<img decoding="async" class="figureimage" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/upsert-destination/ssis-bulk-delete.png" alt="SSIS Bulk delete rows in SQL Table" /></li>
<li>Thats all, Click on OK to save Upsert Destination settings UI.</li>
</ol>
<p>&nbsp;</p>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>In this article, we show how to read MS Access table data and migrate the data in Amazon Redshift table using SSIS. We show how to do connect access MS Access using OLE DB Source. Also, we show how to write Sync Insert, Update and Delete in target if not found in Source Using <a href="https://zappysys.com/products/ssis-powerpack/ssis-upsert-destination/" target="_blank" rel="noopener">ZS Upsert Destination</a>. If you liked this article and you want to try, you can download the <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack from here (includes 70+ Components)</a>.</p>
<h2><span id="References">References</span></h2>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">ZappySys SSIS installer.</a></li>
<li><strong>Help File: </strong><a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-upsert-destination.htm" target="_blank" rel="noopener">Upsert Destination</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/ssis-amazon-redshift-upsert-update-insert-delete/">Merge / Upsert data in Amazon Redshift using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Read / Write / Delete Amazon SQS Queue data in SSIS</title>
		<link>https://zappysys.com/blog/read-write-amazon-sqs-queue-data-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 19 Aug 2019 12:17:48 +0000</pubDate>
				<category><![CDATA[SSIS Amazon SQS Destination]]></category>
		<category><![CDATA[SSIS Amazon SQS Source]]></category>
		<category><![CDATA[Adapter]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[amazon sqs]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[Connection]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Destination]]></category>
		<category><![CDATA[Dummy]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[sqs]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[Trash]]></category>
		<category><![CDATA[write]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7799</guid>

					<description><![CDATA[<p>Introduction ZappySys provides high-performance drag and drop connectors for Amazon AWS Integration. In this post, we will see How to Read / Write / Delete Amazon SQS Queue data in SSIS using ZS Amazon SQS components. ZappySys developed many AWS related components but in this article, we will look at 2 components for Amazon SQS [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-write-amazon-sqs-queue-data-ssis/">How to Read / Write / Delete Amazon SQS Queue 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><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-sqs_512.png"><img loading="lazy" decoding="async" class="size-thumbnail wp-image-7800 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-sqs_512-150x150.png" alt="" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-sqs_512-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-sqs_512-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-sqs_512.png 512w" sizes="(max-width: 150px) 100vw, 150px" /></a>ZappySys provides high-performance drag and drop connectors for Amazon AWS Integration. In this post, we will see How to Read / Write / Delete Amazon SQS Queue data in SSIS using ZS Amazon SQS components. ZappySys developed many AWS related components but in this article, we will look at 2 components for Amazon SQS Queue integration Scenarios (Read and Write). We will discuss how to use <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-sqs-source-connector/" target="_blank" rel="noopener">SSIS Amazon SQS Source</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-sqs-destination-connector/" target="_blank" rel="noopener">SSIS Amazon SQS Destination.</a> <i>Amazon SQS Source</i> can be used to read messages from Amazon AWS SQS (Simple Queue Storage) and <i>Amazon SQS Destination</i> can be used to write/delete data from Amazon SQS (Simple Queue Storage) using SSIS.</p>
<p>&nbsp;</p>
<h2>Prerequisite</h2>
<p>Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:</p>
<ul>
<li>First, you will need to have SSIS installed.</li>
<li>Secondly, make sure to have SSDT.</li>
<li>Thirdly, you have obtained Amazon SQS Credentials.</li>
<li>Finally, do not forget to install <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack.</a></li>
</ul>
<h2>Component Mention 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/amazon-sqs-source/ssis-amazon-sqs-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-source/ssis-amazon-sqs-source.png" alt="" width="40" height="40" /></a></td>
<td style="height: 22px;width: 247px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-sqs-source-connector/" target="_blank" rel="noopener">Amazon SQS Source Connector</a></td>
</tr>
<tr style="height: 22px">
<td style="height: 22px;width: 1px"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-amazon-sqs-destination.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-amazon-sqs-destination.png" alt="" width="40" height="40" /></a></td>
<td style="height: 22px;width: 247px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-sqs-destination-connector/" target="_blank" rel="noopener">Amazon SQS Destination Connector</a></td>
</tr>
</tbody>
</table>
</div>
<h2>What is Amazon SQS (Simple Queue Service)</h2>
<p>Before we talk <strong>How to Read / Write / Delete Amazon SQS Queue data in SSIS </strong>lets talk What is Amazon SQS (Simple Queue Service) or sometimes referred to as AWS SQS. Amazon SQS offers a secure, durable, and available hosted queue that lets you integrate and decouple distributed software systems and components. Amazon SQS offers common constructs such as <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html" target="_blank" rel="noopener">dead-letter queues</a> and <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html" target="_blank" rel="noopener">costs allocation tags</a>. It provides a generic web services API and it can be accessed by any programming language that the AWS SDK supports.</p>
<p>SQS offers two types of message queues. Standard queues offer maximum throughput, best-effort ordering, and at-least-once delivery. SQS FIFO queues are designed to guarantee that messages are processed exactly once, in the exact order that they are sent.</p>
<h2>Getting Started</h2>
<p>In order to start, we will show several examples. ZappySys includes an Amazon SQS Source and Amazon SQS Destination, that will help you How to Read / Write / Delete Amazon SQS Queue data in SSIS. You can connect to your Amazon SQS account by entering credentials.</p>
<p><i>Amazon SQS Source</i> can be used to read messages from Amazon AWS SQS (Simple Queue Storage) using SSIS. Read Amazon SQS Messages (AWS SQS) in bulk. <i>Amazon SQS Destination</i> can be used to write/delete data from Amazon SQS (Simple Queue Storage) using SSIS. Write messages to Amazon SQS (AWS SQS) in bulk. Support for Visibility Timeout (Hide messages from others for certain time after you read), data preview and max rows, reading message attributes in separate output columns and adjusting UTC DateTime in local time.</p>
<h2>Write Data using Amazon SQS Destination in SSIS</h2>
<h3>Overview</h3>
<p>In this tutorial, you will learn how to write data in Amazon SQS Queue 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 or select suitable <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-source-adapters.htm" target="_blank" rel="noopener">ZS Source Adapters</a>. In this case its from ZS DummyData Source. So let&#8217;s start with an example, In this section, you will learn how to write messages into Amazon SQS Queue. For this example, we are assuming that you have already SQS Queue Created.</p>
<h3>Create Amazon SQS Connection</h3>
<ol>
<li>Firstly, In order to connect to Amazon SQS from SSIS, you will need Access Key and Secret Key (Login to AWS portal and Create Access/Secret Key with SQS service read access). If you are not sure about this ask your SysAdmin or responsible person to provide that to you. Your key will look something like this: <strong>(This is just an example key which may differ in your case).<br />
</strong><br />
<pre class="crayon-plain-tag">AccessKey: AKIAIOSFODNN7EXAMPLE
SecretKey: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY</pre>
<a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html" target="_blank" rel="noopener">Click here</a> to read more about how to get your AccessKey and Secret Key.</li>
<li>Secondly, Once you have Account Key (it&#8217;s like UserID) and Secret Key (its like password) you may proceed to create a new SSIS package. In BIDS/SSDT create a new SSIS package.</li>
<li>Right-click in Connection Manager Panel and Select [New Connection] menu item.
<div style="width: 268px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-dynamodb-destination/ssis-aws-dynamodb-pick-connection-type-click.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-dynamodb-destination/ssis-aws-dynamodb-pick-connection-type-click.png" alt="SSIS Create AWS Storage Connection" width="258" height="182" /></a><p class="wp-caption-text">SSIS Create AWS Storage Connection</p></div></li>
<li>Now Select ZS-AWS-STORAGE connection type.
<div style="width: 424px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-dynamodb-destination/ssis-aws-dynamodb-pick-connection-type.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-dynamodb-destination/ssis-aws-dynamodb-pick-connection-type.png" alt="Select ZS-AWS-STORAGE Connection" width="414" height="321" /></a><p class="wp-caption-text">Select ZS-AWS-STORAGE Connection</p></div></li>
<li>Let&#8217;s configure the Amazon SQS connection. Set Storage Service to SQS and Credential Type to Key-based access control. In the General tab enter your Amazon SQS Credentials and Set Default region as per you have.
<div style="width: 603px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-source/ssis-amazon-sqs-source-create-new-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-source/ssis-amazon-sqs-source-create-new-connection.png" alt="SSIS AWS Storage Connection - Configure" width="593" height="667" /></a><p class="wp-caption-text">SSIS AWS Storage Connection &#8211; Configure</p></div></li>
<li>In the last, click on Test Connection and OK button to Save connection configure setting UI.</li>
</ol>
<h3>Write Data into Amazon SQS</h3>
<ol>
<li>Once you have created the Amazon SQS Connection successfully, let&#8217;s drag and Drop Data Flow Task from SSIS Toolbox 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 Data Flow Task to see Data Flow Designer surface.</li>
<li>Here, from the SSIS Toolbox drag and drop ZS DummyData Source on the data flow designer surface.
<div style="width: 492px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/dummy-data-Source/ssis-dummy-data-source-adapter-drag.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/dummy-data-Source/ssis-dummy-data-source-adapter-drag.png" alt="SSIS ZS Dummy Data Source - Drag and Drop" width="482" height="120" /></a><p class="wp-caption-text">SSIS ZS Dummy Data Source &#8211; Drag and Drop</p></div></li>
<li>Double click on Dummy Data Source to configure it.
<div style="width: 500px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-dummy-data-source-generate-fake-json-documents.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-dummy-data-source-generate-fake-json-documents.png" alt="SSIS ZS Dummy Data Source - Configure" width="490" height="537" /></a><p class="wp-caption-text">SSIS ZS Dummy Data Source &#8211; Configure</p></div></li>
<li>Click on OK button to save configure setting UI.</li>
<li>From the SSIS toolbox drag and drop Amazon SQS Destination on the Data flow designer surface and single click on the Dummy Data Source, Once you see the blue arrow from the source. connect it to Amazon SQS Destination.
<div style="width: 521px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-amazon-sqs-destination-drag.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-amazon-sqs-destination-drag.png" alt="SSIS ZS Amazon SQS Destination" width="511" height="180" /></a><p class="wp-caption-text">SSIS ZS Amazon SQS Destination</p></div></li>
<li>Now double click on Amazon SQS Destination to configure it.</li>
<li>In the [Connection Manager] tab select SQS connection manager we have created before it.
<div style="width: 673px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-amazon-sqs-destination-select-adapter-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-amazon-sqs-destination-select-adapter-connection.png" alt="SSIS Amazon SQS Destination - Configure Connection Manager" width="663" height="275" /></a><p class="wp-caption-text">SSIS Amazon SQS Destination &#8211; Configure Connection Manager</p></div></li>
<li>Click on [Component Properties] tab and Select Target Queue from the dropdown list.
<div style="width: 817px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-amazon-sqs-destination-select-queue.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-amazon-sqs-destination-select-queue.png" alt="SSIS ZS Amazon SQS Destination - Configure Component Properties" width="807" height="408" /></a><p class="wp-caption-text">SSIS ZS Amazon SQS Destination &#8211; Configure Component Properties</p></div></li>
<li>Click on [Mappings] tab and verify mapping. Map document column from upstream to the MessageText target column.
<div style="width: 655px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-amazon-sqs-destination-select-mappings.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-amazon-sqs-destination-select-mappings.png" alt="SSIS ZS Amazon SQS Destination - Column Mappings" width="645" height="518" /></a><p class="wp-caption-text">SSIS ZS Amazon SQS Destination &#8211; Column Mappings</p></div></li>
<li>In the last, click on the OK button to save configure setting UI.</li>
<li>After all, Execute the Package and verify target data by going to your AWS console under SQS service section.
<div style="width: 338px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-amazon-sqs-destination-insert-messages.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-amazon-sqs-destination-insert-messages.png" alt="Run or Execute SSIS Package" width="328" height="302" /></a><p class="wp-caption-text">Run or Execute SSIS Package</p></div>
<div style="width: 776px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/check-aws-sqs-message-verify-count-console.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/check-aws-sqs-message-verify-count-console.png" alt="Verify Amazon SQS Destination" width="766" height="565" /></a><p class="wp-caption-text">Verify Amazon SQS Destination</p></div></li>
</ol>
<h2>Read Data using Amazon SQS Source in SSIS</h2>
<h3>Overview</h3>
<p>In this tutorial, you will learn how to read data from Amazon SQS storage in SSIS using ZS SSIS Amazon SQS Source Adapter. In this SSIS we will read data. So let&#8217;s begin it.</p>
<h3>Read Data from Amazon SQS</h3>
<ol>
<li>Firstly, 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 ZS Amazon SQS Source on the dataflow designer surface.<br />
<img loading="lazy" decoding="async" class="alignnone size-thumbnail" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-source/ssis-amazon-sqs-source-drag.png" width="474" height="101" /></li>
<li>Double click Amazon SQS Source to configure it.</li>
<li>Select Amazon SQS Connection we have created before and select queue from the dropdown list.
<div style="width: 908px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-source/ssis-amazon-sqs-source-preview-messages.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-source/ssis-amazon-sqs-source-preview-messages.png" alt="SSIS Amazon SQS Source - Configure" width="898" height="601" /></a><p class="wp-caption-text">SSIS Amazon SQS Source &#8211; Configure</p></div></li>
<li> Click on Preview button to see Data Preview and Click on  OK button to save settings.</li>
<li>From the SSIS toolbox drag and drop Trash Destination on the data flow designer surface or you can use any of our suitable <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-destination-adapters.htm" target="_blank" rel="noopener">ZS Destination Adapter.</a>
<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="SSIS ZS Trash Destination - Drag and Drop" width="519" height="121" /></a><p class="wp-caption-text">SSIS ZS Trash Destination &#8211; Drag and Drop</p></div></li>
<li>Now single click on the Amazon SQS 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="SSIS ZS Trash Destination - Configure" width="612" height="523" /></a><p class="wp-caption-text">SSIS ZS Trash Destination &#8211; Configure</p></div></li>
<li>Click on OK button to save Trash Destination configure setting UI.</li>
<li>After all, right-click on the path and Add Data Viewer and Execute the package and verify source data in the data viewer.
<div style="width: 653px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-source/ssis-read-messages-from-amazon-sqs-queue.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-source/ssis-read-messages-from-amazon-sqs-queue.png" alt="Run or Execute The SSIS Package" width="643" height="459" /></a><p class="wp-caption-text">Run or Execute The SSIS Package</p></div></li>
<li>After messages read from SQS Queue, the same message cannot be read again until VisibilityTimeout. By default Queue, visibility timeout is used (-1 means use default) but you can override it on the source UI.</li>
</ol>
<p>&nbsp;</p>
<h3>Read all messages from SQS FIFO Queue</h3>
<p>If you are using Normal SQS Queue then by setting <strong>Max Rows=0</strong> will read all messages from your queue. However reading all messages from <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html" target="_blank" rel="noopener">FIFO Queue</a> is not that simple. Amazon SQS wont return more messages until you delete previously read Messages from same Message Group (identified by MessageGroupId). Due to this constraint you have to try below technique of Loop to read 10 messages until all messages Read &gt; Processed  &gt; Deleted.</p>
<p>Here is note from Amazon Documentation about maximum 10 messages limitation on FIFO Queue.</p><pre class="crayon-plain-tag">When you receive a message with a message group ID, no more messages for the same message group ID are returned unless you delete the message or it becomes visible.</pre><p>
<strong>Community Reference:</strong></p>
<p><a href="https://stackoverflow.com/questions/51661834/aws-sqs-fifo-how-to-get-more-than-10-messages-at-a-time" target="_blank" rel="noopener">https://stackoverflow.com/questions/51661834/aws-sqs-fifo-how-to-get-more-than-10-messages-at-a-time</a></p>
<p>If you want to add fault tolerance then you can set Max Retry for NULL Receive like below (e.g. Setting MaxRetry=3 will try max 3 times if no message is read &#8230;. It will try every 2 seconds for 3 times before giving up to read more rows).</p>
<div id="attachment_8723" style="width: 940px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-aws-sqs-fifo-queue-read-all-messages.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8723" class="size-full wp-image-8723" src="https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-aws-sqs-fifo-queue-read-all-messages.png" alt="Read all messages from Amazon SQS FIFO Queue" width="930" height="666" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-aws-sqs-fifo-queue-read-all-messages.png 930w, https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-aws-sqs-fifo-queue-read-all-messages-300x215.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-aws-sqs-fifo-queue-read-all-messages-768x550.png 768w" sizes="(max-width: 930px) 100vw, 930px" /></a><p id="caption-attachment-8723" class="wp-caption-text">Read all messages from Amazon SQS FIFO Queue</p></div>
<p>&nbsp;</p>
<div id="attachment_8724" style="width: 978px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-aws-sqs-fifo-read-process-delete-message-ssis.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8724" class="size-full wp-image-8724" src="https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-aws-sqs-fifo-read-process-delete-message-ssis.png" alt="Read , Process and Delete Amazon SQS FIFO Queue Message in SSIS Data flow" width="968" height="587" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-aws-sqs-fifo-read-process-delete-message-ssis.png 968w, https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-aws-sqs-fifo-read-process-delete-message-ssis-300x182.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-aws-sqs-fifo-read-process-delete-message-ssis-768x466.png 768w" sizes="(max-width: 968px) 100vw, 968px" /></a><p id="caption-attachment-8724" class="wp-caption-text">Read , Process and Delete Amazon SQS FIFO Queue Message in SSIS Data flow</p></div>
<p>&nbsp;</p>
<h2>Delete Message from Queue using Amazon SQS Destination in SSIS</h2>
<h3>Overview</h3>
<p>In this tutorial, you will learn how to Delete Messages from the Queue using the ZS SSIS Amazon SQS Destination Adapter. So let’s begin it.</p>
<h3>Delete Message from Queue</h3>
<ol>
<li>From the SSIS toolbox drag and drop Amazon SQS Destination on the Data flow designer surface and connect it to Amazon SQS Destination.</li>
<li>Now double click on Amazon SQS Destination to configure it.</li>
<li>In the [Connection Manager] tab select SQS connection manager we have created before it.
<div style="width: 673px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-amazon-sqs-destination-select-adapter-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-sqs-destination/ssis-amazon-sqs-destination-select-adapter-connection.png" alt="Select Amazon SQS Connection" width="663" height="275" /></a><p class="wp-caption-text">Select Amazon SQS Connection</p></div></li>
<li>Click on [Component Properties] tab, Set Operation to Delete and Select Target Queue from the dropdown list.
<div id="attachment_8662" style="width: 731px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-amazon-sqs-destination-select-delete-operation.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8662" class="wp-image-8662 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-amazon-sqs-destination-select-delete-operation.png" alt="Select Delete Operation and Queue" width="721" height="662" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-amazon-sqs-destination-select-delete-operation.png 721w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-amazon-sqs-destination-select-delete-operation-300x275.png 300w" sizes="(max-width: 721px) 100vw, 721px" /></a><p id="caption-attachment-8662" class="wp-caption-text">Select Delete Operation and Queue</p></div></li>
<li>Click on [Column Mappings] tab and verify mapping. Map document column from upstream to the MessageText target column.
<div id="attachment_8663" style="width: 693px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/read-delete-message-from-aws-sqs-queue.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8663" class="wp-image-8663 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/read-delete-message-from-aws-sqs-queue.png" alt="Do Columns Mapping" width="683" height="410" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/read-delete-message-from-aws-sqs-queue.png 683w, https://zappysys.com/blog/wp-content/uploads/2019/08/read-delete-message-from-aws-sqs-queue-300x180.png 300w" sizes="(max-width: 683px) 100vw, 683px" /></a><p id="caption-attachment-8663" class="wp-caption-text">Do Columns Mapping</p></div></li>
<li>In the last, click on the OK button to save configure setting UI.</li>
<li>After all, Execute the Package and verify target data by going to your AWS console under SQS service section.</li>
</ol>
<h2>Purge All Messages from SQS Queue (Clear Queue)</h2>
<p>There will be a time you like to clear entire queue (i.e. Delete All Messages from Queue). Amazon recently added <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_PurgeQueue.html" target="_blank" rel="noopener">PurgeQueue API</a> feature so now its possible without doing Delete message technique mentioned in previous section. ZappySys support <a href="https://zappysys.com/blog/how-to-call-amazon-aws-api-using-ssis-ec2-lambda-api-gateway-sqs/" target="_blank" rel="noopener">calling any AWS API using REST API Task</a> along with AWS Provider in OAuth Connection. You can use same technique to call PurgeQueue API like below.</p>
<ol>
<li>Open SSIS Package and Drag <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">ZS REST API Task</a> from Control Flow Toolbox</li>
<li>Click on URL mode dropdown and change to URL from Connection.</li>
<li>From COnnection Dropdown select NEW ZS-OAuth connection</li>
<li>Configure OAuth connection to use <strong>Provider=Amazon AWS v4</strong>
<ol>
<li>Enter Access Key and Secret Key and click OK to save connection</li>
</ol>
</li>
<li>Enter below URL on REST API Task (Replace Queue ID and name with your own values) &#8211; Refer to your AWS Console / SQS Queue Properties to get this URL<br />
<pre class="crayon-plain-tag">https://sqs.ENTER-REGION-HERE.amazonaws.com/ENTER-QUEUE-ID-HERE/ENTER-QUEUE-NAME-HERE/?Action=PurgeQueue</pre>
Here is an example of Sample Queue from ZappySys Demo<br />
<pre class="crayon-plain-tag">https://sqs.us-east-1.amazonaws.com/718883169616/zappysystest.fifo/?Action=PurgeQueue</pre>
</li>
<li>Click ok to Save REST API Task</li>
</ol>
<div id="attachment_8722" style="width: 1217px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-amazon-aws-rest-api-call-purge-all-messages-from-queue.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8722" class="size-full wp-image-8722" src="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-amazon-aws-rest-api-call-purge-all-messages-from-queue.png" alt="How to Purge Amazon SQS Queue in SSIS (Clear Queue / Delete All messages using PurgeQueue REST API)" width="1207" height="877" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-amazon-aws-rest-api-call-purge-all-messages-from-queue.png 1207w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-amazon-aws-rest-api-call-purge-all-messages-from-queue-300x218.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-amazon-aws-rest-api-call-purge-all-messages-from-queue-768x558.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-amazon-aws-rest-api-call-purge-all-messages-from-queue-1024x744.png 1024w" sizes="(max-width: 1207px) 100vw, 1207px" /></a><p id="caption-attachment-8722" class="wp-caption-text">How to Purge Amazon SQS Queue in SSIS (Clear Queue / Delete All messages using PurgeQueue REST API)</p></div>
<h2>Conclusion</h2>
<p>So, In this blog, we learn How to Read / Write / Delete Amazon SQS Queue data in SSIS. We used Amazon SQS Destination for write data and Amazon SQS Source to read data. Additionally, you can <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">download SSIS PowerPack here</a> to try many other scenarios that are not discussed in this blog along with 70+ other components.</p>
<h2>References</h2>
<p>Finally, you can use the following links for more information:</p>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-sqs-source-connector/" target="_blank" rel="noopener">Amazon SQS Source</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-sqs-destination-connector/" target="_blank" rel="noopener">Amazon SQS Destination</a></li>
<li><a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/welcome.html" target="_blank" rel="noopener">Documents of Amazon SQS</a></li>
<li>Help File:
<ul>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-amazon-sqs-queue-source.htm" target="_blank" rel="noopener">Amazon SQS Source</a></li>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-amazon-sqs-queue-destination.htm" target="_blank" rel="noopener">Amazon SQS Destination</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/read-write-amazon-sqs-queue-data-ssis/">How to Read / Write / Delete Amazon SQS Queue data in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Read / Write Amazon Redshift Data in SSIS</title>
		<link>https://zappysys.com/blog/read-write-amazon-redshift-data-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 16 Aug 2019 14:05:24 +0000</pubDate>
				<category><![CDATA[SSIS Amazon Redshift Destination]]></category>
		<category><![CDATA[SSIS Amazon Redshift Source]]></category>
		<category><![CDATA[Adapter]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[Connection]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Destination]]></category>
		<category><![CDATA[DummyData]]></category>
		<category><![CDATA[ole db]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[redshift]]></category>
		<category><![CDATA[SERVER]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[ssdt]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[Trash]]></category>
		<category><![CDATA[variable]]></category>
		<category><![CDATA[write]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7771</guid>

					<description><![CDATA[<p>Introduction ZappySys provide high-performance drag and drop connectors for Amazon Redshift Integration. In our previous post we saw how to bulk load SQL data into Redshift using S3 staging technique (COPY command). Now in this post, you will see How to Read / Write Amazon Redshift Data in SSIS Data flow without need for S3 Staging. [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-write-amazon-redshift-data-ssis/">How to Read / Write Amazon Redshift 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><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-redshift-logo.png"><img loading="lazy" decoding="async" class="size-thumbnail wp-image-7773 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-redshift-logo-150x150.png" alt="" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-redshift-logo-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-redshift-logo-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-redshift-logo-768x768.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-redshift-logo-1024x1024.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/08/amazon-redshift-logo.png 2000w" sizes="(max-width: 150px) 100vw, 150px" /></a>ZappySys provide high-performance drag and drop connectors for Amazon Redshift Integration. In our previous post we saw how to <a href="https://zappysys.com/posts/sql-server-to-redshift-data-load-using-ssis/" target="_blank" rel="noopener">bulk load SQL data into Redshift using S3 staging technique (COPY command)</a>. Now in this post, you will see How to Read / Write Amazon Redshift Data in SSIS Data flow without need for S3 Staging. We will use  ZS Amazon Redshift components (Source / Destination). If you need to Upsert / delete data from Redshift Table then use <a href="https://zappysys.com/products/ssis-powerpack/ssis-upsert-destination/" target="_blank" rel="noopener">Upsert Destination</a> (Not discussed in this article).</p>
<p>ZappySys developed many AWS related components but in this article, we will look at 2 Components for Amazon Redshift Integration Scenarios (Read and Write). We will discuss how to use <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-redshift-source-connector/" target="_blank" rel="noopener">SSIS Amazon Redshift Source</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-redshift-destination/" target="_blank" rel="noopener">SSIS Amazon Redshift Destination.</a> Amazon Redshift Source connector supports familiar <strong>SQL Like query language</strong> so any DBA or SQL user can learn it in no time. ZappySys developed a highly sophisticated engine to turn your SQL Query into native Amazon Redshift query. Load query at runtime from the variables or Direct value.</p>
<h2><span id="Prerequisite">Prerequisite</span></h2>
<p>Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:</p>
<ol>
<li>First, you will need to have SSIS installed</li>
<li>Secondly, make sure to have SSDT</li>
<li>Thirdly, You have obtained Amazon Redshift Credential.</li>
<li>Finally, do not forget to install <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack.</a></li>
</ol>
<h2><span id="Component_Mention_in_this_article">Component Mention in this article</span></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/amazon-redshift-source/ssis-amazon-redshift-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-source/ssis-amazon-redshift-source.png" alt="" width="40" height="40" /></a></td>
<td style="height: 22px;width: 247px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-redshift-source-connector/" target="_blank" rel="noopener">Amazon Redshift Source</a></td>
</tr>
<tr style="height: 22px">
<td style="height: 22px;width: 1px"><a href="https://i0.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-destination/ssis-amazon-redshift-destination.png?w=100&amp;ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://i0.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-destination/ssis-amazon-redshift-destination.png?w=100&amp;ssl=1" alt="" width="40" height="40" /></a></td>
<td style="height: 22px;width: 247px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-redshift-destination/" target="_blank" rel="noopener">Amazon Redshift Destination</a></td>
</tr>
</tbody>
</table>
</div>
<h2><span id="What_is_Amazon_Redshift">What is Amazon Redshift</span></h2>
<p>Before we talk <strong>How to Read / Write Amazon Redshift Data in SSIS</strong> lets talk what is <em>Amazon Redshift</em> (or sometimes referred to as <em>AWS Redshift</em>). <b>Amazon Redshift</b> is a Cloud-based Data warehouse service. This type of system also referred to as MPP (Massively Parallel Processing). <b>Amazon Redshift</b> uses a highly modified version of PostgreSQL Engine behind the scene. Amazon Redshift provides the advantage of Scale as you go, at a very low cost compared to onsite dedicated hardware/software approach. In this article, we will try to learn <em>How to Read / Write Amazon Redshift Data in SSIS.</em></p>
<h2><span id="Getting_Started">Getting Started</span></h2>
<p>In order to start, we will show several examples. ZappySys includes an Amazon Redshift Source and Destination, that will help you How to Read / Write Amazon Redshift Data in SSIS. You can connect to your Amazon Redshift Account by entering credentials.</p>
<p><em>SSIS Amazon Redshift Source Connector</em> can be used to read data from Amazon Redshift. You can use a simple Table mode or write custom SQL Query to extract desired data. You can use multiple modes (i.e. Table or Query) to read data from the Amazon Redshift Database. Support for data preview and max rows and Dynamic query (using SSIS Variable placeholder e.g. select * from mytable where id='{{User:: MyVar}}&#8217;).</p>
<p>SSIS Amazon Redshift Destination can be used to bulk insert a large number of records to Amazon Redshift storage from any data source using SSIS. <a href="https://aws.amazon.com/redshift/">Amazon Redshift</a> is a cloud-based Data Warehouse service from Amazon AWS. Here, you can bulk Insert, Update and Delete Amazon Redshift data and supporting the batch size.</p>
<p><a href="https://zappysys.com/blog/tag/redshift/" target="_blank" rel="noopener">Click here to see Amazon Redshift</a> related articles.</p>
<h2>Write Data using Amazon Redshift Destination in SSIS</h2>
<h3>Overview</h3>
<p>In this tutorial, you will learn how to write data in Amazon Redshift Database. 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 or select suitable <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-source-adapters.htm" target="_blank" rel="noopener">ZS Source Adapter</a> (In this case it’s from SQL Server Source). So, Let’s start with an example. In this SSIS we will write data into Amazon Redshift Database using ZS Amazon Redshift Destination.</p>
<h3>How to write data into Amazon Redshift Table</h3>
<ol>
<li>In order to connect to the Amazon Redshift Database from SSIS, you will need credentials. Ask your SysAdmin or responsible person to provide that you.</li>
<li>For this sample exercise, we will create a table in Redshift.<br />
<pre class="crayon-plain-tag">CREATE TABLE public."tbl_pg_Customers"
(
    "RecordID" character varying(50) NOT NULL,
    "CustomerID" character varying(50),
    "CustomerName" character varying(50),
    "Address1" character varying(50),
    "City" character varying(50),
    "State" character varying(50),
    "Zip" character varying(50),
    "Country" character varying(50),
    PRIMARY KEY ("RecordID")
);</pre>
</li>
<li>Once you have created a Table, you may proceed to create a new SSIS package. In BIDS/SSDT create a new SSIS package.</li>
<li>In your SSIS toolbox, you should see many new Icons starting with “ZS” (i.e. ZappySys). If you don’t see them then <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/getting-started.htm" target="_blank" rel="noopener">check this.</a></li>
<li>Now, Drag and Drop SSIS Data Flow Task from SSIS Toolbox.
<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 Data Flow Task to see Data flow designer surface.</li>
<li>Here, In Visual Studio, Drag and Drop the OLE DB Source and Amazon Redshift Destination in the design surface and join the components with the blue arrow.
<div style="width: 532px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-destination/ssis-amazon-redshift-destination-drag.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-destination/ssis-amazon-redshift-destination-drag.png" alt="SSIS OLE DB Source and Amazon Redshift Destination - Drag and Drop" width="522" height="183" /></a><p class="wp-caption-text">SSIS OLE DB Source and Amazon Redshift Destination &#8211; Drag and Drop</p></div></li>
<li>Now, we need OLE DB Connection and Amazon Redshift Connection. Click <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-amazon-redshift-connection-manager.htm" target="_blank" rel="noopener">here</a> for Create Amazon Redshift Connection.</li>
</ol>
<h3>How to Create an OLE DB Connection.</h3>
<ol>
<li>Let&#8217;s, Right-click on Connection Managers Panel to Create OLEDB Connection, so you can use Source and Context Menu will appear, Select New OLEDB 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="SSIS OLE DB Connection - Create Connection" width="475" height="353" /></a><p class="wp-caption-text">SSIS OLE DB Connection &#8211; Create Connection</p></div></li>
<li>Now click on the New button to create a 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="SSIS OLE DB Connection - Create New Connection" width="655" height="558" /></a><p class="wp-caption-text">SSIS OLE DB Connection &#8211; Create New Connection</p></div></li>
<li>Let&#8217;s configure connection Manager, just follow the steps one as we have created in following the image.
<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="SSIS OLE DB Connection - Configure Connection" width="720" height="625" /></a><p class="wp-caption-text">SSIS OLE DB Connection &#8211; Configure Connection</p></div></li>
<li>After all, Click on OK button to save configure setting UI.</li>
</ol>
<h3>Configure SSIS ZS Amazon Redshift Destination</h3>
<ol>
<li>Double click on OLE DB Source for configure it.</li>
<li>Let&#8217;s Configure in Connection Manager, just follow 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="SSIS OLE DB Source - Configure Source Editors" width="818" height="560" /></a><p class="wp-caption-text">SSIS OLE DB Source &#8211; Configure Source Editors</p></div></li>
<li>Click OK to save OLE DB Source Editor UI settings.</li>
<li>Now double click on Amazon Redshift Destination to configure it. In the [Connection Manager] tab Select Amazon Redshift Connection.
<div style="width: 795px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-destination/ssis-amazon-redshift-destination-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-destination/ssis-amazon-redshift-destination-connection.png" alt="SSIS Amazon Redshift Destination - Connection Manager" width="785" height="295" /></a><p class="wp-caption-text">SSIS Amazon Redshift Destination &#8211; Connection Manager</p></div></li>
<li>Click on [Component Properties] tab and Pick the Destination Table from Tables dropdown list.
<div style="width: 795px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-destination/ssis-amazon-redshift-destination-properties.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-destination/ssis-amazon-redshift-destination-properties.png" alt="SSIS Amazon Redshift Destination - Component Properties" width="785" height="410" /></a><p class="wp-caption-text">SSIS Amazon Redshift Destination &#8211; Component Properties</p></div></li>
<li>Click on [Column mappings] tab and verify mapping. If the target table is new Table and it&#8217;s empty then all input columns will be automatically mapped as shown below. If the table is an existing table with some data then you can manually pick a mapping column by dragging it from source list to target list.
<div style="width: 795px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-destination/ssis-redshift-destination-mapping.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-destination/ssis-redshift-destination-mapping.png" alt="SSIS Amazon Redshift Destination - Column Mappings" width="785" height="538" /></a><p class="wp-caption-text">SSIS Amazon Redshift Destination &#8211; Column Mappings</p></div></li>
<li>Execute the package and verify that the data is saved.
<div style="width: 598px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-destination/ssis-amazon-redshift-destination-execute.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-destination/ssis-amazon-redshift-destination-execute.png" alt="SSIS Amazon Redshift Destination - Run or Execute Package" width="588" height="331" /></a><p class="wp-caption-text">SSIS Amazon Redshift Destination &#8211; Run or Execute Package</p></div></li>
</ol>
<h2>Read Data using Amazon Redshift Source in SSIS</h2>
<h3>Overview</h3>
<p>In this tutorial, you will learn how to read data from Amazon Redshift in SSIS using ZS Amazon Redshift Source adapter. In this SSIS we will read data with SQL Query and Table Mode. So Let’s begin it.</p>
<h3>How to Read data from Amazon Redshift Table</h3>
<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 Data Flow Task to see the Data Flow design surface.</li>
<li>From the SSIS Toolbox, Drag and Drop Amazon Redshift Source in the data flow designer surface.
<div style="width: 505px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-source/ssis-amazon-redshift-source-drag.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-source/ssis-amazon-redshift-source-drag.png" alt="SSIS Amazon Redshift Source - Drag and Drop" width="495" height="104" /></a><p class="wp-caption-text">SSIS Amazon Redshift Source &#8211; Drag and Drop</p></div></li>
<li>Now, We need Amazon Redshift Connection. Click <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-amazon-redshift-connection-manager.htm" target="_blank" rel="noopener">here</a> for creating Amazon Redshift Connection.</li>
</ol>
<h4>Configure SSIS ZS Amazon Redshift Source &#8211; Query Mode</h4>
<ol>
<li>Here, we are getting data using Query Mode with dynamic expression value.</li>
<li>Let&#8217;s Create Variables, In Visual Studio Right Click on Design Panel, Select Variables.
<div style="width: 426px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/ssis-create-variable.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/ssis-create-variable.png" alt="SSIS Create Variables" width="416" height="294" /></a><p class="wp-caption-text">SSIS Create Variables</p></div></li>
<li>Make sure correct DataType and Value, use the following image.
<div style="width: 521px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-source/ssis-amazon-redshift-source-create-variable.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-source/ssis-amazon-redshift-source-create-variable.png" alt="SSIS Created Variables with Value" width="511" height="167" /></a><p class="wp-caption-text">SSIS Created Variables with Value</p></div></li>
<li>Double click on Amazon Redshift Source to configure it.</li>
<li>Select the connection we have created before, set AccessMode to Query and use the following SQL Query(You can replace table or column name) and insert Variables we have created before.<br />
<pre class="crayon-plain-tag">SELECT  * FROM "public"."tbl_pg_Orders"
WHERE "CustomerID" like '%R%' AND "OrderAmount" &gt; '{{User::OrderAmount}}' AND
"{{User::ColumnName}}" = '{{User::Value}}'</pre>
<div style="width: 801px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-source/ssis-amazon-redshift-source-read-data-sql-query-mode.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-source/ssis-amazon-redshift-source-read-data-sql-query-mode.png" alt="SSIS Amazon Redshift Source - Configure with SQL Query Mode" width="791" height="715" /></a><p class="wp-caption-text">SSIS Amazon Redshift Source &#8211; Configure with SQL Query Mode</p></div></li>
<li>Click on Preview button to see Data Preview and OK button to save configure setting UI.</li>
<li>Here, you can use any of our suitable <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-destination-adapters.htm" target="_blank" rel="noopener">ZS Destination Adapter.</a></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="SSIS Trash Destination - Drag and Drop" width="519" height="121" /></a><p class="wp-caption-text">SSIS Trash Destination &#8211; Drag and Drop</p></div></li>
<li>Now single click on the Amazon Redshift Source, once you see the blue arrow from the source&#8230;connect it to Trash Destination.</li>
<li>Double click on 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="SSIS Trash Destination - Configure" width="612" height="523" /></a><p class="wp-caption-text">SSIS Trash Destination &#8211; Configure</p></div></li>
<li>Click on OK button to save Trash Destination configure setting UI.</li>
<li>That&#8217;s all, just Run or Execute the package and verify data.
<div style="width: 421px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-source/ssis-amazon-redshift-source-read-data-sql-query-mode-execute.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-source/ssis-amazon-redshift-source-read-data-sql-query-mode-execute.png" alt="SSIS Amazon Redshift Source - Run or Execute the Package" width="411" height="332" /></a><p class="wp-caption-text">SSIS Amazon Redshift Source &#8211; Run or Execute the Package</p></div></li>
</ol>
<h4>Configure SSIS ZS Amazon Redshift Source &#8211; Table Mode</h4>
<ol>
<li>Double click on Amazon Redshift Source to configure it.</li>
<li>Select the connection we have created before. Set Access Mode to Table and Select Table from table Drop down list.
<div style="width: 788px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-source/ssis-amazon-redshift-source-read-data-table-mode.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-source/ssis-amazon-redshift-source-read-data-table-mode.png" alt="SSIS Amazon Redshift Source - Configure with Table Mode" width="778" height="603" /></a><p class="wp-caption-text">SSIS Amazon Redshift Source &#8211; Configure with Table Mode</p></div></li>
<li>Click on Preview button to see Data Preview and OK button to save Amazon Redshift Source 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="SSIS Trash Destination - Drag and Drop" width="519" height="121" /></a><p class="wp-caption-text">SSIS Trash Destination &#8211; Drag and Drop</p></div></li>
<li>Now single click on the Amazon Redshift Source, once you see the blue arrow from a 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="SSIS Trash Destination - Configure" width="612" height="523" /></a><p class="wp-caption-text">SSIS Trash Destination &#8211; Configure</p></div></li>
<li>Click on OK button to save Trash Destination configure setting UI.</li>
<li>That&#8217;s all, just run or execute your package and see data.
<div style="width: 412px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-source/ssis-amazon-redshift-source-read-data-table-mode-execute.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-source/ssis-amazon-redshift-source-read-data-table-mode-execute.png" alt="SSIS Amazon Redshift Source - Run or Execute Package" width="402" height="347" /></a><p class="wp-caption-text">SSIS Amazon Redshift Source &#8211; Run or Execute Package</p></div></li>
</ol>
<h2>Conclusion</h2>
<p>In this blog, we learn How to Read / Write Amazon Redshift Data in SSIS. We used Amazon Redshift Destination for write data and Amazon Redshift Source to read data. 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>References</h2>
<p>Finally, you can use the following links for more information:</p>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-redshift-source-connector/" target="_blank" rel="noopener">Amazon Redshift Source</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-redshift-destination/" target="_blank" rel="noopener">Amazon Redshift Destination</a></li>
<li><a href="https://docs.aws.amazon.com/redshift/latest/mgmt/welcome.html" target="_blank" rel="noopener">Document of Amazon Redshift</a></li>
<li><strong>Help File:</strong>
<ul>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-amazon-redshift-source.htm" target="_blank" rel="noopener">Amazon Redshift Source</a></li>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-amazon-redshift-destination.htm" target="_blank" rel="noopener">Amazon Redshift Destination</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/read-write-amazon-redshift-data-ssis/">How to Read / Write Amazon Redshift Data in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Execute SQL query against Amazon Redshift in SSIS</title>
		<link>https://zappysys.com/blog/execute-sql-query-amazon-redshift-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 14 Aug 2019 12:43:11 +0000</pubDate>
				<category><![CDATA[SSIS Amazon Redshift ExecuteSQL Task]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[CREATE]]></category>
		<category><![CDATA[DROP]]></category>
		<category><![CDATA[Execute]]></category>
		<category><![CDATA[redshift]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[Task]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7760</guid>

					<description><![CDATA[<p>Introduction ZappySys provide high-performance drag and drop connectors for Amazon Redshift Integration. In previous post we saw how to read / write Amazon Redshift data in SSIS. Now in this post, you will see how to Execute SQL query against Amazon Redshift in SSIS using ZS Amazon Redshift ExecuteSQL Task. SSIS Redshift Execute SQL Task can be [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/execute-sql-query-amazon-redshift-ssis/">Execute SQL query against Amazon Redshift in 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-amazon-redshift-executesql-task.png"><img loading="lazy" decoding="async" class="size-full wp-image-7765 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-amazon-redshift-executesql-task.png" alt="" width="128" height="128" /></a>ZappySys provide high-performance drag and drop connectors for Amazon Redshift Integration. In previous post we saw <a href="https://zappysys.com/blog/read-write-amazon-redshift-data-ssis/" target="_blank" rel="noopener">how to read / write Amazon Redshift data in SSIS</a>. Now in this post, you will see how to Execute SQL query against Amazon Redshift in SSIS using ZS Amazon Redshift ExecuteSQL Task. <em>SSIS Redshift Execute SQL Task</em> can be used to send any SQL queries to Redshift Cluster without needing ODBC driver. You can Issue various SQL commands such as DROP, COPY, UNLOAD, CREATE, etc very easily. Load query at runtime from variable, file or Direct value. You can also issue SQL query to fetch resultset to store in variable and then <a href="https://zappysys.com/blog/get-list-of-files-and-folders-in-ssis-for-looping/" target="_blank" rel="noopener">loop records using this technique</a>.</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>Thirdly, You have obtained Amazon Redshift Credential.</li>
<li>Finally, do not forget to install <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack.</a></li>
</ol>
<h2>Component Mention 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/images/SSIS-PowerPack/SSIS-Amazon-Redshift-ExecuteSQL-Task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/SSIS-Amazon-Redshift-ExecuteSQL-Task.png" alt="" width="40" height="40" /></a></td>
<td style="height: 22px;width: 247px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-redshift-execute-sql-task/" target="_blank" rel="noopener">Amazon Redshift ExecuteSQL Task</a></td>
</tr>
</tbody>
</table>
</div>
<h2>What is Amazon Redshift</h2>
<p>Before we talk Execute SQL query against Amazon Redshift in SSIS lets talk what is <em>Amazon Redshift</em> (or sometimes referred to as <em>AWS Redshift</em>). <b>Amazon Redshift</b> is a Cloud-based Data warehouse service. This type of system also referred to as MPP (Massively Parallel Processing). <b>Amazon Redshift</b> uses a highly modified version of PostGrey SQL Engine behind the scene. Amazon Redshift provides the advantage of Scale as you go, at a very low cost compared to onsite dedicated hardware/software approach. In this article, we will try to learn <em>how to Execute SQL query against Amazon Redshift in SSIS</em>.</p>
<h2><span id="Getting_Started">Getting Started</span></h2>
<p>In order to start, we will show several examples. ZappySys includes an Amazon Redshift ExecuteSQL Task, that will help you how to Create and Drop table by Execute SQL query against Amazon Redshift in SSIS. You can connect to your Amazon Redshift Account by entering credentials.</p>
<h2>Execute SQL query against Amazon Redshift in SSIS</h2>
<p>Let&#8217;s start with an example, In this tutorial, we will learn how to CREATE and DROP table using SQL query against Amazon Redshift ExecuteSQL server using ZS Amazon Redshift ExecuteSQL Task.</p>
<ol>
<li>In order to connect to the Amazon Redshift Database from SSIS, you will need credentials. Ask your SysAdmin or responsible person to provide that you.</li>
<li>Once you finished the first step, Open Visual Studio and Create New SSIS Package Project.</li>
<li>In your SSIS toolbox, you should see many new Icons starting with “ZS” (i.e. ZappySys). If you don’t see them then <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/getting-started.htm" target="_blank" rel="noopener">check this.</a></li>
<li>Here, In Visual Studio, drag and drop the Amazon Redshift ExecuteSQL Task in the design surface.
<div style="width: 585px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-executesql-task/ssis-amazon-redshift-executeSql-task-drag-drop.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-executesql-task/ssis-amazon-redshift-executeSql-task-drag-drop.png" alt="SSIS ZS Amazon Redshift ExecuteSQL Task - Drag and Drop" width="575" height="100" /></a><p class="wp-caption-text">SSIS ZS Amazon Redshift ExecuteSQL Task &#8211; Drag and Drop</p></div></li>
<li>Now we need Amazon Redshift Connection. Click <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-amazon-redshift-connection-manager.htm" target="_blank" rel="noopener">here</a> to Create Amazon Redshift Connection.</li>
<li>Double click on Amazon Redshift ExecuteSQL Task to configure it.</li>
<li>Select connection we have created before, set Sql Source Type to DirectValue, Result Type to FullResultSet and select object Datatype Variable and Use following SQL Query for Amazon Redshift.<br />
<pre class="crayon-plain-tag">DROP TABLE IF EXISTS CustomerData;
CREATE TABLE CustomerData(
	Id bigint NULL,
	CustomerID VARCHAR(5) NOT NULL,
	CustomerName VARCHAR(50) NOT NULL,
	ContactName VARCHAR(40) NOT NULL,
	CustomerCity VARCHAR(50) NOT NULL
)</pre>
<div style="width: 646px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-executesql-task/ssis-amazon-redshift-execute-sql-task-direct-sql-query.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-executesql-task/ssis-amazon-redshift-execute-sql-task-direct-sql-query.png" alt="Execute SQL query against Amazon Redshift in SSIS" width="636" height="582" /></a><p class="wp-caption-text">SSIS Amazon Redshift ExecuteSQL Task &#8211; Configure</p></div></li>
<li>Click on OK button to save configure setting UI.</li>
<li>That&#8217;s all, right-click on the task and run or Execute. This should create a new table in Redshift.
<div style="width: 385px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-executesql-task/ssis-amazon-redshift-executesql-task-execute.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-executesql-task/ssis-amazon-redshift-executesql-task-execute.png" alt="SSIS ZS Amazon Redshift ExecuteSQL Task - Run or Execute" width="375" height="203" /></a><p class="wp-caption-text">Run or Execute SSIS ZS ExecuteSQL Task Package</p></div></li>
</ol>
<h2>Conclusion</h2>
<p>After all, In this blog, we learned how to Execute SQL query against Amazon Redshift in SSIS using ZS Amazon Redshift ExecuteSQL Task. 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>References</h2>
<p>Finally, you can use the following links for more information:</p>
<ul>
<li><a href="https://docs.aws.amazon.com/redshift/?id=docs_gateway" target="_blank" rel="noopener">Amazon Redshift Document</a></li>
<li><strong>Help File:</strong> <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/amazon-redshift-executesql-task.htm" target="_blank" rel="noopener">SSIS ZS Amazon Redshift ExecuteSQL Task</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/execute-sql-query-amazon-redshift-ssis/">Execute SQL query against Amazon Redshift in 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>SSIS Amazon S3 Storage Task examples (Download, Upload, Delete Files / Folders)</title>
		<link>https://zappysys.com/blog/ssis-amazon-s3-storage-task-examples-download-upload-move-delete-files-folders/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 06 Apr 2019 10:22:55 +0000</pubDate>
				<category><![CDATA[SSIS Amazon S3 Connection]]></category>
		<category><![CDATA[SSIS Amazon Storage Task]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[storage]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6707</guid>

					<description><![CDATA[<p>Introduction In this article, we will show SSIS Amazon S3 Storage task examples. Uploading files using Amazon S3 Storage Task or downloading files are common requirements in SSIS. In order to work with Amazon S3 Storage, Microsoft SSIS includes the Amazon S3 Storage Task that allows to upload files to Amazon S3 Storage, download files, creating [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-amazon-s3-storage-task-examples-download-upload-move-delete-files-folders/">SSIS Amazon S3 Storage Task examples (Download, Upload, Delete Files / Folders)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction_8211_Using_SSIS_SFTP_task_FTP_SFTP_FTPS">Introduction</span></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/s3-e1553183075864.png"><img loading="lazy" decoding="async" class="wp-image-6547 size-full alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/03/s3-e1553183075864.png" alt="Amazon S3" width="150" height="150" /></a>In this article, we will show <strong>SSIS Amazon S3 Storage task examples</strong>. Uploading files using Amazon S3 Storage Task or downloading files are common requirements in SSIS. In order to work with Amazon S3 Storage, Microsoft SSIS includes the Amazon S3 Storage Task that allows to upload files to Amazon S3 Storage, download files, creating local and remote directories an more. In this article, we will show how to use the <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-task/" target="_blank" rel="noopener">SSIS Amazon S3 Storage task</a> included in ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>.</p>
<p>Amazon S3 Storage Task can be used to perform various operations with Amazon S3 Storage objects (files and containers) (e.g. Download, Upload, Copy, Move, Rename, Delete, etc). You can also get single property of any Amazon file or get a list of Amazon files as ADO.net Table and which can be easily looped through using ForEachLoop Task. Most of the operations in this task support recursive search using wild card pattern (e.g. Myfile*.txt).</p>
<h2><span id="Prerequisite"><span id="Requirements">Prerequisite<br />
</span></span></h2>
<ol>
<li>First, you will need to have SSIS installed</li>
<li>Secondly, make sure to have SSDT</li>
<li>You have obtained Amazon S3 account access key / secret key.</li>
<li>Finally, do not forget to install <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></li>
</ol>
<h2><span id="What_is_Amazon_S3_Storage">What is Amazon S3 Storage</span></h2>
<p>Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance. This means customers of all sizes and industries can use it to store and protect any amount of data for a range of use cases, such as websites, mobile applications, backup and restore, archive, enterprise applications, IoT devices, and big data analytics. Amazon S3 provides easy-to-use management features so you can organize your data and configure finely-tuned access controls to meet your specific business, organizational, and compliance requirements. Amazon S3 is designed for 99.999999999% (11 9’s) of durability, and stores data for millions of applications for companies all around the world.</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/ssis-amazon-s3-task/" target="_blank" rel="noopener">SSIS Amazon S3 Storage Task</a> that will allow you to access files / folders from Amazon S3 Storage to the Local machine, Upload files(s) to Amazon S3 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 upload, download, move and delete files / folders from Amazon S3 Storage.</p>
<h2>SSIS Amazon S3 Storage Task Examples</h2>
<p>Let´s start with an example. In this SSIS Amazon S3 Storage Task File task example, we will upload, download, move and delete files / folders from Amazon S3 Storage.</p>
<ol>
<li>First of All, Drag and Drop Amazon S3 Storage Task from SSIS Toolbox and double click it to edit
<div id="attachment_6708" style="width: 706px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-add-s3-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6708" class="wp-image-6708 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-add-s3-task.png" alt="Drag and Drop Amazon S3 Storage Task" width="696" height="404" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-add-s3-task.png 696w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-add-s3-task-300x174.png 300w" sizes="(max-width: 696px) 100vw, 696px" /></a><p id="caption-attachment-6708" class="wp-caption-text">Drag and Drop Amazon S3 Storage Task</p></div></li>
<li>The following options are available in Amazon S3 Storage Task:
<div id="attachment_6709" style="width: 723px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-aws-s3-storage-task-options.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6709" class="wp-image-6709 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-aws-s3-storage-task-options.png" alt="Options to upload, download files in SSIS" width="713" height="689" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-aws-s3-storage-task-options.png 713w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-aws-s3-storage-task-options-300x290.png 300w" sizes="(max-width: 713px) 100vw, 713px" /></a><p id="caption-attachment-6709" class="wp-caption-text">Options to upload, download files in SSIS</p></div></li>
<li>You can also overwrite files and folder, skip all, overwrite if source is older, overwrite if the file size is different, rename files and more:
<div id="attachment_6678" style="width: 692px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/overwrite-action-ssis-za-am-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6678" class="wp-image-6678 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/overwrite-action-ssis-za-am-task.png" alt="Overwrite files in SSIS" width="682" height="492" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/overwrite-action-ssis-za-am-task.png 682w, https://zappysys.com/blog/wp-content/uploads/2019/03/overwrite-action-ssis-za-am-task-300x216.png 300w" sizes="(max-width: 682px) 100vw, 682px" /></a><p id="caption-attachment-6678" class="wp-caption-text">Overwrite files in SSIS</p></div></li>
<li>Let&#8217;s select the <strong>Download Amazon file(s) to local directory</strong>. Now select/add The Source path, Check Recursive Scan to get all the sub files and sub folders and it&#8217;s files and add Target Path, This option will download files. In Path AccessMode we can use Direct to write the path directly or to use an SSIS variable.
<div id="attachment_6735" style="width: 595px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-download-files.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6735" class="wp-image-6735 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-download-files.png" alt="ssis-az-blob-aws-s3-download-files" width="585" height="522" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-download-files.png 585w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-download-files-300x268.png 300w" sizes="(max-width: 585px) 100vw, 585px" /></a><p id="caption-attachment-6735" class="wp-caption-text">SSIS Amazon S3 Storage Task – Download files from Amazon S3 Storage</p></div></li>
<li>That&#8217;s it now execute the package and it will download all the files and sub folders from the Amazon S3 Storage Task to Local File Machine.</li>
<li>Now Let&#8217;s configure the task to upload the local directory files and folder to Amazon S3 Storage like below and execute the package. And also in this example i created the variable and stored target folder path in it and used that variable Target Path Variable.
<div id="attachment_6739" style="width: 592px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-upload-files.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6739" class="wp-image-6739 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-upload-files.png" alt="SSIS Amazon S3 Storage Task – Upload files from Amazon S3 Storage" width="582" height="523" /></a><p id="caption-attachment-6739" class="wp-caption-text">SSIS Amazon S3 Storage Task – Upload files from Amazon S3 Storage</p></div></li>
<li>Let&#8217;s configure the task to delete Amazon S3 Storage files like below and execute the package.
<div id="attachment_6743" style="width: 591px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-delete-files.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6743" class="wp-image-6743 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-delete-files.png" alt="SSIS Azure Blob Storage Task – Delete files from Azure Blob Storage" width="581" height="523" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-delete-files.png 581w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-delete-files-300x270.png 300w" sizes="(max-width: 581px) 100vw, 581px" /></a><p id="caption-attachment-6743" class="wp-caption-text">SSIS Amazon S3 Storage Task – Delete files from Amazon S3 Storage</p></div></li>
<li>Let&#8217;s configure the task to move Amazon S3 Storage files to another directory like below and execute the package.
<div id="attachment_6746" style="width: 566px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-move-files.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6746" class="wp-image-6746 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-move-files.png" alt="SSIS Azure Blob Storage Task – Move files from Azure Blob Storage" width="556" height="476" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-move-files.png 556w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-move-files-300x257.png 300w" sizes="(max-width: 556px) 100vw, 556px" /></a><p id="caption-attachment-6746" class="wp-caption-text">SSIS Amazon S3 Storage Task – Move files from Amazon S3 Storage</p></div></li>
<li>That&#8217;s it like upper examples you can configure Amazon S3 Storage Task to use it&#8217;s other options also.</li>
<li>Let&#8217;s see other SSIS Amazon S3 Storage Task examples in below sections</li>
</ol>
<h2>Working with advanced filters</h2>
<p>In order to understand filters, we will create an example for you. This time we will create SSIS Amazon S3 Storage task example to show how to exclude some files from the downloading process.</p>
<ol>
<li>In addition, it is also possible to add advanced filters to the SSIS Amazon S3 Storage task to exclude or include files and folders. The following example shows how to use the Advanced filters. In the <strong>Amazon S3 Storage Task, </strong>go to the Advanced Filter page and in Exclude RegX we will write \.exe$ to exclude the file with exe extension to be downloaded. You can use RegX (regular expressions) in the advanced filter:
<div id="attachment_6693" style="width: 691px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-working-with-advanced-filters.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6693" class="wp-image-6693 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-working-with-advanced-filters.png" alt="Advanced filters" width="681" height="487" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-working-with-advanced-filters.png 681w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-working-with-advanced-filters-300x215.png 300w" sizes="(max-width: 681px) 100vw, 681px" /></a><p id="caption-attachment-6693" class="wp-caption-text">Advanced filters</p></div></li>
</ol>
<p>&nbsp;</p>
<h2>Working with wildcards in SSIS Amazon S3 Storage task (Multiple files only)</h2>
<p>In order to understand wildcards, the new example will show how to work with Wildcards will help you to work with multiple files or folder with common characteristics.</p>
<ol>
<li>The following example shows how to copy all the files will all the extensions in the source folder. We use the *.*, which means that any file name with any extension will be downloaded:
<div id="attachment_6695" style="width: 690px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-working-with-wildcards.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6695" class="wp-image-6695 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-working-with-wildcards.png" alt="Working with Wildcards" width="680" height="487" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-working-with-wildcards.png 680w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-working-with-wildcards-300x215.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></a><p id="caption-attachment-6695" class="wp-caption-text">Working with Wildcards</p></div></li>
<li>If we want to download all the files with extension txt, use the following Path:<br />
<pre class="crayon-plain-tag">/source/*.txt;</pre>
</li>
<li>Another example would be to download all the files with the following names: file1.txt, file2.txt and file3.txt.  We could use the following Path:<br />
<pre class="crayon-plain-tag">/source/file?.txt</pre>
</li>
</ol>
<h2></h2>
<h2><strong>Working with SSIS expressions and variables in Amazon S3 Storage Task</strong></h2>
<p>In order to understand expressions, the following example will show how to work with SSIS expressions combined with variables in the SSIS Amazon S3 Storage task. In this example we will delete files in Amazon S3 Storage using variables and expressions.</p>
<div class="messageTextWrapper">
<p class="urlPreviewText">ZappySys Providers simple and powerful Placeholders. You can still use SSIS expression language. Placeholders allow direct Variable Use easy to see compared to hidden SSIS Expression (C# style). Placeholders have simple embedding use of variables.</p>
</div>
<ol>
<li> First, we will first create a variable in SSIS. In this example the file name is <strong>MyFile</strong> and the Value<strong> file1</strong>.
<div id="attachment_2994" style="width: 782px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis.sftp-variable.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2994" class="size-full wp-image-2994" src="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis.sftp-variable.png" alt="Create a SSIS variable" width="772" height="205" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis.sftp-variable.png 772w, https://zappysys.com/blog/wp-content/uploads/2018/03/ssis.sftp-variable-300x80.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/03/ssis.sftp-variable-768x204.png 768w" sizes="(max-width: 772px) 100vw, 772px" /></a><p id="caption-attachment-2994" class="wp-caption-text">Create an SSIS variable</p></div></li>
<li>As a second step, we will write in path the value<strong> \destination\{{User.MyFile}}.txt. </strong>This will concatenate the folder destination with the variable MyFile. The task will delete the file1.txt from the Amazon S3 Storage folder.
<div id="attachment_6699" style="width: 687px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-working-with-variable-in-path.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6699" class="wp-image-6699 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-working-with-variable-in-path.png" alt="Using SSIS expressions" width="677" height="487" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-working-with-variable-in-path.png 677w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-working-with-variable-in-path-300x216.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-6699" class="wp-caption-text">Using SSIS expressions</p></div></li>
<li>The next example will show how to create a Amazon S3 Storage file using expressions and variables in SSIS:
<div id="attachment_6700" style="width: 689px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-aws-task-create-file.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6700" class="wp-image-6700 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-aws-task-create-file.png" alt="Create file" width="679" height="481" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-aws-task-create-file.png 679w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-aws-task-create-file-300x213.png 300w" sizes="(max-width: 679px) 100vw, 679px" /></a><p id="caption-attachment-6700" class="wp-caption-text">Create file</p></div></li>
<li>Content to write is the content of the file. In <strong>Target, </strong>go to path and write the following: For more information on placeholders <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-format-specifiers.htm#A1" target="_blank" rel="noopener">check this post</a> and also check <a href="https://zappysys.zendesk.com/hc/en-us/articles/115004918633-How-to-format-Path-URL-using-date-time-format" target="_blank" rel="noopener">this post</a>.<br />
<pre class="crayon-plain-tag">/destination/{{User::FileName,MM-dd-yyyy}}</pre>
</li>
<li>We are using a variable in SSIS named FileName of type DateTime. We are concatenating the Amazon S3 Storage folder destination with the variable. As you can see, the expressions with ZappySys are very simple.</li>
</ol>
<h2>Example to verify if file exists in SSIS Amazon S3 Storage task</h2>
<p>Finally, we will verify if a file in Amazon S3 Storage exists or not using the SSIS Amazon S3 Storage task.</p>
<ol>
<li>In order to start, we will use the SSIS variables, create a variable of Boolean type named FileExists. In <strong>Storage Action, </strong>select <strong>Get Amazon file exist status. </strong>In path, select the path of the file to verify if it exists or not.
<div id="attachment_6749" style="width: 593px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-file-exist.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6749" class="wp-image-6749 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-file-exist.png" alt="SSIS Azure Blob Storage Task – Check File Exist in Azure Blob Storage" width="583" height="523" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-file-exist.png 583w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-az-blob-aws-s3-file-exist-300x269.png 300w" sizes="(max-width: 583px) 100vw, 583px" /></a><p id="caption-attachment-6749" class="wp-caption-text">SSIS Amazon S3 Storage Task – Check File Exist in Amazon S3 Storage</p></div></li>
<li>Secondly, we will use the <strong>ZS Logging Task </strong>to check the value of the variable File Exists. This task will show the value of the variable in the log. Drag and drop the task and join it with the ZS Amazon S3 Storage Task:
<div id="attachment_6710" style="width: 272px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-aws-s3-to-log-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6710" class="wp-image-6710 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-aws-s3-to-log-task.png" alt="The SSIS Log task" width="262" height="268" /></a><p id="caption-attachment-6710" class="wp-caption-text">The SSIS Log task</p></div></li>
<li>In order to get the value, we will insert it in the Logging Task. To do that, insert the Variable and select the FileExists variable:
<div id="attachment_3005" style="width: 634px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis-ftp-verify-folder-exists.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3005" class="size-full wp-image-3005" src="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis-ftp-verify-folder-exists.png" alt="Configuring variable" width="624" height="501" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis-ftp-verify-folder-exists.png 624w, https://zappysys.com/blog/wp-content/uploads/2018/03/ssis-ftp-verify-folder-exists-300x241.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></a><p id="caption-attachment-3005" class="wp-caption-text">Add the variable in the task logging</p></div></li>
<li>Finally, run the package and verify the Output (you can use View and Output to see the output) and check the value of the Logging Task. If the file exists, the value will be true. If it does not exist, the value will be false.
<div id="attachment_3004" style="width: 1036px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/SFTP-read-variables.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3004" class="wp-image-3004 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/SFTP-read-variables.png" alt="Verify the value of the variable in the SSIS output" width="1026" height="234" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/SFTP-read-variables.png 1026w, https://zappysys.com/blog/wp-content/uploads/2018/03/SFTP-read-variables-300x68.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/03/SFTP-read-variables-768x175.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/03/SFTP-read-variables-1024x234.png 1024w" sizes="(max-width: 1026px) 100vw, 1026px" /></a><p id="caption-attachment-3004" class="wp-caption-text">Verify the variable in Output</p></div></li>
</ol>
<h2>How to loop through Amazon S3 Storage files in SSIS</h2>
<p>You can also loop through files to perform custom action file by by. Amazon S3 Storage Task support Action to <strong>get File List as ADO.net Recordset</strong></p>
<p>To get File list from Amazon S3 Storage Server perform the following steps.</p>
<ol>
<li>From Storage Action select <strong><strong>Get Amazon files as ADO.net DataTable<br />
</strong></strong></p>
<div id="attachment_6703" style="width: 615px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-get-files-as-ado.net-datatable.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6703" class="wp-image-6703 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-get-files-as-ado.net-datatable.png" alt="Get files as ADO.net DataTable" width="605" height="295" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-get-files-as-ado.net-datatable.png 605w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-get-files-as-ado.net-datatable-300x146.png 300w" sizes="(max-width: 605px) 100vw, 605px" /></a><p id="caption-attachment-6703" class="wp-caption-text">Get files as ADO.net DataTable</p></div>
<p>&nbsp;</li>
<li>Create new Amazon S3 Storage Connection by clicking New next to connection dropdown.</li>
<li>Select Source Path (e.g  <strong>\myroot\folder\*.txt </strong> )</li>
<li>Select or create new SSIS Variable (e.g. <strong>varFiles</strong> ) which will hold file list result (Must be Object datatype variable).</li>
<li>Click OK to close.</li>
<li>Create 3 more SSIS variables to hold File Path (String), Name (String) and Size (Int32). We will use in the next step.</li>
<li>Now drag SSIS ForEach Loop Container Task from SSIS Toolbox</li>
<li>Edit Loop Task and Select <strong>Foreach ADO Enumerator</strong> from the Enumerator dropdown</li>
<li>Select variable (e.g. <strong><strong>varFiles)<br />
</strong></strong></p>
<div id="attachment_346" style="width: 635px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-looping-through-files-ado-net-recordset.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-346" class="wp-image-346 size-full" src="https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-looping-through-files-ado-net-recordset.png" alt="Loop through files in SSIS using ForEach Loop Task (use ADO.net Recordset variable)" width="625" height="563" srcset="https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-looping-through-files-ado-net-recordset.png 625w, https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-looping-through-files-ado-net-recordset-300x270.png 300w" sizes="(max-width: 625px) 100vw, 625px" /></a><p id="caption-attachment-346" class="wp-caption-text">Loop through files in SSIS using ForEach Loop Task (use ADO.net Recordset variable)</p></div></li>
<li>Click on Variable Mappings Tab and configure like below.
<div id="attachment_345" style="width: 582px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-looping-through-files-ado-net-recordset-variable-mapping.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-345" class="size-full wp-image-345" src="https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-looping-through-files-ado-net-recordset-variable-mapping.png" alt="Variable Mappings for ForEach Loop Task - Loop through files in a folder using SSIS" width="572" height="272" srcset="https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-looping-through-files-ado-net-recordset-variable-mapping.png 572w, https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-looping-through-files-ado-net-recordset-variable-mapping-300x143.png 300w" sizes="(max-width: 572px) 100vw, 572px" /></a><p id="caption-attachment-345" class="wp-caption-text">Variable Mappings for ForEach Loop Task &#8211; Loop through files in a folder using SSIS</p></div></li>
<li>Drag ZS Logging Task and place inside Loop and Display variables</li>
<li>That&#8217;s it</li>
</ol>
<p>For more information to <a href="//zappysys.com/blog/get-list-of-files-and-folders-in-ssis-for-looping/" target="_blank" rel="noopener">loop through files on local machine using SSIS check this article</a>.</p>
<h2>Conclusion</h2>
<p>To conclude, we can say that working with Amazon S3 Storage is now very simple. In this article, we looked at SSIS Amazon S3 Storage Task examples on how to upload, download, delete files and folders. We used variables, wildcards and expressions. If you liked the tasks you can start using them by downloading SSIS PowerPack from our <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">web site here</a>. We saw different SSIS Amazon S3 Storage Task examples to understand how to use the task in different scenarios.</p>
<p>Thanks for your time.</p>
<h2>References</h2>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">About SSIS PowerPack</a></li>
<li><a href="https://docs.microsoft.com/en-us/sql/integration-services/expressions/integration-services-ssis-expressions" target="_blank" rel="noopener">Integration Services (SSIS) Expressions</a></li>
<li>Help File : <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=amazon-s3-storage-task.htm" target="_blank" rel="noopener">Amazon Storage Task</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/ssis-amazon-s3-storage-task-examples-download-upload-move-delete-files-folders/">SSIS Amazon S3 Storage Task examples (Download, Upload, Delete Files / Folders)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read Amazon S3 Storage Files in SSIS (CSV, JSON, XML)</title>
		<link>https://zappysys.com/blog/read-amazon-storage-s3-files-ssis-csv-json-xml/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 16 Mar 2019 09:43:13 +0000</pubDate>
				<category><![CDATA[S3 (Simple Storage Service)]]></category>
		<category><![CDATA[SSIS Amazon S3 Connection]]></category>
		<category><![CDATA[SSIS Amazon S3 CSV Source]]></category>
		<category><![CDATA[SSIS Amazon S3 JSON Source]]></category>
		<category><![CDATA[SSIS Amazon S3 XML Source]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[Amazon S3]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6544</guid>

					<description><![CDATA[<p>Introduction In our previous blog we saw how to load data into Amazon S3. Now in this blog, we will see How to read Amazon S3 Storage 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 to multiple destinations [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-amazon-storage-s3-files-ssis-csv-json-xml/">Read Amazon S3 Storage 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/2019/03/s3.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignleft wp-image-6547 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/s3-e1553183075864.png" alt="Amazon S3 - AWS Storage" width="150" height="150" /></a>In our previous blog we saw <a href="https://zappysys.com/blog/load-data-sql-server-to-amazon-s3/" target="_blank" rel="noopener">how to load data into Amazon S3</a>. Now in this blog, we will see <strong>How to read Amazon S3 Storage 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 perform File operations on Amazon S3 Files (e.g. Download, Upload, Create, Delete) then <a href="https://zappysys.com/blog/category/ssis/tasks/ssis-amazon-storage-task/" target="_blank" rel="noopener">check these articles</a>.</p>
<p>In nutshell, this post will focus on how to Read Amazon S3 Storage CSV, JSON and XML Files using respective SSIS Source tasks.</p>
<p>&nbsp;</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: 35px"><img loading="lazy" decoding="async" src="https://i2.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-s3-csv-source/ssis-amazon-s3-csv-file-source.png?w=720&amp;ssl=1" alt="SSIS Amazon S3 CSV File Source" width="32" height="32" /></td>
<td style="width: 356px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-csv-file-source/" target="_blank" rel="noopener">Amazon S3 CSV File Source</a></td>
</tr>
<tr>
<td style="width: 35px"><img loading="lazy" decoding="async" src="https://i2.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-s3-csv-destination/ssis-amazon-s3-csv-file-destination.png?w=720&amp;ssl=1" alt="SSIS Amazon S3 CSV File Destination" width="32" height="32" /></td>
<td style="width: 356px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-csv-file-destination/" target="_blank" rel="noopener">Amazon S3 CSV File Destination</a></td>
</tr>
<tr>
<td style="width: 35px"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-s3-xml-source/ssis-amazon-s3-xml-file-source.png?w=720&amp;ssl=1" alt="SSIS Amazon S3 XML File Source" width="32" height="32" /></td>
<td style="width: 356px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-xml-file-source/" target="_blank" rel="noopener">Amazon S3 XML File Source</a></td>
</tr>
<tr>
<td style="width: 35px"><img loading="lazy" decoding="async" src="https://i2.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-s3-json-source/ssis-amazon-s3-json-file-source.png?w=720&amp;ssl=1" alt="SSIS Amazon S3 JSON File Source" width="32" height="32" /></td>
<td style="width: 356px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-json-file-source/" target="_blank" rel="noopener">Amazon S3 JSON File Source</a><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 Amazon S3 account access key / secret key.</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>What is Amazon S3 Storage</h2>
<p>Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance. This means customers of all sizes and industries can use it to store and protect any amount of data for a range of use cases, such as websites, mobile applications, backup and restore, archive, enterprise applications, IoT devices, and big data analytics. Amazon S3 provides easy-to-use management features so you can organize your data and configure finely-tuned access controls to meet your specific business, organizational, and compliance requirements. Amazon S3 is designed for 99.999999999% (11 9&#8217;s) of durability, and stores data for millions of applications for companies all around the world.</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_amazon_aws_cloud" target="_blank" rel="noopener">SSIS Amazon S3 Source for CSV/JSON/XML File</a> that will help you in reading CSV, JSON and XML Files from Amazon S3 to the Local machine, Upload files(s) to Amazon S3 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 Amazon S3 Storage.</p>
<p>You can connect to your <a href="https://console.aws.amazon.com/?nc2=h_m_mc" target="_blank" rel="noopener">Amazon S3 Account</a> by entering your storage account credentials.</p>
<h2>Read Amazon S3 Storage Files in SSIS (CSV, JSON, XML)</h2>
<p>Let´s start with an example. In this SSIS Amazon S3 Source for CSV/JSON/XML File task example, we will read CSV/JSON/XML files from Amazon S3 Storage 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>Drag and Drop relevant Amazon S3 Source for CSV/JSON/XML File Task from the SSIS Toolbox.
<div id="attachment_6590" style="width: 710px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-amazon-s3-source-add-tasks.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6590" class="wp-image-6590 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-amazon-s3-source-add-tasks.png" alt="Add Amazon S3 Source Tasks" width="700" height="244" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-amazon-s3-source-add-tasks.png 700w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-amazon-s3-source-add-tasks-300x105.png 300w" sizes="(max-width: 700px) 100vw, 700px" /></a><p id="caption-attachment-6590" class="wp-caption-text">Add Amazon S3 Source Tasks</p></div></li>
<li>Create a connection for Amazon S3 Storage Account.
<div id="attachment_6551" style="width: 765px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-amazon-s3-source-select-connection-manager.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6551" class="wp-image-6551 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-amazon-s3-source-select-connection-manager.png" alt="Create Amazon S3 Storage Connection" width="755" height="528" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-amazon-s3-source-select-connection-manager.png 755w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-amazon-s3-source-select-connection-manager-300x210.png 300w" sizes="(max-width: 755px) 100vw, 755px" /></a><p id="caption-attachment-6551" class="wp-caption-text">Create Amazon S3 Storage Connection</p></div></li>
<li>Select the relevant single file to read from Amazon S3 Storage 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 Amazon S3 Storage</p></div></li>
<li>We can also read the multiple files stored in Amazon S3 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 Amazon S3 Source 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 Amazon S3 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 Amazon S3 Storage Files in SSIS. We used <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-csv-file-source/" target="_blank" rel="noopener">Amazon S3 Source for CSV file</a>, <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-json-file-source/" target="_blank" rel="noopener">Amazon S3 Source for JSON file</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-xml-file-source/" target="_blank" rel="noopener">Amazon S3 Source for XML file</a> to read the file(s) from Amazon S3 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_amazon_aws_cloud" target="_blank" rel="noopener">SSIS Amazon S3 Source for CSV/JSON/XML File</a></li>
<li><a href="http://aws.amazon.com/s3/faqs/" target="_blank" rel="noopener">Introduction to Amazon S3 Storage Service</a></li>
<li><a href="https://www.youtube.com/watch?v=zdWPTvtW0E0" target="_blank" rel="noopener">How to Get Your Amazon AWS Access Key &amp; Secret Key</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/read-amazon-storage-s3-files-ssis-csv-json-xml/">Read Amazon S3 Storage Files in SSIS (CSV, JSON, XML)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Extract / Unload Redshift data into SQL Server using SSIS</title>
		<link>https://zappysys.com/blog/extract-unload-redshift-data-sql-server-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 27 Oct 2015 19:55:36 +0000</pubDate>
				<category><![CDATA[AWS (Amazon Web Services)]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Redshift]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[big data]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[etl]]></category>
		<category><![CDATA[extract]]></category>
		<category><![CDATA[redshift]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=128</guid>

					<description><![CDATA[<p>Introduction In our previous article we saw how to load data into Redshift using SSIS or load data into Redshift using ZappyShell Redshift Command Line In this article we will walk through various steps to Extract/UNLOAD Redshift Data into SQL Server using Amazon S3 Storage Task and ExecuteSQL Task for Amazon Redshift. Below is the [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/extract-unload-redshift-data-sql-server-using-ssis/">Extract / Unload Redshift data into SQL Server using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In our previous article we saw <a href="//zappysys.com/posts/sql-server-to-redshift-data-load-using-ssis/">how to load data into Redshift using SSIS</a> or load data into Redshift using ZappyShell <a href="//zappysys.com/products/zappyshell/amazon-redshift-command-line-tools/">Redshift Command Line</a></p>
<p>In this article we will walk through various steps to <em>Extract/UNLOAD Redshift Data into SQL Server</em> using <a href="//zappysys.com/products/ssis-powerpack/ssis-amazon-s3-task/">Amazon S3 Storage Task</a> and <a href="//zappysys.com/products/ssis-powerpack/ssis-redshift-execute-sql-task/">ExecuteSQL Task for Amazon Redshift</a>. Below is the screenshot of actual SSIS Package to <em>Extract Redshift Data and Load into SQL Server</em></p>
<div id="attachment_164" style="width: 664px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/extract-unload-redshift-data-load-to-sql-server-ssis.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-164" class="size-full wp-image-164" src="//zappysys.com/blog/wp-content/uploads/2015/10/extract-unload-redshift-data-load-to-sql-server-ssis.png" alt="Extract/Unload Redshift Data using SSIS and Load into SQL Server" width="654" height="565" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/extract-unload-redshift-data-load-to-sql-server-ssis.png 654w, https://zappysys.com/blog/wp-content/uploads/2015/10/extract-unload-redshift-data-load-to-sql-server-ssis-300x259.png 300w" sizes="(max-width: 654px) 100vw, 654px" /></a><p id="caption-attachment-164" class="wp-caption-text">Extract/Unload Redshift Data using SSIS and Load into SQL Server</p></div>
<h2>Requirements for Extract Redshift Data using SSIS</h2>
<p>Before you <a href="http://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD.html">UNLOAD</a> data from Redshift, you have to make sure few things.</p>
<ol>
<li>Setup your Redshift cluster (Follow these instructions <a href="//zappysys.com/blog/how-to-setup-amazon-redshift-cluster-for-outside-data-access/">to setup redshift cluster</a>)</li>
<li>Load some sample data to Redshift (Red more here: <a href="//zappysys.com/posts/sql-server-to-redshift-data-load-using-ssis/">How to load data to Redshift</a>)</li>
<li>Make sure you have correct connection settings to connect to Redshift cluster (Host name, Port, UserId, Password, DB name etc). You can get host name from AWS Console.</li>
<li>Make sure you have Access to S3 Bucket where files will be dumped from Redshift. You will need AccessKey and SecretKey to fetch files from S3</li>
</ol>
<h2>Step-1: Execute Redshift UNLOAD Command</h2>
<p>Very first step would be to unload redshift data as GZip file using <a href="//zappysys.com/products/ssis-powerpack/ssis-redshift-execute-sql-task/">ExecuteSQL Task for Amazon Redshift</a><br />
Below is SQL Command you can use to <em>extract data from Redshift</em>. Notice how we used variable placeholders in SQL Command. These placeholders are replaced at runtime with actual value stored in specified variable.</p><pre class="crayon-plain-tag">unload ('select * from (select * from customerdata limit 1000)')
to 's3://bw-rstest/stage/custdata'
credentials 'aws_access_key_id={{User::S3Accesskey}};aws_secret_access_key={{User::S3SecretKey}}'
ALLOWOVERWRITE</pre><p>
<b>Export as GZip files (Compressed files)</b></p>
<p>If you exporting data as compressed files to save data transfer cost then use GZIP option as below.</p>
<p><strong>NOTE:</strong> Make sure there are no spaces before and after AccessKey and SecretKey otherwise you may get error.</p><pre class="crayon-plain-tag">unload ('select * from (select * from customerdata limit 1000)')
to 's3://bw-rstest/stage/custdata_file_'
credentials 'aws_access_key_id={{User::S3Accesskey}};aws_secret_access_key={{User::S3SecretKey}}'
ALLOWOVERWRITE
GZIP</pre><p>
<h3>Common Errors / Troubleshooting</h3>
<p><strong>UNLOAD command issue with Region mismatch (S3 bucket vs Redshift Cluster)</strong></p>
<p>If your S3 bucket is in different region than Redshift cluster then above command may fail with &#8220;<em>301 permanent redirect error</em>&#8221; in that case you have to change your S3 bucket region. Region can be changed in AWS console (See S3 bucket properties and change location to match region with Redshift cluster region. Both regions must be same.</p>
<blockquote><p>ERROR: XX000: S3ServiceException:The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.,Status 301,Error PermanentRedirect</p></blockquote>
<p><strong>UNLOAD command issue with accesskey and secret key</strong></p>
<p>If you specify invalid accesskey or secretkey &#8211;or&#8211; you have misspelled keywords related to credentials &#8212; or &#8212; you have spaces before or after accesskey or secret key then you may get following error.</p>
<blockquote><p>ERROR: XX000: Invalid credentials. Must be of the format: credentials &#8216;aws_iam_role=&#8230;&#8217; or &#8216;aws_access_key_id=&#8230;;aws_secret_access_key=&#8230;[;token=&#8230;].</p></blockquote>
<h2>Step-2: Download data files from Amazon S3 Bucket to local machine</h2>
<p>Once files are exported to S3 bucket we can download then to local machine using <a href="//zappysys.com/products/ssis-powerpack/ssis-amazon-s3-task/">Amazon S3 Storage Task</a></p>
<h2>Step-3: Un-compress downloaded files</h2>
<p>If you have exported Redshift data as compressed files (using GZIP option) then you can use <a href="https://zappysys.com/products/ssis-powerpack/ssis-zip-file-task/" target="_blank">ZappySys Zip File task</a> to un-compress multiple files.</p>
<p>Or you can write Script to un-compress those files (see below code). You can skip this step if files are not compressed (not used GZIP option in command).</p>
<p>Here is sample <strong>C# code</strong> to un-compress <strong>GZip</strong> files</p><pre class="crayon-plain-tag">public void Main()
{
	System.IO.DirectoryInfo directorySelected = new System.IO.DirectoryInfo(@"C:\amazon\archive");

	foreach (System.IO.FileInfo fileToDecompress in directorySelected.GetFiles("custdata*_part_*"))
	{
		Decompress(fileToDecompress);
	}

	Dts.TaskResult = (int)ScriptResults.Success;
}
private static void Decompress(System.IO.FileInfo fileToDecompress)
{
	using (System.IO.FileStream originalFileStream = fileToDecompress.OpenRead())
	{
		string currentFileName = fileToDecompress.FullName;
		string newFileName = currentFileName.Remove(currentFileName.Length - fileToDecompress.Extension.Length);

		using (System.IO.FileStream decompressedFileStream = System.IO.File.Create(newFileName))
		{
			using (System.IO.Compression.GZipStream decompressionStream = new System.IO.Compression.GZipStream(originalFileStream, System.IO.Compression.CompressionMode.Decompress))
			{
				decompressionStream.CopyTo(decompressedFileStream);
				//Console.WriteLine("Decompressed: {0}", fileToDecompress.Name);
			}
		}
	}
}</pre><p>
&nbsp;</p>
<h2>Step-4: Loop through files using ForEachLoop Container</h2>
<p>Once files downloaded from S3 bucket we can now loop through files using SSIS ForEach Loop Task and load into SQL Server (One file in each iteration)</p>
<div id="attachment_165" style="width: 705px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/ssis-loop-amazon-s3-files.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-165" class="size-full wp-image-165" src="//zappysys.com/blog/wp-content/uploads/2015/10/ssis-loop-amazon-s3-files.png" alt="Loop through files downloaded from Amazon S3 (Exported using Redshift UNLOAD Command)" width="695" height="384" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-loop-amazon-s3-files.png 695w, https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-loop-amazon-s3-files-300x166.png 300w" sizes="(max-width: 695px) 100vw, 695px" /></a><p id="caption-attachment-165" class="wp-caption-text">Loop through files downloaded from Amazon S3 (Exported using Redshift UNLOAD Command)</p></div>
<h2>Step-5: Data Flow &#8211; Load Redshift Data Files to SQL Server</h2>
<p>Inside data flow you can use Flat File source and OLEDB Destination for SQL Server. Just map correct File columns to SQL Server fields and you should be good. If needed convert Unicode/Non-unicode columns using Data Conversion Transform (This is not needed if source is DT_STR and target also DT_STR.. or source is DT_WSTR and target is DT_WSTR i.e. Unicode).</p>
<h2>Downloads</h2>
<p>To download above SSIS Package click on the below links. In order to test below package you first have to <a href="//zappysys.com/products/ssis-powerpack/">download SSIS PowerPack</a><br />
<a href="//zappysys.com/blog/wp-content/uploads/2015/11/RedshiftExtractDemo_2008.zip">Download Demo SSIS Package &#8211; SSIS 2008</a><br />
<a href="//zappysys.com/blog/wp-content/uploads/2015/11/RedshiftExtractDemo_2012.zip">Download Demo SSIS Package &#8211; SSIS 2012/2014</a></p>
<h2>Conclusion</h2>
<p>amazon Redshift is great way to start your data warehouse projects with very minimum investment in a very simple pay as you go model but loading or unloading data from redshift can be challenging task. Using <a href="//zappysys.com/products/ssis-powerpack/">SSIS PowerPack</a> you can perform Redshift data load or unload in few clicks.</p>
<p>The post <a href="https://zappysys.com/blog/extract-unload-redshift-data-sql-server-using-ssis/">Extract / Unload Redshift data into SQL Server using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
