<?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>BI Monkey &#187; Export Column</title>
	<atom:link href="http://www.bimonkey.com/tag/export-column/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bimonkey.com</link>
	<description>James Beresford on Microsoft BI and Consulting in Sydney, Australia</description>
	<lastBuildDate>Mon, 23 Jan 2012 22:01:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>The Import Column Transformation</title>
		<link>http://www.bimonkey.com/2009/09/the-import-column-transformation/</link>
		<comments>http://www.bimonkey.com/2009/09/the-import-column-transformation/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 05:04:33 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[Export Column]]></category>
		<category><![CDATA[Import Column]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=625</guid>
		<description><![CDATA[In this post I will be covering the Import Column Transformation. The sample package can be found here for 2005 and guidelines on use are here. What does the Import Column Transformation do? The Import Column transformation is used to load binary data (photos, documents, media etc.) from the file system into a Data Flow. [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 171px"><img title="The Import Column Transformation" src="http://www.bimonkey.com/uploads/componentreview/importcolumn1.jpg" alt="Fig 1: The Import Column Transformation" width="161" height="71" /><p class="wp-caption-text">Fig 1: The Import Column Transformation</p></div>
<p>In this post I will be covering the Import  Column Transformation. The sample package can be found <a title="SQL 2005 SSIS Import Column Transformation Sample (Right Click, Save As)" href="http://www.bimonkey.com/uploads/componentreview/Import%20Column%20Transformation%20Basics%202005.dtsx">here for 2005</a> and guidelines on use are <a title="Using samples from BI Monkey" href="http://www.bimonkey.com/support/using-ssis-samples-from-this-site/">here</a>.</p>
<h2>What does the Import Column Transformation do?</h2>
<p>The Import Column transformation is used to load binary data (photos, documents, media etc.) from the file system into a Data Flow. From the Data Flow it can then be loaded into a table, moved to a different location, modified &#8211; whatever you need to do. It is the reverse of the <a title="The Export Column Transformation" href="http://www.bimonkey.com/2009/06/the-export-column-transformation/">Export Column</a> transformation, which pushes binary data out of a Data Flow and into the file system.</p>
<p>In my example I export product photo image thumbnails from the AdventureWorks database using the Export Column transformation, and then import them back in to a new table using the Import Column transformation.</p>
<h2>Configuring the Import Column Transformation</h2>
<p>The Import Column Transformation is another of those components that lacks a nice GUI, so all the configuration occurs in the advanced editor. In a similar manner to the Pivot, you need to create outputs that then have to be referenced by the inputs &#8211; though it is a bit simpler in this case. Just follow the steps below!</p>
<p>Firstly, select the input column that provides the file name and path of the binary data so the component can find the file it is going to import. This is simply a matter of selecting the appropriate column on the Input Columns tab, as below.</p>
<div class="wp-caption alignnone" style="width: 366px"><img title="Selecting the Input Column" src="http://www.bimonkey.com/uploads/componentreview/importcolumn2.jpg" alt="b" width="356" height="276" /><p class="wp-caption-text">Fig 2: Selecting the Input Column</p></div>
<p>The second step is to create an output column to put the imported data into. Do this by switching to the Input and Output properties tab. Expand &#8220;Import Column Output&#8221;, select the Output Columns folder and click the &#8220;Add Column&#8221; button at the bottom of the form. Name the output (im my example below I called it &#8220;Imagefile&#8221;) and take note of the ID it is assigned (102 in my example).</p>
<div class="wp-caption alignnone" style="width: 499px"><img title="Getting the ID of the new Output Column" src="http://www.bimonkey.com/uploads/componentreview/importcolumn3.jpg" alt="b" width="489" height="258" /><p class="wp-caption-text">Fig 3: Getting the ID of the new Output Column</p></div>
<p>You then have to expand &#8220;Import Column Input&#8221; and then the Input Columns folder. Select the input column that holds the file path of the binary data, and hidden down at the bottom of the properties list is the property &#8220;<strong>FileDataColumnID</strong>&#8220;. Update this property with the value you picked up from the Output Column that you just generated. This tells the output column where it is getting its binary data from.</p>
<div class="wp-caption alignnone" style="width: 599px"><img title="Mapping the Output Column to the Input Column" src="http://www.bimonkey.com/uploads/componentreview/importcolumn4.jpg" alt="b" width="589" height="161" /><p class="wp-caption-text">Fig 4: Mapping the Output Column to the Input Column</p></div>
<p>This is everything you need to do to get the binary data into the Data Flow. Downstream from the Import Column transformation you manipulate the binary data using the Output Column you created within it.</p>
<h2>Where should you use the Import Column Transformation?</h2>
<p>This transformation would be useful for loading a database with images, documents of media files. I&#8217;ve not had call to use it yet so would be interested to hear of its practical applications.</p>
<p>MSDN Documentation for the Import Column Transformation can be found here for <a title="SQL 2008 Import Column Transformation Documentation on MSDN" href="http://msdn.microsoft.com/en-us/library/ms141262.aspx">2008</a> and here for <a title="SQL 2005 Import Column Transformation Documentation on MSDN" href="http://msdn.microsoft.com/en-us/library/ms141262(SQL.90).aspx">2005</a>.</p>
<p>If you are still struggling, try these additional resources:</p>
<ul>
<li><a title="Importing Files Using SSIS" href="http://agilebi.com/cs/blogs/jwelch/archive/2008/02/02/importing-files-using-ssis.aspx">Importing Files Using SSIS</a> from jwelch</li>
<li><a title="Loading Binary Files into SQL Server Using SSIS" href="http://www.sqlshare.com/Media.aspx?vid=62">Loading Binary Files into SQL Server Using SSIS</a> from SQLShare (registration required)</li>
</ul>
<p>If you need specific help or advice, or have suggestions on the post, please leave a comment and I will do my best to help you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2009/09/the-import-column-transformation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Export Column Transformation</title>
		<link>http://www.bimonkey.com/2009/06/the-export-column-transformation/</link>
		<comments>http://www.bimonkey.com/2009/06/the-export-column-transformation/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 11:29:40 +0000</pubDate>
		<dc:creator>BI Monkey</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[Export Column]]></category>

		<guid isPermaLink="false">http://www.bimonkey.com/?p=301</guid>
		<description><![CDATA[In this post I will be covering the Export Column Transformation. The sample package can be found here for 2005 and guidelines on use are here. What does it export, and to where? It exports Binary Data &#8211; which means things like Images, Documents and other media &#8211; which have been stored in a relational database. [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 249px"><img title="The Export Column Transformation" src="http://www.bimonkey.com/uploads/componentreview/exportcolumn1.jpg" alt="b" width="239" height="69" /><p class="wp-caption-text">Fig 1: The Export Column Transformation</p></div>
<p>In this post I will be covering the Export Column Transformation. The sample package can be found <a title="SQL 2005 SSIS Export Column Transformation Sample Package (Right click, save as)" href="http://www.bimonkey.com/uploads/componentreview/Export%20Column%20Transformation%20Basics%202005.dtsx">here for 2005</a> and guidelines on use are <a title="Using samples from BI Monkey" href="http://www.bimonkey.com/support/using-ssis-samples-from-this-site/">here</a>.</p>
<h2>What does it export, and to where?</h2>
<p>It exports Binary Data &#8211; which means things like Images, Documents and other media &#8211; which have been stored in a relational database. It exports them out to the file system. In the example package, I demonstrate exporting image data from Adventureworks into a file folder.</p>
<div class="wp-caption alignnone" style="width: 659px"><img title="Configuring the Export Column Transformation" src="http://www.bimonkey.com/uploads/componentreview/exportcolumn2.jpg" alt="b" width="649" height="243" /><p class="wp-caption-text">Fig 2: Configuring the Export Column Transformation</p></div>
<p>There&#8217;s not much to configure &#8211; you need to decide which column(s) you are going to export to the file system, and which column you will use to specify the full file path and file name (you cannot just set a folder globally and use a file name only). MSDN shows the full range of outcomes if you set the Allow Append or Force Truncate flags, but essentially:</p>
<ul>
<li><strong>Allow Append</strong> &#8211; Will create a new file if none exists, otherwise it will add the data to the end of an existing file</li>
<li><strong>Force Truncate</strong> &#8211; If a file exists, it will overwrite it</li>
</ul>
<p>You also get the option to set a Byte Order Mark (or BOM), which as far as I can tell is a Unicode end of file marker, but if anyone can enlighten me, please do so.</p>
<p>The other thing to note is that this component can be the terminating point of a data flow &#8211; an output is available but not compulsory.</p>
<h2>When would you use an Export Column?</h2>
<p>The main use for this would be for extracting items stored in the database, or for placing them as files as you move them from point to point in or between data flows.</p>
<p>MSDN Documentation for the Export Column Transformation can be found here for <a title="SQL 2008 Export Column Transformation Documentation on MSDN" href="http://msdn.microsoft.com/en-us/library/ms139818.aspx">2008</a> and here for <a title="SQL 2005 Export Column Transformation Documentation on MSDN" href="http://msdn.microsoft.com/en-us/library/ms139818(SQL.90).aspx">2005</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bimonkey.com/2009/06/the-export-column-transformation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

