<?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 HTML Table Source Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/category/ssis/components/ssis-html-table-source/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/category/ssis/components/ssis-html-table-source/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 19 Dec 2018 16:32:56 +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 HTML Table Source Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/category/ssis/components/ssis-html-table-source/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Read HTML Table in SSIS &#8211; Extract / Download Links / Images</title>
		<link>https://zappysys.com/blog/read-html-table-ssis-extract-download-links-images/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sun, 16 Dec 2018 19:28:17 +0000</pubDate>
				<category><![CDATA[SSIS ForEach Loop Task]]></category>
		<category><![CDATA[SSIS HTML Table Source]]></category>
		<category><![CDATA[SSIS Recordset Destination]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[html]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5601</guid>

					<description><![CDATA[<p>Introduction In this post you will learn how to extract data from web pages using SSIS. In other words, read HTML Table in SSIS, then Loop through extracted links and finally download files. To achieve this scenario we will use SSIS HTML Source and REST API Task. &#160; &#160; Step-By-Step To achieve desired extraction from web pages [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-html-table-ssis-extract-download-links-images/">Read HTML Table in SSIS &#8211; Extract / Download Links / Images</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><img decoding="async" class="alignleft wp-image-5656" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-html-table-source.png" alt="" width="100" height="100" />In this post you will learn how to extract data from web pages using SSIS. In other words, read HTML Table in SSIS, then Loop through extracted links and finally download files. To achieve this scenario we will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-html-table-source/" target="_blank" rel="noopener">SSIS HTML Source</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a>.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>Step-By-Step</h2>
<p>To achieve desired extraction from web pages / download files we have to use few different components. Let&#8217;s get started.</p>
<h3>Read HTML Table from Web Page</h3>
<p>First, let&#8217;s read desired content from web URL using   <a href="https://zappysys.com/products/ssis-powerpack/ssis-html-table-source/" target="_blank" rel="noopener">SSIS HTML Source</a>. This component can read data from URL(s), Local HTML File(s) or Direct HTML String stored in a SSIS variable.</p>
<ol>
<li>Create a new SSIS Project</li>
<li>In the control flow, Right click anywhere in the designer and click Variables option.</li>
<li>Create following 3 variables which we will use later on.<br />
FileList (Object Type)<br />
ZipFileName (String Type)<br />
ZipFileUrl (String Type) &#8211; Default Value must not be blank (Enter anything like  <strong>http://a.com </strong>).</li>
<li>Drag Data Flow Task from SSIS Toolbox to designer</li>
<li>Go to data flow designer by clicking on the data flow task.</li>
<li>Drag and drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-html-table-source/" target="_blank" rel="noopener">ZS HTML Table Source</a> and double click to edit it. Enter the HTML Web Page URL from where you like to read information. For example purpose, we will use below URL. On that page we have a table with files we need to download.<br />
<pre class="crayon-plain-tag">http://www.patentsview.org/download</pre>
<div id="attachment_5605" style="width: 610px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-extract-html-table-from-web-url-get-links-images.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-5605" class="size-full wp-image-5605" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-extract-html-table-from-web-url-get-links-images.png" alt="Configure - SSIS HTML Table Source URL / Other Options" width="600" height="681" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-extract-html-table-from-web-url-get-links-images.png 600w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-extract-html-table-from-web-url-get-links-images-264x300.png 264w" sizes="(max-width: 600px) 100vw, 600px" /></a><p id="caption-attachment-5605" class="wp-caption-text">Configure &#8211; SSIS HTML Table Source URL / Other Options</p></div></li>
<li>Now let&#8217;s go to <strong>Extract Links and Images</strong> tab and check Output Links for each column. This will give us link for Zip File URL which we want to download.
<div id="attachment_5604" style="width: 607px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-html-table-source-extract-links-option.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5604" class="size-full wp-image-5604" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-html-table-source-extract-links-option.png" alt="Configure SSIS HTML Table Source (Extract Text / Images/ Links from Web Pages / URL)" width="597" height="541" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-html-table-source-extract-links-option.png 597w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-html-table-source-extract-links-option-300x272.png 300w" sizes="(max-width: 597px) 100vw, 597px" /></a><p id="caption-attachment-5604" class="wp-caption-text">Configure SSIS HTML Table Source (Extract Text / Images/ Links from Web Pages / URL)</p></div></li>
<li>Click Preview to see data.
<div id="attachment_5608" style="width: 904px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-html-table-source-preview.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5608" class="size-full wp-image-5608" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-html-table-source-preview.png" alt="Preview HTML Table Data" width="894" height="662" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-html-table-source-preview.png 894w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-html-table-source-preview-300x222.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-html-table-source-preview-768x569.png 768w" sizes="(max-width: 894px) 100vw, 894px" /></a><p id="caption-attachment-5608" class="wp-caption-text">Preview HTML Table Data</p></div></li>
<li>Now click on OK to save the UI.</li>
<li>In next section we will configure Recordset Destination</li>
</ol>
<h3>Save Records to SSIS Variable</h3>
<p>Now let&#8217;s look at how to save HTML Table into in memory recordset which we will loop through later on. You can save data directly to relational destination such as SQL Server or Oracle but in our scenario we are extracting links and downloading them one by one.</p>
<ol>
<li>In continuation of previous step, Once done with HTML Table Source configuration, Drag Recordset Destination from Data flow toolbox</li>
<li>Connect HTML Table Source to Recordset Destination</li>
<li>Select Variable to hold recordset (Must be Object Datatype &#8211; in our case we have User::FileList)</li>
<li>Select Input columns you like to use. In our case we will Pick two columns as below (Name and Link).
<div id="attachment_5607" style="width: 468px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-recordset-destination-select-input-columns.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5607" class="size-full wp-image-5607" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-recordset-destination-select-input-columns.png" alt="Select Input Columns for SSIS Recordset Destination" width="458" height="468" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-recordset-destination-select-input-columns.png 458w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-recordset-destination-select-input-columns-294x300.png 294w" sizes="(max-width: 458px) 100vw, 458px" /></a><p id="caption-attachment-5607" class="wp-caption-text">Select Input Columns for SSIS Recordset Destination</p></div></li>
<li>Click OK to save Recordset destination.</li>
<li>In our next step we will look at how to loop through these records.</li>
</ol>
<h3>Loop through records in SSIS</h3>
<p>Once you done with previous step, switch to control flow tab and follow below steps.</p>
<ol>
<li>Drag ForEach Loop Task from SSIS Toolbox.</li>
<li>Connect Data Flow Task to ForEach Loop Task</li>
<li>Double click ForEach Loop task to configure</li>
<li>On the Collection Pane, select Enumerator as Foreach ADO Enumerator as below.
<div id="attachment_5609" style="width: 774px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-foreach-loop-task-download-files.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5609" class="size-full wp-image-5609" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-foreach-loop-task-download-files.png" alt="Configure ForEach Loop Task - Download Files" width="764" height="533" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-foreach-loop-task-download-files.png 764w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-foreach-loop-task-download-files-300x209.png 300w" sizes="(max-width: 764px) 100vw, 764px" /></a><p id="caption-attachment-5609" class="wp-caption-text">Configure ForEach Loop Task &#8211; Download Files</p></div></li>
<li>On the Variable Mappings tab you can map columns you care about. For example in the previous section we selected two input columns for recordset destination. We can map same columns here in same the same order.
<div id="attachment_5610" style="width: 736px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-foreach-loop-task-variable-mappings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5610" class="size-full wp-image-5610" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-foreach-loop-task-variable-mappings.png" alt="SSIS ForEach Loop Task - Variable Mappings" width="726" height="568" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-foreach-loop-task-variable-mappings.png 726w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-foreach-loop-task-variable-mappings-300x235.png 300w" sizes="(max-width: 726px) 100vw, 726px" /></a><p id="caption-attachment-5610" class="wp-caption-text">SSIS ForEach Loop Task &#8211; Variable Mappings</p></div></li>
<li>Click OK to save our settings.</li>
</ol>
<h3>Download File from URL in SSIS</h3>
<p>Now, after Loop configuration we can define what we want to do in each iteration. For example we can simply drag <a href="https://zappysys.com/products/ssis-powerpack/ssis-logging-task-free/" target="_blank" rel="noopener">Logging Task</a> and display Variables we extracted in ForEach Loop Variable Mappings tab. For downloading links we extracted in previous step you can use <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a> as below.</p>
<ol>
<li>Drag <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">ZS REST API Task</a> from SSIS Toolbox and drop inside ForEach Loop.</li>
<li>You can now set Dynamic URL using placeholder  <pre class="crayon-plain-tag">{{User::ZipFileUrl}}</pre></li>
<li>Now one more thing we need to do is define Target path where we will save downloaded file.</li>
<li>Go to, Response Settings Tab, Check Save Response option and Select Save to File.</li>
<li>Also, check Treat Response As Binary
<div id="attachment_5606" style="width: 868px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-download-zip-file-from-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5606" class="size-full wp-image-5606" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-download-zip-file-from-url.png" alt="Configure SSIS REST API Task to download Zip File from URL" width="858" height="642" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-download-zip-file-from-url.png 858w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-download-zip-file-from-url-300x224.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-download-zip-file-from-url-768x575.png 768w" sizes="(max-width: 858px) 100vw, 858px" /></a><p id="caption-attachment-5606" class="wp-caption-text">Configure SSIS REST API Task to download Zip File from URL</p></div></li>
<li>Click OK to save REST API Task.</li>
</ol>
<p>That&#8217;s it. You can now run SSIS Package and see things in action.</p>
<h2>Conclusion</h2>
<p>In this article, we saw how easy it is to extract unstructured from web in few clicks. Using components such as HTML Table SOurce and REST API Task we can read / parse HTML Pages. <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">Download SSIS PowerPack</a> to explore many other options including 70+ tasks / components we have not discussed in this article.</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/read-html-table-ssis-extract-download-links-images/">Read HTML Table in SSIS &#8211; Extract / Download Links / Images</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>
