<?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 Set Variable Transform Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/category/ssis/components/ssis-set-variable-transform/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/category/ssis/components/ssis-set-variable-transform/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 30 Jan 2019 16:31:24 +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 Set Variable Transform Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/category/ssis/components/ssis-set-variable-transform/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to convert Varbinary to Base64 in SSIS</title>
		<link>https://zappysys.com/blog/convert-varbinary-base64-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 30 Jan 2019 00:38:10 +0000</pubDate>
				<category><![CDATA[SSIS Set Variable Transform]]></category>
		<category><![CDATA[SSIS Template Transform]]></category>
		<category><![CDATA[SSIS Trash Destination]]></category>
		<category><![CDATA[base64]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6255</guid>

					<description><![CDATA[<p>Introduction In this post we will show you how to convert varbinary to Base64 in SSIS. We will use FREE Tasks provided by ZappySys. Preparing Sample Data First let&#8217;s create a sample table with some Varbinary datatype. Run following command in SSMS to create a sample table with one sample row. [crayon-69d4a65d68dd1181712653/] &#160; Method 1 [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/convert-varbinary-base64-ssis/">How to convert Varbinary to Base64 in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this post we will show you how to convert varbinary to Base64 in SSIS. We will use <a href="https://zappysys.com/free-ssis-transformations-components-tasks/">FREE Tasks</a> provided by ZappySys.</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>Preparing Sample Data</h2>
<p>First let&#8217;s create a sample table with some Varbinary datatype. Run following command in SSMS to create a sample table with one sample row.</p><pre class="crayon-plain-tag">create table binarydata(
 data varbinary(max)
)
go
insert into binarydata(data )
values(0x5468697320697320612074657374) /*binary of "This is a test"*/</pre><p>
&nbsp;</p>
<h2>Method 1 &#8211; Using Template Transform</h2>
<p>Let&#8217;s use <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-template-transform.htm" target="_blank" rel="noopener">Template Transform</a> to convert Varbinary data to Base64 format. When you use columns with binary data in Template transform it automatically converts to Base64 by default.</p>
<ol>
<li>Go to Data flow</li>
<li>Drag your OLEDB Source and configure it to outputs SQL Data with Varbinary column  (e.g. select data from dbo.binarydata).</li>
<li>Now drag <strong>ZS Template Transform</strong> from SSIS Toolbox</li>
<li>Connect OLEDB Source to Template Transform</li>
<li>Double click Template Transform  to configure. Now you can click <strong>Insert Placeholders</strong> &gt; <strong>Columns</strong> &gt; Select your <strong>Upstream column</strong> name (which has Varbinary data)</li>
<li>You will see Template text as  &lt;%MyVarBinaryColumn%&gt;</li>
<li>Click OK to Save Template Transform</li>
<li>Now connect Template transform to any Destination e.g. OLEDB Destination.  You can <strong>Map TemplateOutput</strong> column to target column. This will contain Base64 representation of Varbinary data. For example purpose we used ZS Trash destination (Check save to file)</li>
</ol>
<p>&nbsp;</p>
<div id="attachment_6256" style="width: 644px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-convert-varbinary-to-base64.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-6256" class="size-full wp-image-6256" src="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-convert-varbinary-to-base64.png" alt="Convert Varbinary to BASE64 using SSIS Template Transform" width="634" height="488" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-convert-varbinary-to-base64.png 634w, https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-convert-varbinary-to-base64-300x231.png 300w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-6256" class="wp-caption-text">Convert Varbinary to BASE64 using SSIS Template Transform</p></div>
<h3>Save Base64 string to Variable</h3>
<p>In previous step we saw how Template Transform can convert binary data (i.e. Varbinary datatype) to BASE64 string. Now let&#8217;s look at how to save this value to Variable using <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-set-variable-transform.htm" target="_blank" rel="noopener">Set Variable Transform</a>.</p>
<div id="attachment_6273" style="width: 673px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-set-variable-transform-convert-binary-to-base64.png"><img decoding="async" aria-describedby="caption-attachment-6273" class="size-full wp-image-6273" src="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-set-variable-transform-convert-binary-to-base64.png" alt="Using SSIS Set Variable Transform in Data flow (Capture binary data as base64 example)" width="663" height="625" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-set-variable-transform-convert-binary-to-base64.png 663w, https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-set-variable-transform-convert-binary-to-base64-300x283.png 300w" sizes="(max-width: 663px) 100vw, 663px" /></a><p id="caption-attachment-6273" class="wp-caption-text">Using SSIS Set Variable Transform in Data flow (Capture binary data as base64 example)</p></div>
<h2>Method 2 &#8211; Using Trash Destination</h2>
<p>Another way to dump Binary data to CSV file is use ZS Trans Destination. See previous screenshot. If you map OLEDB Source directly to Trash destination without Template Transform then you will see something like below.</p><pre class="crayon-plain-tag">data
VGhpcyBpcyBhIHRlc3Q=</pre><p>
&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/convert-varbinary-base64-ssis/">How to convert Varbinary to Base64 in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
