<?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>json.xml Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/json-xml/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/json-xml/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 11 Sep 2019 11:13:09 +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>json.xml Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/json-xml/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>SSIS Data Load – SQL Server to FTP/SFTP (Split Files, GZip)</title>
		<link>https://zappysys.com/blog/ssis-data-load-sql-server-ftp-sftp-split-files-gzip/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 13 Apr 2019 05:29:48 +0000</pubDate>
				<category><![CDATA[SSIS CSV Export Task]]></category>
		<category><![CDATA[SSIS Excel Export Task]]></category>
		<category><![CDATA[SSIS JSON Export Task]]></category>
		<category><![CDATA[SSIS SFTP / FTP Connection]]></category>
		<category><![CDATA[SSIS SFTP Task]]></category>
		<category><![CDATA[SSIS XML Export Task]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[ftps]]></category>
		<category><![CDATA[json.xml]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6761</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 FTP/SFTP. SSIS Data Load – SQL Server to FTP/SFTP (Split Files, GZip). For demo purpose we will use SQL Server as relational source but you can use same steps for any database engine [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-data-load-sql-server-ftp-sftp-split-files-gzip/">SSIS Data Load – SQL Server to FTP/SFTP (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><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis-sftp-ftp-ftps-task.png" target="_blank" rel="noopener"><img decoding="async" class="wp-image-3058 size-full alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/03/ssis-sftp-ftp-ftps-task.png" alt="" width="100" height="100" /></a>In this blog post you will see how easy it is to load large amount of data from SQL Server to FTP/SFTP. SSIS Data Load – SQL Server to FTP/SFTP (Split Files, GZip).</p>
<p>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="https://zappysys.com/products/ssis-powerpack/ssis-export-csv-file-task/" target="_blank" rel="noopener">Export CSV Task</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-sftp-task-ftp-ftps/" target="_blank" rel="noopener">ZS Secure FTP Task (SFTP, FTP, FTPS)</a> to achieve desired integration with FTP/SFTP/FTPS with drag and drop approach. You can also export data to JSON or XML or Excel file to FTP/SFTP/FTPS using same techniques (Use <a href="https://zappysys.com/products/ssis-powerpack/ssis-export-json-file-task/" target="_blank" rel="noopener">Export JSON Task</a>  or <a href="https://zappysys.com/products/ssis-powerpack/ssis-export-xml-file-task/" target="_blank" rel="noopener">Export XML Task</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-export-excel-file-task/" target="_blank" rel="noopener">Export Excel 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</li>
<li>Split CSV files by row count</li>
<li>Upload data to FTP/SFTP/FTPS using highly parallel manner for maximum speed</li>
</ul>
<p>There are three different ways you can achieve data export to Secure FTP 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="https://zappysys.com/products/ssis-powerpack/ssis-export-csv-file-task/" target="_blank" rel="noopener">Export Task</a> and then upload files to Secure FTP using  <a href="https://zappysys.com/products/ssis-powerpack/ssis-sftp-task-ftp-ftps/" target="_blank" rel="noopener">ZS Secure FTP Task (SFTP, FTP, FTPS)</a> )</li>
<li><strong>Method-2 (Slower)</strong>: Use <a href="https://zappysys.com/products/ssis-powerpack/ssis-export-csv-file-task/" target="_blank" rel="noopener">Export Task</a> with Secure FTP 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-secure-ftp-csv-file-destination/" target="_blank" rel="noopener">Secure FTP CSV File Destination</a>  (for JSON / XML / EXCEL   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’t have JSON/ XML / EXCEL Destination for Secure FTP yet – we may add in future)</p>
<p><strong>Screenshot of SSIS Package</strong></p>
<div id="attachment_707" style="width: 835px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2016/07/ssis-export-sql-server-data-upload-to-amazon-s3.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-707" class="size-full wp-image-707" src="https://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 compress/upload files to Amazon S3 (AWS Cloud)" width="825" height="430" 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: 825px) 100vw, 825px" /></a><p id="caption-attachment-707" class="wp-caption-text">Extract SQL Server Data to CSV files in SSIS (Bulk export) Split / GZip Compress / upload files to FTP/SFTP/FTPS</p></div>
<h2><span id="Method-1_Upload_SQL_data_to_Azure_Blob_in_Two_steps">Method-1 : Upload SQL data to Secure FTP in Two steps</span></h2>
<p>In this section we will see first method (recommended) to upload SQL data to Secure FTP. 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 Secure FTP Storage using <a href="https://zappysys.com/products/ssis-powerpack/ssis-sftp-task-ftp-ftps/" target="_blank" rel="noopener">ZS Secure FTP Task (SFTP, FTP, FTPS)</a>.</p>
<h3><span id="Step-1_Configure_Source_Connection_in_Export_CSV_Task">Step-1: Configure Source Connection in Export CSV Task</span></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 aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2016/07/export-sql-server-table-query-data-to-csv-fast.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-705" class="size-full wp-image-705" src="https://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\cust.csv</li>
</ol>
<h3><span id="Step-2_Compress_CSV_Files_in_SSIS_GZIP_format_8211_gz">Step-2: Compress CSV Files in SSIS ( GZIP format – *.gz )</span></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 aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2016/07/compress-csv-files-in-ssis.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-706" class="size-full wp-image-706" src="https://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><span id="Step-3_Split_CSV_files_by_row_count_or_data_size_in_SSIS">Step-3: Split CSV files by row count or data size in SSIS</span></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 aligncenter"><a href="https://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="https://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><span id="Step-4_Upload_CSV_files_to_Azure_Blob_8211_Using_multi_threaded_option">Step-4: Upload CSV files to Secure FTP – Using multi threaded option</span></h3>
<p>Now final thing is use <a href="https://zappysys.com/products/ssis-powerpack/ssis-sftp-task-ftp-ftps/" target="_blank" rel="noopener">ZS Secure FTP Task (SFTP, FTP, FTPS)</a> to upload files to Secure FTP.</p>
<p><strong>Steps:</strong></p>
<ol>
<li>Drag ZS Secure FTP Task (SFTP, FTP, FTPS) from SSIS toolbox</li>
<li>Double click ZS Secure FTP Task (SFTP, FTP, FTPS) to configure it</li>
<li>Specify Action = Upload Files To FTP Server</li>
<li>Specify Source file path (or pattern) e.g. c:\SSIS\temp\*.*</li>
<li>Now in the Target connection dropdown click [New]</li>
<li>When Connection UI opens Enter your Account, Secret Key (Leave all other parameters default if you not sure)</li>
<li>Click Test and close connection UI</li>
<li>On the Target path on ZS Secure FTP Task (SFTP, FTP, FTPS) enter your bucket and folder path where you want to upload local files. (For example: <strong>/datafolder/sqldata/)</strong></li>
<li>Click ok and Run package to test full package</li>
</ol>
<h2><span id="Method-2_Upload_SQL_data_to_Azure_Blob_without_local_stage_One_step">Method-2 : Upload SQL data to Secure FTP without local stage (One step)</span></h2>
<p>Now let’s change previous approach little bit to send SQL server data directly to FTP/SFTP/FTPS without any Landing area on local disk.  <a href="https://zappysys.com/products/ssis-powerpack/ssis-export-csv-file-task/" target="_blank" rel="noopener">Export CSV Task</a> , <a href="https://zappysys.com/products/ssis-powerpack/ssis-export-json-file-task/" target="_blank" rel="noopener">Export JSON Task</a> , <a href="https://zappysys.com/products/ssis-powerpack/ssis-export-excel-file-task/" target="_blank" rel="noopener">Export Excel Task</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-export-xml-file-task/" target="_blank" rel="noopener">Export XML Task</a> all of them supports Azure Blob / Amazon S3 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 Azure / FTP or Amazon storage.</p>
<div id="attachment_5252" style="width: 859px" class="wp-caption aligncenter"><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 Blob, Secure FTP (SFTP) in Stream Mode. Compress GZip, Overwrite, Split Options</p></div>
<h2><span id="Method-3_Using_Azure_Blob_destination_8211_Generate_Azure_Blob_file_from_any_source">Method-3 : Using Secure FTP CSV File Destination – Generate Secure FTP file from any source</span></h2>
<p>Now let’s look at third approach to save data from any SSIS Source to FTP/SFTP/FTPS 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 FTP/SFTP/FTPS then use this approach.  We will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-secure-ftp-csv-file-destination/" target="_blank" rel="noopener">Secure FTP CSV File Destination</a> as below</p>
<ol>
<li>Drag SSIS Data flow task from toolbox<a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-7934" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a></li>
<li>Create necessary source connection (e.g. OLEDB connection)</li>
<li>Create Secure FTP Connection (Right click in Connection Managers panel in bottom and click New connection and select <strong>ZS-SFTP</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-secure-ftp-csv-file-destination/" target="_blank" rel="noopener">ZS Secure FTP CSV File Destination</a> from SSIS toolbox</li>
<li>Double click Secure FTP CSV File Destination and configure as below
<ol>
<li>On Connection Managers tab select Secure FTP 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 Secure FTP to see files got created.
<div id="attachment_5253" style="width: 729px" class="wp-caption aligncenter"><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 Secure FTP Files (Split, Compress Gzip Options) &#8211; SSIS Secure Ftp CSV File Destination</p></div></li>
</ol>
<h2><span id="Conclusion">Conclusion</span></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 FTP/SFTP/FTPS in few clicks. <a href="https://zappysys.com/products/ssis-powerpack/">Try SSIS PowerPack</a> for free and find out yourself how easy it is to integrate SQL Server and Secure FTP using SSIS.</p>
<p>The post <a href="https://zappysys.com/blog/ssis-data-load-sql-server-ftp-sftp-split-files-gzip/">SSIS Data Load – SQL Server to FTP/SFTP (Split Files, GZip)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
