<?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>query Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/query/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/query/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Tue, 01 Oct 2019 11:22:30 +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>query Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/query/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<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 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 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 PostgreSQL in SSIS</title>
		<link>https://zappysys.com/blog/execute-sql-query-against-postgresql-in-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 08 Aug 2019 14:20:27 +0000</pubDate>
				<category><![CDATA[SSIS PostgreSQL ExecuteSQL Task]]></category>
		<category><![CDATA[Command]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[ExecuteSQL]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[Task]]></category>
		<category><![CDATA[ZappySys]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7654</guid>

					<description><![CDATA[<p>Introduction ZappySys provides high-performance drag and drop connectors for PostgreSQL Integration. In this post you will see how to Execute SQL query against PostgreSQL in SSIS, in various SQL commands such as SELECT, INSERT, DROP, COPY, CREATE, etc using PostgreSQL Execute SQL Task can be used to execute DDL and DML statements for PostgreSQL without needing any [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/execute-sql-query-against-postgresql-in-ssis/">Execute SQL query against PostgreSQL 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/postgresql-logo.png"><img loading="lazy" decoding="async" class="size-thumbnail wp-image-7656 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/08/postgresql-logo-150x150.png" alt="" width="150" height="150" /></a></p>
<p>ZappySys provides high-performance drag and drop connectors for PostgreSQL Integration. In this post you will see how to Execute SQL query against PostgreSQL in SSIS, in various SQL commands such as SELECT, INSERT, DROP, COPY, CREATE, etc using PostgreSQL Execute SQL Task can be used to execute DDL and DML statements for PostgreSQL without needing any extra driver. PostgreSQL is a powerful, open-source relational database with a strong reputation for reliability, feature robustness, and performance.</p>
<p>In nutshell, this post will focus on how to Execute SQL query against PostgreSQL in just a few clicks.</p>
<h2><span id="Prerequisite">Prerequisite</span></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 PostgreSQL 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 Mentioned in this article</h2>
<div class="su-table su-table-alternate">
<table style="height: 44px;width: 307px">
<tbody>
<tr style="height: 22px">
<td style="height: 22px;width: 1px"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/postgresql-executesql-task/ssis-postgresql-executesql-task.png"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/postgresql-executesql-task/ssis-postgresql-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-postgresql-executesql-task/" target="_blank" rel="noopener">PostgreSQL Execute SQL Task</a></td>
</tr>
</tbody>
</table>
</div>
<h2><span id="What_is_PostgreSQL">What is PostgreSQL?</span></h2>
<p>PostgreSQL is a powerful, open source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale the most complicated data workloads. The origins of PostgreSQL date back to 1986 as part of the <a href="https://www.postgresql.org/docs/current/history.html" target="_blank" rel="noopener">POSTGRES</a> project at the University of California at Berkeley and has more than 30 years of active development on the core platform.</p>
<p>PostgreSQL has earned a strong reputation for its proven architecture, reliability, data integrity, robust feature set, extensibility, and the dedication of the open source community behind the software to consistently deliver performant and innovative solutions. PostgreSQL runs on <a href="https://www.postgresql.org/download/" target="_blank" rel="noopener">all major operating systems</a>, has been <a href="https://en.wikipedia.org/wiki/ACID" target="_blank" rel="noopener">ACID</a>-compliant since 2001, and has powerful add-ons such as the popular <a href="https://postgis.net/" target="_blank" rel="noopener">PostGIS</a> geospatial database extender. It is no surprise that PostgreSQL has become the open source relational database of choice for many people and organisations.</p>
<p><a href="https://www.postgresql.org/docs/current/tutorial.html" target="_blank" rel="noopener">Getting started</a> with using PostgreSQL has never been easier – pick a project you want to build, and let PostgreSQL safely and robustly store your data.</p>
<h3><span id="Download_and_Install_PostgreSQL">Download and Install PostgreSQL</span></h3>
<p>Please go to below download link and download the Windows version Binary package and install it and follow the steps from the installer.</p>
<p><a href="https://www.postgresql.org/download/" target="_blank" rel="noopener">https://www.postgresql.org/download/</a></p>
<div id="attachment_6774" style="width: 530px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-download-e1555505700480.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6774" class="wp-image-6774 size-post-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-download-e1555505700480-520x380.png" alt="Download PostgreSQL" width="520" height="380" /></a><p id="caption-attachment-6774" class="wp-caption-text">Download PostgreSQL</p></div>
<h3><span id="Create_PostgreSQL_Database_and_Table">Create a PostgreSQL Database</span></h3>
<ol>
<li>To do this, go to Start Menu and search for pgAdmin and we will first open the pgAdmin Panel.
<div id="attachment_6776" style="width: 434px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-open-pgadmin.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6776" class="wp-image-6776 size-vantage-slide" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-open-pgadmin-424x480.png" alt="Open pgAdmin from Start Menu" width="424" height="480" /></a><p id="caption-attachment-6776" class="wp-caption-text">Open pgAdmin from Start Menu</p></div></li>
<li>It will open the pgAdmin Panel in the system default browser. Select Server and Right-click on Databases to create a database.
<div id="attachment_6777" style="width: 555px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-select-createdatabase.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6777" class="wp-image-6777 size-post-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-select-createdatabase-545x380.png" alt="PostgreSQL Create Database" width="545" height="380" /></a><p id="caption-attachment-6777" class="wp-caption-text">PostgreSQL Create Database</p></div></li>
<li>Now, Enter the Database name and click on Save to create it.
<div id="attachment_6778" style="width: 727px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-create-database.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6778" class="wp-image-6778 size-post-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-create-database-717x380.png" alt="Create PostgreSQL Database" width="717" height="380" /></a><p id="caption-attachment-6778" class="wp-caption-text">Create a PostgreSQL Database</p></div></li>
</ol>
<h2>Getting Started</h2>
<p>In order to start, we will show several examples. ZappySys includes an SSIS <a href="https://zappysys.com/products/ssis-powerpack/ssis-postgresql-executesql-task/" target="_blank" rel="noopener">PostgreSQL ExecuteSQL Task</a> that will help you how to Create and Drop table by Execute SQL query against PostgreSQL in SSIS. ZS PostgreSQL ExecuteSQL Task support execute queries against PostgreSQL without ODBC driver, load query at runtime from variable, file or Direct value, 100% Managed code means its 32bit and 64bit compatible, you can issue COPY, UNLOAD commands very easily, Support for SQL Server 2017, 2016, 2014, 2012, 2008 (32/64 bit) and <a href="https://zappysys.com/blog/tag/postgresql/" target="_blank" rel="noopener">Click here</a> to see articles related to PostgreSQL.</p>
<p>You can connect to your PostgreSQL database by entering your PostgreSQL credentials.</p>
<h2>Execute SQL query against PostgreSQL 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 PostgreSQL server using ZS PostgreSQL ExecuteSQL Task.</p>
<ol>
<li>In order to connect to the PostgreSQL Database from SSIS, you will need Credentials. Ask your SysAdmin or responsible person to provide that to you.</li>
<li>Once you finished the above steps, Open Visual Studio and Create New SSIS Package Project.</li>
<li>In Visual Studio, drag and drop the ZS PostgreSQL ExecuteSql Task in the design surface.
<div style="width: 550px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/postgreSQL-executeSql-task/ssis-drag-drop-executesql-task-postgresql.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/postgreSQL-executeSql-task/ssis-drag-drop-executesql-task-postgresql.png" alt="SSIS ZS PostgreSQL ExecuteSQL Task - Drag and Drop" width="540" height="103" /></a><p class="wp-caption-text">SSIS ZS PostgreSQL ExecuteSQL Task &#8211; Drag and Drop</p></div></li>
<li>We need a PostgreSQL Database connection. Click <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-postgresql-connection-manager.htm" target="_blank" rel="noopener">here</a> to create a connection.</li>
<li>Now, double click on ZS PostgreSQL ExecuteSql Task to configure it.</li>
<li>In the PostgreSQL ExecuteSql Task, add the following SQL code to DROP a table if it exists and CREATE a table named pg_equipment in the SQL Statement section.<br />
You can replace the table name from the following code.<br />
<pre class="crayon-plain-tag">DROP TABLE IF EXISTS playground_equip;
CREATE TABLE pg_equipment (
	equip_id serial PRIMARY KEY,
	type varchar (50) NOT NULL,
	color varchar (25) NOT NULL,
	location varchar(25) check (location in ('north', 'south', 'west', 'east', 'northeast', 'southeast', 'southwest', 'northwest')),
	install_date date
);</pre>
<div style="width: 778px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/postgreSQL-executeSql-task/ssis-sql-statement-postgresql.png" alt="SSIS ZS PostgreSQL ExecuteSQL Task - Configure" width="768" height="600" /><p class="wp-caption-text">SSIS ZS PostgreSQL ExecuteSQL Task &#8211; Configure</p></div></li>
<li>In the above step, you can Select Variable as Sql Source Type.</li>
<li>Click OK to save ZS PostgreSQL ExecuteSql Task UI settings.</li>
<li>Finally, Right Click on Task and Select Execute Task to run it.</li>
</ol>
<h2>Conclusion</h2>
<p>After all, In this blog, we learned Execute SQL query against PostgreSQL in SSIS using ZS PostgreSQL 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://www.postgresql.org/about/" target="_blank" rel="noopener">About PostgreSQL</a></li>
<li><a href="https://www.postgresql.org/docs/" target="_blank" rel="noopener">PostgreSQL Documentation</a></li>
<li><a href="https://www.tutorialspoint.com/postgresql" target="_blank" rel="noopener">PostgreSQL Query</a></li>
<li><strong>Help File: </strong><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-postgresql-executesql-task.htm" target="_blank" rel="noopener">PostgreSQL ExecuteSQL Task</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/execute-sql-query-against-postgresql-in-ssis/">Execute SQL query against PostgreSQL in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read and write data to HTML in SSIS</title>
		<link>https://zappysys.com/blog/read-and-write-data-to-html-in-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Tue, 22 May 2018 22:16:51 +0000</pubDate>
				<category><![CDATA[SSIS Advanced File System Task]]></category>
		<category><![CDATA[SSIS HTML Table Source]]></category>
		<category><![CDATA[SSIS Logging Task]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[result]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[variable]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=3584</guid>

					<description><![CDATA[<p>Introduction to read and write data to HTML in SSIS In this article, we will show how to send values from an SSIS Variable to an HTML file. We will use the SSIS Advanced File System Task to store the list of system files of a folder into a variable and then we will use [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-and-write-data-to-html-in-ssis/">How to read and write data to HTML in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction to read and write data to HTML in SSIS</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/2000px-HTML5_logo_and_wordmark.svg_.png"><img loading="lazy" decoding="async" class="alignleft wp-image-3618 size-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2018/05/2000px-HTML5_logo_and_wordmark.svg_-150x150.png" alt="HTML icon" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/2000px-HTML5_logo_and_wordmark.svg_-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/05/2000px-HTML5_logo_and_wordmark.svg_-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/2000px-HTML5_logo_and_wordmark.svg_-768x768.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/05/2000px-HTML5_logo_and_wordmark.svg_-1024x1024.png 1024w, https://zappysys.com/blog/wp-content/uploads/2018/05/2000px-HTML5_logo_and_wordmark.svg_.png 2000w" sizes="(max-width: 150px) 100vw, 150px" /></a>In this article, we will show how to send values from an SSIS Variable to an HTML file. We will use the <a href="https://zappysys.com/products/ssis-powerpack/ssis-file-system-task-advanced/">SSIS Advanced File System Task </a> to store the list of system files of a folder into a variable and then we will use the <a href="https://zappysys.com/products/ssis-powerpack/ssis-logging-task-free/">SSIS Logging Task</a> to store the variable in an HTML file.</p>
<p>In the second part, we will read values from an HTML table and export the data into SQL Server. We will use the HTML file created in the first example. We will also use the <a href="https://zappysys.com/products/ssis-powerpack/ssis-html-table-source/">ZS HTML Table Source</a> to read the data from the HTML table and export to SQL Server using the OLEDB Destination.</p>
<p>We will be using this <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> component to make things work:<br />
<div class="su-table su-table-alternate">
<table width="300">
<tbody>
<tr style="line-height: 0px">
<td width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-logging-task-free/" target="_blank" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/ssis-logging-task.png" alt="SSIS Logging Task" width="50" height="50" /></a></td>
<td style="vertical-align: middle"><a href="https://zappysys.com/products/ssis-powerpack/ssis-logging-task-free/" target="_blank" rel="noopener">SSIS Logging Task (Free)</a></td>
</tr>
<tr style="line-height: 0px">
<td style="height: 58px" width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-html-table-source/" target="_blank" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/ssis-html-table-source.png" alt="SSIS HTML Table Source" width="50" height="50" /></a></td>
<td style="vertical-align: middle;height: 58px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-html-table-source/" target="_blank" rel="noopener">SSIS HTML Table Source</a></td>
</tr>
<tr style="line-height: 0px">
<td style="height: 58px" width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-file-system-task-advanced/" target="_blank" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/ssis-file-system-task-advanced.png" alt="Advanced SSIS File System Task " width="50" height="50" /></a></td>
<td style="vertical-align: middle;height: 58px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-file-system-task-advanced/" target="_blank" rel="noopener">Advanced SSIS File System Task<br />
</a></td>
</tr>
</tbody>
</table>
</div>
<p>Finally, we will show how to read data from a SQL Server query and store into an HTML file. We will use the Execute SQL Task combined with the <a href="https://zappysys.com/products/ssis-powerpack/ssis-logging-task-free/">ZS SSIS Logging Task</a>.</p>
<h2 style="text-align: left">Requirements</h2>
<ol>
<li>First, you will need SSDT installed.</li>
<li>Secondly, <a href="https://zappysys.com/products/ssis-powerpack/">ZappySys PowerPack for SSIS.</a></li>
<li>Finally, SQL Server installed.</li>
</ol>
<h2>Getting started</h2>
<h3>How to save the list of system files into SQL an HTML table</h3>
<p>In the first example, we will use our ZappySys Advanced File System to copy a list of the system files in a folder. This list of files will be stored in an object variable and then we will save to a file.</p>
<ol>
<li>In the first place, we will use the Advanced File System Task and select the Get file list ADO.net DataTable action. We will list the files of the c:\sql folder and save the results into a variable:
<div id="attachment_3597" style="width: 693px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/list-of-files.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3597" class="size-full wp-image-3597" src="https://zappysys.com/blog/wp-content/uploads/2018/05/list-of-files.jpg" alt="SSIS list files" width="683" height="633" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/list-of-files.jpg 683w, https://zappysys.com/blog/wp-content/uploads/2018/05/list-of-files-300x278.jpg 300w" sizes="(max-width: 683px) 100vw, 683px" /></a><p id="caption-attachment-3597" class="wp-caption-text">SSIS list files</p></div></li>
<li>In addition, we will create a variable of type object named listfiles that will store the files information:
<div id="attachment_3599" style="width: 492px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-object-data-type.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3599" class="size-full wp-image-3599" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-object-data-type.jpg" alt="SSIS object variable" width="482" height="380" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-object-data-type.jpg 482w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-object-data-type-300x237.jpg 300w" sizes="(max-width: 482px) 100vw, 482px" /></a><p id="caption-attachment-3599" class="wp-caption-text">SSIS object variable</p></div></li>
<li>Also, we will use the ZS Logging Tasks and join with the ZS Advanced File. The ZS Logging Task will be used to store the variable into a file:
<div id="attachment_3600" style="width: 333px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-list-files-folder-save-to-variable.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3600" class="size-full wp-image-3600" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-list-files-folder-save-to-variable.jpg" alt="SSIS object variable" width="323" height="205" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-list-files-folder-save-to-variable.jpg 323w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-list-files-folder-save-to-variable-300x190.jpg 300w" sizes="(max-width: 323px) 100vw, 323px" /></a><p id="caption-attachment-3600" class="wp-caption-text">SSIS save variable to HTML</p></div></li>
<li>In addition, it is possible to send the variable values into the Execution Log (SSIS output), to a file, to a MessageBox:
<div id="attachment_3601" style="width: 635px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-output-variable-to-log-messagebo-file-variable.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3601" class="wp-image-3601 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-output-variable-to-log-messagebo-file-variable.jpg" alt="ssis output variable to log messagebo file variable" width="625" height="504" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-output-variable-to-log-messagebo-file-variable.jpg 625w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-output-variable-to-log-messagebo-file-variable-300x242.jpg 300w" sizes="(max-width: 625px) 100vw, 625px" /></a><p id="caption-attachment-3601" class="wp-caption-text">SSIS output variable to log, message box and file variable to read and write data to HTML in SSIS</p></div></li>
<li>In this example, we will show the values into an HTML file named listfiles.html
<div id="attachment_3626" style="width: 635px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-variable-into-html.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3626" class="size-full wp-image-3626" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-variable-into-html.jpg" alt="ssis save variable into html" width="625" height="504" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-variable-into-html.jpg 625w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-variable-into-html-300x242.jpg 300w" sizes="(max-width: 625px) 100vw, 625px" /></a><p id="caption-attachment-3626" class="wp-caption-text">SSIS save variable iHTMLhtml</p></div></li>
<li>After executing the package, you will be able to see the HTML with a list of files, names, size, modification and creation information:
<div id="attachment_3627" style="width: 1350px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-list-files-1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3627" class="size-full wp-image-3627" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-list-files-1.jpg" alt="SSIS list files" width="1340" height="470" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-list-files-1.jpg 1340w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-list-files-1-300x105.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-list-files-1-768x269.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-list-files-1-1024x359.jpg 1024w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-list-files-1-1080x380.jpg 1080w" sizes="(max-width: 1340px) 100vw, 1340px" /></a><p id="caption-attachment-3627" class="wp-caption-text">ssis list files</p></div></li>
</ol>
<h3>How to copy data from an HTML table to SQL Server</h3>
<p>The next example will save data from a file named listfiles.html created in the previous example with an HTML table. The example will export the table to SQL Server. However, with our HTML Table Source, you can export to any destination.</p>
<ol>
<li>In order to start, we will Drag and drop a data flow task and double click it:
<div id="attachment_3605" style="width: 540px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-data-flow.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3605" class="size-full wp-image-3605" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-data-flow.jpg" alt="ssis data flow" width="530" height="178" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-data-flow.jpg 530w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-data-flow-300x101.jpg 300w" sizes="(max-width: 530px) 100vw, 530px" /></a><p id="caption-attachment-3605" class="wp-caption-text">SSIS data flow</p></div></li>
<li>Next, in the Data Flow task, use the HTML Table Source and join to the OLEDB Destination:
<div id="attachment_3606" style="width: 352px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-html-table-to-oledb.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3606" class="size-full wp-image-3606" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-html-table-to-oledb.jpg" alt="ssis html table to oledb" width="342" height="221" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-html-table-to-oledb.jpg 342w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-html-table-to-oledb-300x194.jpg 300w" sizes="(max-width: 342px) 100vw, 342px" /></a><p id="caption-attachment-3606" class="wp-caption-text">SSIS HTML table SQL server</p></div></li>
<li>Also, in URLs enter the path of the HTML file created in the first example:
<div id="attachment_3607" style="width: 811px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-html-table-read.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3607" class="size-full wp-image-3607" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-html-table-read.jpg" alt="ssis html table read" width="801" height="593" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-html-table-read.jpg 801w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-html-table-read-300x222.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-html-table-read-768x569.jpg 768w" sizes="(max-width: 801px) 100vw, 801px" /></a><p id="caption-attachment-3607" class="wp-caption-text">SSIS HTML table read</p></div></li>
<li>In addition, go to the OLEDB Source, specify the SQL Server name, database, and log in to it.<br />
In the name of table or view press new to create a new table:<br />
<pre class="crayon-plain-tag">CREATE TABLE [dbo.listfiles] (
[_rowNumber] int,
[_groupName] nvarchar(255),
[FullPath] nvarchar(255),
[Name] nvarchar(255),
[Size] int,
[AgeInDays] int,
[LastEditInDays] int,
[LastModifiedDate] datetime,
[CreationDate] datetime,
[LastModifiedDateUtc] datetime,
[CreationDateUtc] datetime,
[Extension] nvarchar(255),
[IsReadOnly] nvarchar(255),
[FolderPath] nvarchar(255)
)</pre>
<div id="attachment_3608" style="width: 834px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-oledb-create-table.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3608" class="size-full wp-image-3608" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-oledb-create-table.jpg" alt="ssis oledb create table" width="824" height="719" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-oledb-create-table.jpg 824w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-oledb-create-table-300x262.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-oledb-create-table-768x670.jpg 768w" sizes="(max-width: 824px) 100vw, 824px" /></a><p id="caption-attachment-3608" class="wp-caption-text">SSIS OLEDB create table</p></div></li>
<li>Also, go to Mappings page to map all the columns.
<div id="attachment_3609" style="width: 834px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-map-columns.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3609" class="size-full wp-image-3609" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-map-columns.jpg" alt="ssis map columns" width="824" height="663" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-map-columns.jpg 824w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-map-columns-300x241.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-map-columns-768x618.jpg 768w" sizes="(max-width: 824px) 100vw, 824px" /></a><p id="caption-attachment-3609" class="wp-caption-text">SSIS map columns</p></div></li>
<li>Finally, run the package and you will have all the data exported.</li>
</ol>
<h3>How to export SQL Server results to an HTML in SSIS</h3>
<p>The following example will show how to export the results of an SQL query into an HTML file.</p>
<ol>
<li>In order to start, we will use the Execute SQL Task. Specify the option Full result set and create an OLEDB connection specifying the Server Name, database name and the select statement to a table:
<div id="attachment_3611" style="width: 747px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sql-results.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3611" class="size-full wp-image-3611" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sql-results.jpg" alt="ssis sql results" width="737" height="631" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sql-results.jpg 737w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sql-results-300x257.jpg 300w" sizes="(max-width: 737px) 100vw, 737px" /></a><p id="caption-attachment-3611" class="wp-caption-text">SSIS SQL query results</p></div></li>
<li>Secondly, go to the Result Set page and in the Result Name, set 0 and in Variable name, create a new variable:
<div id="attachment_3612" style="width: 745px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sql-result-to-variable-1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3612" class="size-full wp-image-3612" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sql-result-to-variable-1.jpg" alt="ssis sql result to variable" width="735" height="228" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sql-result-to-variable-1.jpg 735w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sql-result-to-variable-1-300x93.jpg 300w" sizes="(max-width: 735px) 100vw, 735px" /></a><p id="caption-attachment-3612" class="wp-caption-text">ssis sql result to variable</p></div></li>
<li>Also, create a variable of type object:
<div id="attachment_3613" style="width: 492px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-object-data-type-1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3613" class="size-full wp-image-3613" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-object-data-type-1.jpg" alt="ssis object data type" width="482" height="380" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-object-data-type-1.jpg 482w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-object-data-type-1-300x237.jpg 300w" sizes="(max-width: 482px) 100vw, 482px" /></a><p id="caption-attachment-3613" class="wp-caption-text">SSIS object data type</p></div></li>
<li>Finally, use the ZS Logging Task to save the results in a File. Specify the Log file path and insert the variable:
<div id="attachment_3614" style="width: 635px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-to-html-file.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3614" class="wp-image-3614 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-to-html-file.jpg" alt="ssis save to html file to export data to read and write data to HTML in SSIS" width="625" height="504" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-to-html-file.jpg 625w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-to-html-file-300x242.jpg 300w" sizes="(max-width: 625px) 100vw, 625px" /></a><p id="caption-attachment-3614" class="wp-caption-text">SSIS save to HTML file</p></div></li>
</ol>
<h2>Conclusion about read and write data to HTML in SSIS</h2>
<p>To conclude, in this article, we learned how to export a list of files system properties and names to SQL Server. How to read an HTML table to SQL Server and finally how to export SQL Server results to an HTML in SSIS. There are nice tools to read and write data to HTML in SSIS</p>
<p>If you liked the tools, you can download them <a href="https://zappysys.com/products/ssis-powerpack/download/">HERE.</a></p>
<h2>References</h2>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack ZappySys</a></li>
<li><a href="https://docs.microsoft.com/en-us/sql/integration-services/integration-services-ssis-variables?view=sql-server-2017">Integration Services (SSIS) Variables</a></li>
<li><a href="https://docs.microsoft.com/en-us/sql/integration-services/control-flow/execute-sql-task?view=sql-server-2017">Execute SQL Task</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/read-and-write-data-to-html-in-ssis/">How to read and write data to HTML in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
