<?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>A Developer&#039;s Blog &#187; Tip</title>
	<atom:link href="http://blog.hoegaerden.be/tag/tip/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hoegaerden.be</link>
	<description>SQL Server, BI, .NET, IT and anything else I have been playing with.</description>
	<lastBuildDate>Wed, 01 Feb 2012 16:15:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Quick SSIS tip when working with wide tables</title>
		<link>http://blog.hoegaerden.be/2009/09/03/quick-ssis-tip-when-working-with-wide-tables/</link>
		<comments>http://blog.hoegaerden.be/2009/09/03/quick-ssis-tip-when-working-with-wide-tables/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 20:00:55 +0000</pubDate>
		<dc:creator>Valentino Vranken</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[Business Intelligence Development Studio]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[Tip]]></category>

		<guid isPermaLink="false">http://blog.hoegaerden.be/2009/09/03/quick-ssis-tip-when-working-with-wide-tables/</guid>
		<description><![CDATA[If you’ve ever needed to load a wide table, for instance one that consists of about 250 columns, you may have come to the conclusion that some manipulations in your SSIS package take forever.  Here’s a quick tip how to speed up your package development. This tip is actually quite generic and applicable to daily [...]]]></description>
			<content:encoded><![CDATA[<p>If you’ve ever needed to load a wide table, for instance one that consists of about 250 columns, you may have come to the conclusion that some manipulations in your SSIS package take forever.  Here’s a quick tip how to speed up your package development.</p>
<p>This tip is actually quite generic and applicable to daily Windows use.  It’s just that sometimes you forget about the most simple things because you’re used to a different way of working.  Why make it easy when difficult works fine, right?  Well, maybe not.</p>
<p>Okay, here it goes: <strong>don’t forget that you’ve got a keyboard, do not always use the mouse!</strong> The Business Intelligence Development Studio offers a very graphical way of designing your data flow (or control flow for that matter) but sometimes it’s really faster to use the keyboard.</p>
<p>An example.  Imagine the Derived Column Transformation.  To avoid typographical errors you want to select a column name from the tree view on the left in the Derived Column Transformation Editor.  And then you discover that the list of column names is not ordered alphabetically, and on top of that, there’s not way to rearrange them!  Good luck finding your column.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Derived Column Transformation Editor" src="http://blog.hoegaerden.be/wp-content/uploads/image67.png" border="0" alt="Derived Column Transformation Editor" width="409" height="372" /></p>
<p>And then you remember that you’ve got a keyboard.  By <strong>typing the first letters</strong> of the column name, the selected item will jump down to the first match.  Isn’t that a great invention?!  In the screenshot above I typed “pu” and it selected PurchaseOrderNumber, which is about 32 columns down from the top.</p>
<p>This tip not only works in our Derived Column Transformation but in any screen where a similar tree view appears, such as in the “Inputs and Outputs Properties” tab of the Advanced Editor of an OLE DB Source:</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image68.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Advanced Editor of OLE DB Source" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb1.png" border="0" alt="Advanced Editor of OLE DB Source" width="502" height="535" /></a></p>
<p>This can be useful if you need to tell the component that you’ve ordered the data on certain columns.  And why on earth would you want to do that, you may ask yourself.  Well, there are certain components that expect the data to be ordered, such as the Merge item.</p>
<p>If you apply this tip whenever you need to locate something in a tree view, you’ll find that your live has become just a bit easier.</p>
<p>And if you’re not satisfied with the way of working as described above, there’s always the XML!  That’s right, just right-click on your package in the Solution Explorer and select View Code.</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image69.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Context menu on package in Solution Explorer" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb2.png" border="0" alt="Context menu on package in Solution Explorer" width="319" height="167" /></a></p>
<p>Then you’ll discover that a .dtsx file is made up completely of XML.  If you spend some time examining the XML code, you’ll probably find what you’re looking for.</p>
<p>As an example let’s say we want to locate our PurchaseOrderNumber from earlier and change its SortKeyPosition property to 1 (which means the data coming in is ordered by PurchaseOrderNumber).  So I open the XML and scroll down a bit.  I recognize a component which I’ve named “OLE_SRC Wide Table”:</p>
<div class="code"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">component</span><span style="color: #ff0000;"> id</span><span style="color: #0000ff;">=&#8221;1&#8243;</span><span style="color: #ff0000;"> name</span><span style="color: #0000ff;">=&#8221;OLE_SRC Wide Table&#8221;</span><span style="color: #ff0000;"> </span> …</div>
<div class="code"></div>
<p>I also recognize my SELECT statement.  Scrolling down a bit further I see the</p>
<div class="code"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">outputs</span><span style="color: #0000ff;">&gt;</span><span style="color: #000000;"> </span></div>
<p>followed by a bunch of outputColumn items.  I put the cursor at the &lt;outputs&gt; line and hit CTRL-F.  Then I type “pur” and hit ENTER.</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image70.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Find and Replace window in dtsx XML" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb3.png" border="0" alt="Find and Replace window in dtsx XML" width="483" height="461" /></a></p>
<p>The selection jumps to the column that we’re after.  I close the Find and Replace window and scroll to the right to find the sortKeyPosition property and I update its value to 1.</p>
<p>To confirm that this is working I open up the Advanced Editor again and locate our column.  SortKeyPosition is set to 1!</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image71.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SortKeyPosition has been updated through XML" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb4.png" border="0" alt="SortKeyPosition has been updated through XML" width="258" height="120" /></a></p>
<p>I hope that with this I showed you that sometimes it’s interesting to think about what you’re actually doing and try to find a way to do it better, and faster.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.hoegaerden.be%2F2009%2F09%2F03%2Fquick-ssis-tip-when-working-with-wide-tables%2F&amp;title=Quick%20SSIS%20tip%20when%20working%20with%20wide%20tables" id="wpa2a_2"><img src="http://blog.hoegaerden.be/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.hoegaerden.be/2009/09/03/quick-ssis-tip-when-working-with-wide-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

