<?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>SSIS Amazon S3 CSV Dest Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/category/ssis/components/ssis-amazon-s3-csv-destination/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/category/ssis/components/ssis-amazon-s3-csv-destination/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 16 Oct 2019 20:54:51 +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>SSIS Amazon S3 CSV Dest Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/category/ssis/components/ssis-amazon-s3-csv-destination/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Loading data from SQL Server to Amazon S3 in SSIS (Split Files, GZip)</title>
		<link>https://zappysys.com/blog/load-data-sql-server-to-amazon-s3/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 27 Jul 2016 22:07:34 +0000</pubDate>
				<category><![CDATA[SSIS Amazon S3 CSV Dest]]></category>
		<category><![CDATA[SSIS Amazon Storage Task]]></category>
		<category><![CDATA[SSIS CSV Export Task]]></category>
		<category><![CDATA[Amazon S3]]></category>
		<category><![CDATA[Amazon S3 Task]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[Export CSV Task]]></category>
		<category><![CDATA[sql server]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=704</guid>

					<description><![CDATA[<p>Introduction In this blog post you will see how easy it is to load large amount of data from SQL Server to Amazon S3 Storage. For demo purpose we will use SQL Server as relational source but you can use same steps for any database engine such as Oracle, MySQL, DB2. In this post we [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/load-data-sql-server-to-amazon-s3/">Loading data from SQL Server to Amazon S3 in SSIS (Split Files, GZip)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this blog post you will see how easy it is to load large amount of data from <em>SQL Server to Amazon S3</em> Storage. For demo purpose we will use SQL Server as relational source but you can use same steps for any database engine such as Oracle, MySQL, DB2. In this post we will use <a href="//zappysys.com/products/ssis-powerpack/ssis-export-csv-file-task/" target="_blank" rel="noopener">Export CSV Task</a> and <a href="//zappysys.com/products/ssis-powerpack/ssis-amazon-s3-task/" target="_blank" rel="noopener">Amazon S3 Storage Task </a> to achieve desired integration with Amazon S3 with drag and drop approach. You can also export JSON or XML data to Amazon S3 using same techniques (Use <a href="//zappysys.com/products/ssis-powerpack/ssis-export-json-file-task/" target="_blank" rel="noopener">Export JSON Task</a>  or <a href="//zappysys.com/products/ssis-powerpack/ssis-export-xml-file-task/" target="_blank" rel="noopener">Export XML Task</a> ).</p>
<p>Our goal is to achieve following things</p>
<ul>
<li>Extract large amount of data from SQL Server Table or Query and export to CSV files</li>
<li>Generate CSV files in compressed format (*.gz) to speedup upload and save data transfer cost to S3</li>
<li>Split CSV files by row count</li>
<li>Upload data to Amazon S3 using highly parallel manner for maximum speed</li>
</ul>
<p>There are three different ways you can achieve data export to Amazon S3 using SSIS.</p>
<ol>
<li><strong>Method-1 (Fastest)</strong>: Use two step process (First export SQL Server data to local files using <a href="//zappysys.com/products/ssis-powerpack/ssis-export-csv-file-task/" target="_blank" rel="noopener">Export Task</a> and then upload files to S3 using  <a href="//zappysys.com/products/ssis-powerpack/ssis-amazon-s3-task/" target="_blank" rel="noopener">Amazon S3 Storage Task </a> )</li>
<li><strong>Method-2 (Slower)</strong>: Use <a href="//zappysys.com/products/ssis-powerpack/ssis-export-csv-file-task/" target="_blank" rel="noopener">Export Task</a> with Amazon S3 Connection as Target rather than save to Local files.</li>
<li><strong>Method-3 (Slower)</strong>: Use Data flow components like <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-csv-file-destination/" target="_blank" rel="noopener">Amazon S3 Destination for CSV</a>  (for JSON / XML  use Method1 or Method2)</li>
</ol>
<p>Each method has its own advantage / disadvantage. If you prefer to upload / compress / split large amount of data then we recommend Method#1 (Two steps). If you have not very huge dataset then you can use Method#2 or Method#3. For Last method you can only use CSV export option (we don&#8217;t have JSON/ XML Destination for Amazon S3 yet &#8211; we may add in future)</p>
<p><strong>Screenshot of SSIS Package</strong></p>
<div id="attachment_707" style="width: 710px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/07/ssis-export-sql-server-data-upload-to-amazon-s3.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-707" class="wp-image-707" src="//zappysys.com/blog/wp-content/uploads/2016/07/ssis-export-sql-server-data-upload-to-amazon-s3.png" alt="Extract SQL Server Data to CSV files in SSIS (Bulk export) and Split / GZip Compress / upload files to Amazon S3 (AWS Cloud)" width="700" height="365" srcset="https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-export-sql-server-data-upload-to-amazon-s3.png 825w, https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-export-sql-server-data-upload-to-amazon-s3-300x156.png 300w" sizes="(max-width: 700px) 100vw, 700px" /></a><p id="caption-attachment-707" class="wp-caption-text">Extract SQL Server Data to CSV files in SSIS (Bulk export) and Split / GZip Compress / upload files to Amazon S3 (AWS Cloud)</p></div>
<h2>Method-1 : Upload SQL data to Amazon S3 in Two steps</h2>
<p>In this section we will see first method (recommended) to upload SQL data to Amazon S3. This is the fastest approach if you have lots of data to upload.  In this approach we first create CSV files from SQL Server data on local disk using <a href="https://zappysys.com/products/ssis-powerpack/ssis-export-csv-file-task/" target="_blank" rel="noopener">SSIS Export CSV Task</a>. After that in second step we upload all files to Amazon S3 using <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-task/" target="_blank" rel="noopener">SSIS Amazon Storage Task</a>.</p>
<h3>Step-1: Configure Source Connection in Export CSV Task</h3>
<p>To extract data from SQL Server you can use Export CSV Task. It has many options which makes it possible to split large amount of data into multiple files. You can specify single table or multiple tables as your data source.</p>
<p>For multiple table use vertical bar. e.g.  dbo.Customers|dbo.Products|dbo.Orders. When you export this it will create 3 files ( dbo.Customers.csv , dbo.Products.csv, dbo.Orders.csv )</p>
<p><strong>Steps:</strong></p>
<ol>
<li>Drag ZS Export CSV Task from Toolbox</li>
<li>Double click task to configure</li>
<li>From connection drop down select New connection option (OLEDB or ADO.net)</li>
<li>Once connection is configured for Source database specify SQL Query to extract data as below
<div id="attachment_705" style="width: 528px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/07/export-sql-server-table-query-data-to-csv-fast.png"><img decoding="async" aria-describedby="caption-attachment-705" class="size-full wp-image-705" src="//zappysys.com/blog/wp-content/uploads/2016/07/export-sql-server-table-query-data-to-csv-fast.png" alt="Export SQL Server Table or Query as CSV file (Bulk export in SSIS)" width="518" height="494" srcset="https://zappysys.com/blog/wp-content/uploads/2016/07/export-sql-server-table-query-data-to-csv-fast.png 518w, https://zappysys.com/blog/wp-content/uploads/2016/07/export-sql-server-table-query-data-to-csv-fast-300x286.png 300w" sizes="(max-width: 518px) 100vw, 518px" /></a><p id="caption-attachment-705" class="wp-caption-text">Export SQL Server Table or Query as CSV file (Bulk export in SSIS)</p></div></li>
<li>Now go to target tab. Here you can specify full path for file. e.g. c:\ssis\temp\s3dump\cust.csv</li>
</ol>
<h3>Step-2: Compress CSV Files in SSIS ( GZIP format &#8211; *.gz )</h3>
<p>Above steps will export file as CSV format without splitting or compression. But to compress file once exported you can go to Target tab of Export CSV Task and check [<strong>Compress file to *.gz format</strong>] option.</p>
<div id="attachment_706" style="width: 579px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/07/compress-csv-files-in-ssis.png"><img decoding="async" aria-describedby="caption-attachment-706" class="size-full wp-image-706" src="//zappysys.com/blog/wp-content/uploads/2016/07/compress-csv-files-in-ssis.png" alt="Compress exported SQL Server data files to GZip ( *.gz) in SSIS Export CSV Task" width="569" height="462" srcset="https://zappysys.com/blog/wp-content/uploads/2016/07/compress-csv-files-in-ssis.png 569w, https://zappysys.com/blog/wp-content/uploads/2016/07/compress-csv-files-in-ssis-300x244.png 300w" sizes="(max-width: 569px) 100vw, 569px" /></a><p id="caption-attachment-706" class="wp-caption-text">Compress exported SQL Server data files to GZip ( *.gz) in SSIS Export CSV Task</p></div>
<h3>Step-3: Split CSV files by row count or data size in SSIS</h3>
<p>Now lets look at how to split exported CSV files into multiple files so we can upload many files in parallel. Goto Split Options and check [<strong>Enable Split by Size/Rows</strong>]
<div id="attachment_708" style="width: 435px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/07/ssis-export-split-csv-files-sql-data.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-708" class="size-full wp-image-708" src="//zappysys.com/blog/wp-content/uploads/2016/07/ssis-export-split-csv-files-sql-data.png" alt="Using SSIS Split Exported CSV files (Split by row count or size)" width="425" height="489" srcset="https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-export-split-csv-files-sql-data.png 425w, https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-export-split-csv-files-sql-data-261x300.png 261w" sizes="(max-width: 425px) 100vw, 425px" /></a><p id="caption-attachment-708" class="wp-caption-text">Using SSIS Split Exported CSV files (Split by row count or size)</p></div>
<h3>Step-4: Upload CSV files to Amazon S3 &#8211; Using multi threaded option</h3>
<p>Now final thing is use <a href="//zappysys.com/products/ssis-powerpack/ssis-amazon-s3-task/" target="_blank" rel="noopener">Amzon S3 Task</a> to upload files to S3.</p>
<h3>Things to remember</h3>
<p>Sometimes times due to high network activity you may get timeout errors during upload. In that case you can adjust few settings <a href="https://zappysys.com/forums/topic/change-timeout-value-amazon-s3-operations/" target="_blank" rel="noopener">described here</a>. Also try to reduce total parallel threads on S3 Connection see that helps.</p>
<p><strong>Steps:</strong></p>
<ol>
<li>Drag ZS Amazon Storage Task from SSIS toolbox</li>
<li>Double click Amazon Storage Task to configure it</li>
<li>Specify Action = UploadFilesToAmazon</li>
<li>Specify Source file path (or pattern) e.g. c:\SSIS\temp\s3dump\*.*</li>
<li>Now in the Target connection dropdown click [New]</li>
<li>When Connection UI opens select Service Type = S3</li>
<li>Enter your Access Key, Secret Key and Region (Leave all other parameters default if you not sure)</li>
<li>Click Test and close connection UI</li>
<li>On the Target path on S3 Storage Task enter your bucket and folder path where you want to upload local files. For example your bucket name is bw-east-1 and folder is sqldata then enter as below<br />
<strong>bw-east-1/sqldata/</strong></li>
<li>Click ok and Run package to test full package</li>
</ol>
<div id="attachment_709" style="width: 709px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/07/ssis-uploading-files-to-amazon-s3.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-709" class="wp-image-709" src="//zappysys.com/blog/wp-content/uploads/2016/07/ssis-uploading-files-to-amazon-s3.png" alt="Upload local files to Amazon S3 using SSIS AWS Storage Task" width="699" height="466" srcset="https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-uploading-files-to-amazon-s3.png 953w, https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-uploading-files-to-amazon-s3-300x200.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-uploading-files-to-amazon-s3-272x182.png 272w" sizes="(max-width: 699px) 100vw, 699px" /></a><p id="caption-attachment-709" class="wp-caption-text">Upload local files to Amazon S3 using SSIS AWS Storage Task</p></div>
<h2></h2>
<h2>Method-2 : Upload SQL data to Amazon S3 without local stage (One step)</h2>
<p>Now let&#8217;s change previous approach little bit to send SQL server data directly to Amazon S3 without any Landing area on local disk.  <a href="//zappysys.com/products/ssis-powerpack/ssis-export-csv-file-task/" target="_blank" rel="noopener">Export CSV Task</a> , <a href="//zappysys.com/products/ssis-powerpack/ssis-export-json-file-task/" target="_blank" rel="noopener">Export JSON Task</a>  and <a href="//zappysys.com/products/ssis-powerpack/ssis-export-xml-file-task/" target="_blank" rel="noopener">Export XML Task</a> all of them supports Amazon S3 / Azure Blob and Secure FTP (SFTP) connection as target (Only available in <strong>Pro Edition</strong>). We will use this feature in following section.</p>
<p>This approach helps to avoid any local disk need and it may be useful for security reason for some users. However drawback of this approach is, it wont use parallel threads to upload large amount of data like previous method.</p>
<p>Following change will be needed on Export task to upload SQL data directly to S3 / FTP or Azure storage.</p>
<div id="attachment_5252" style="width: 859px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-export-sql-data-to-s3-csv-compress-gzip.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5252" class="size-full wp-image-5252" src="https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-export-sql-data-to-s3-csv-compress-gzip.png" alt="Export SQL data to multiple files to Amazon S3, Azure, Secure FTP (SFTP) in Stream Mode. Compress GZip, Overwrite, Split Options" width="849" height="627" srcset="https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-export-sql-data-to-s3-csv-compress-gzip.png 849w, https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-export-sql-data-to-s3-csv-compress-gzip-300x222.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-export-sql-data-to-s3-csv-compress-gzip-768x567.png 768w" sizes="(max-width: 849px) 100vw, 849px" /></a><p id="caption-attachment-5252" class="wp-caption-text">Export SQL data to multiple files to Amazon S3, Azure, Secure FTP (SFTP) in Stream Mode using SSIS. Configure Compress GZip, Overwrite, Split Options</p></div>
<h2>Method-3 : Using Amazon S3 destination &#8211; Generate Amazon S3 file from any source</h2>
<p>Now let&#8217;s look at third approach to save data from any SSIS Source to Amazon S3 file. Advantage of this approach is you are not limited to few source options provided by Export CSV Task. If you have complex data transformation needed in Data Flow before sending data to S3 then use this approach.  We will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-csv-file-destination/" target="_blank" rel="noopener">Amazon S3 Destination for CSV</a> as below</p>
<ol>
<li>Drag SSIS Data flow task from toolbox</li>
<li>Create necessary source connection (e.g. OLEDB connection)</li>
<li>Create Amazon S3 Connection (Right click in Connection Managers panel in bottom and click New connection and select <strong>ZS-AMAZON-STORAGE</strong> type )</li>
<li>Once connection managers are created Go to data flow designer and Drag OLEDB Source</li>
<li>Configure OLEDB Source to read desired data from source system (e.g. SQL Server / Oracle)</li>
<li>Once source is configured drag <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-csv-file-destination/" target="_blank" rel="noopener">ZS Amazon S3 CSV File Destination</a> from SSIS toolbox</li>
<li>Double click S3 Destination and configure as below
<ol>
<li>On Connection Managers tab select S3 Connection (We created in earlier section).</li>
<li>Properties tab configure like below screenshot</li>
<li>On Input Columns tab select desired column you like to write in the target file. Your name from upstream will be taken as is for target file. So make sure to name upstream columns correctly.</li>
<li>Click OK to save UI</li>
</ol>
</li>
<li>Execute package and check your S3 Bucket to see files got created.</li>
</ol>
<div id="attachment_5253" style="width: 729px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-amazon-s3-csv-destination-split-compress-gzip-options.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5253" class="size-full wp-image-5253" src="https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-amazon-s3-csv-destination-split-compress-gzip-options.png" alt="Loading SQL Server data into S3 Bucket Files (Split, Compress Gzip Options) - SSIS Amazon S3 CSV File Destination" width="719" height="782" srcset="https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-amazon-s3-csv-destination-split-compress-gzip-options.png 719w, https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-amazon-s3-csv-destination-split-compress-gzip-options-276x300.png 276w" sizes="(max-width: 719px) 100vw, 719px" /></a><p id="caption-attachment-5253" class="wp-caption-text">Loading SQL Server data into S3 Bucket Files (Split, Compress Gzip Options) &#8211; SSIS Amazon S3 CSV File Destination</p></div>
<h2>Conclusion</h2>
<p>In this post you have seen how easy it is to upload / archive your SQL Server data (or any other RDBMS data) to Amazon S3 Storage in few clicks. <a href="//zappysys.com/products/ssis-powerpack/">Try SSIS PowerPack</a> for free and find out yourself how easy it is to integrate SQL Server and Amazon S3 using SSIS.</p>
<p>The post <a href="https://zappysys.com/blog/load-data-sql-server-to-amazon-s3/">Loading data from SQL Server to Amazon S3 in SSIS (Split Files, GZip)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
