<?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 Thoughts and Theories</title>
	<atom:link href="http://agilebi.com/jwelch/feed/" rel="self" type="application/rss+xml" />
	<link>http://agilebi.com/jwelch</link>
	<description></description>
	<lastBuildDate>Tue, 21 Feb 2012 02:50:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Where&#8217;s John These Days?</title>
		<link>http://agilebi.com/jwelch/2012/02/20/wheres-john-these-days/</link>
		<comments>http://agilebi.com/jwelch/2012/02/20/wheres-john-these-days/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 02:47:27 +0000</pubDate>
		<dc:creator>jwelch</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Agile Development]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://agilebi.com/jwelch/2012/02/20/wheres-john-these-days/</guid>
		<description><![CDATA[Apologies for the lack of updates to the blog recently. It’s been a very busy time, but hopefully things will settle down a bit now. Exciting news today (for me at least)! It was my first day as a Pragmatic Works employee. I’ve joined their product group, and will be helping manage the development of [...]]]></description>
			<content:encoded><![CDATA[<p><em>Apologies for the lack of updates to the blog recently. It’s been a very busy time, but hopefully things will settle down a bit now.</em></p>
<p>Exciting news today (for me at least)! It was my first day as a <a href="http://pragmaticworks.com/">Pragmatic Works</a> employee. I’ve joined their product group, and will be helping manage the development of their <a href="http://pragmaticworks.com/Products/">BI tools</a>. As I’ve commented on this blog before, one of the things I ‘m really passionate about is enabling BI developers to create solutions faster and more easily, and I’m looking forward to the opportunities that Pragmatic Works presents to continue doing exactly that. I also get to work with a great group of developers and some really sharp BI people, so it promises to be a lot of fun. </p>
<p>My excitement is tempered somewhat by sadness at leaving another great group of developers at Varigence. I enjoyed working with everyone there, and wish them success in their future endeavors.</p>
<p>In other news, I have a number of presentations coming up. I’ll be at <a href="http://sqlbits.com/">SQLBits</a> in London on March the 29th, presenting a precon with Matt Masson on <a href="http://sqlbits.com/information/Event10/SSIS_Performance_Design_Patterns1/TrainingDetails.aspx">SSIS Performance Design Patterns</a> (space is limited, <a href="http://www.regonline.com/Register/Checkin.aspx?EventID=1030134">register now</a>!). I also have a session on <a href="http://www.sqlbits.com/Sessions/Event10/Unit_Testing_SSIS_Packages">SSIS Unit Testing</a> at SQLBits. </p>
<p>On April 14th, I’ll be presenting at <a href="http://sqlsaturday.com/111/eventhome.aspx">SQL Saturday #111</a> in Atlanta, which is always a great time. I’ll be presenting on <a href="http://sqlsaturday.com/viewsession.aspx?sat=111&amp;sessionid=7764">Tuning SSAS Processing Performance</a>.&#160; </p>
<p>Last, but definitely not least, I was thrilled to find out that I’ll be presenting the <a href="http://www.sqlpass.org/sqlrally/2012/dallas/Agenda/Session.aspx?sid=2494">Tuning SSAS Processing Performance</a> session at SQL Rally in Dallas on May 10-11 as well. Please <a href="http://www.sqlpass.org/sqlrally/2012/dallas/CommunityChoice.aspx">vote for one of my other sessions</a> in the community choice options, if you see one that appeals to you. I’m really looking forward to seeing some of my friends from Texas again.</p>
]]></content:encoded>
			<wfw:commentRss>http://agilebi.com/jwelch/2012/02/20/wheres-john-these-days/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Checking Whether a Character is Numeric</title>
		<link>http://agilebi.com/jwelch/2011/08/30/checking-whether-a-character-is-numeric/</link>
		<comments>http://agilebi.com/jwelch/2011/08/30/checking-whether-a-character-is-numeric/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 15:45:00 +0000</pubDate>
		<dc:creator>jwelch</dc:creator>
				<category><![CDATA[SSIS]]></category>
		<category><![CDATA[Expressions]]></category>

		<guid isPermaLink="false">http://agilebi.com/jwelch/2011/08/30/checking-whether-a-character-is-numeric/</guid>
		<description><![CDATA[Check whether a specific character is numeric in an SSIS expression]]></description>
			<content:encoded><![CDATA[<p>In SSIS, checking whether a value is numeric has always been a bit painful. Unfortunately, the SSIS expression language doesn’t have an IsNumeric function. Jamie Thomson (<a href="http://sqlblog.com/blogs/jamie_thomson/default.aspx">blog</a> | <a href="https://twitter.com/#!/jamiet">twitter</a>) has a <a href="http://consultingblogs.emc.com/jamiethomson/archive/2007/05/03/SSIS_3A00_-Checking-for-IsNumeric_28002900_.aspx">nice post here</a> that explains one way to do this check in a script component. </p>
<p>However, there is a shortcut you can take if you only need to check a specific character to see if it’s numeric. You can use the following expression:</p>
<p>FINDSTRING(&quot;0123456789&quot;, [CharacterToCheck], 1) != 0</p>
<p>If this returns True, the character is numeric. False means it’s not numeric. </p>
<p>This works by checking for the existence of the character in the string that contains all the numeric characters. If it finds an occurrence, then the character must be numeric. Obviously, this has some limitations over a real IsNumeric function, but if you just need to check single characters, it’s a lot faster than writing a script.</p>
]]></content:encoded>
			<wfw:commentRss>http://agilebi.com/jwelch/2011/08/30/checking-whether-a-character-is-numeric/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Naming Columns for the Script Component</title>
		<link>http://agilebi.com/jwelch/2011/08/18/naming-columns-for-script-component/</link>
		<comments>http://agilebi.com/jwelch/2011/08/18/naming-columns-for-script-component/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 14:00:00 +0000</pubDate>
		<dc:creator>jwelch</dc:creator>
				<category><![CDATA[SSIS]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://agilebi.com/jwelch/2011/08/18/naming-columns-for-script-component/</guid>
		<description><![CDATA[Naming columns is important for the Script component]]></description>
			<content:encoded><![CDATA[<p>Do you use whitespace or special characters in your column names? Most people don’t, because of the additional headaches it creates. You have to delimit the column names, come up with a work-around for tools that don’t support column names with special characters, etc. Underscores, however, are used pretty extensively in place of spaces. If you are using Script Components in SSIS, though, you may encounter an all-new headache with special characters or even underscores in your column names.</p>
<p>When you use a script component in SSIS, it generates some .NET code for you automatically, based on the metadata in the pipeline connected to the script component. However, when this code is generated, SSIS strips out any whitespace or special characters from the names of inputs, outputs, and columns. It only retains the letters and numbers (alphanumeric characters) in these names. </p>
<p>Here’s some examples of column name issues that I’ve run into with scripts (and while these specific items are made up, they represent real-world scenarios I’ve encountered – there’s some really horrible naming approaches out there):</p>
<table border="0" cellspacing="0" cellpadding="2" width="401">
<tbody>
<tr>
<td valign="top" width="226"><strong>Original Column Name</strong></td>
<td valign="top" width="173"><strong>Script Column Name</strong></td>
</tr>
<tr>
<td valign="top" width="226">Account</td>
<td valign="top" width="173">Account</td>
</tr>
<tr>
<td valign="top" width="226">Account#</td>
<td valign="top" width="173">Account</td>
</tr>
<tr>
<td valign="top" width="226">Account Number</td>
<td valign="top" width="173">AccountNumber</td>
</tr>
<tr>
<td valign="top" width="226">Account_Number</td>
<td valign="top" width="173">AccountNumber</td>
</tr>
<tr>
<td valign="top" width="226">TI_TXN_ID</td>
<td valign="top" width="222">TITXNID</td>
</tr>
<tr>
<td valign="top" width="226">TI_TXNID</td>
<td valign="top" width="222">TITXNID</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>As you can see, once the alphanumeric characters have been stripped from these column names, they are no longer unique. That can pose a few problems in your script code. What’s worse, because this code is auto-generated by SSIS, you can’t fix it without changing the column names in the data flow, even though this is really purely a script thing (and not even a .NET limitation – underscores are perfectly valid in .NET naming). What’s even worse than that – you don’t get an error till the binary code is recompiled.</p>
<p>So, if you are working with script components, make sure all your column names are unique even when all non-alphanumeric characters have been stripped from them. The same thing applies to your output names – they must be unique based only on the alphanumeric characters.</p>
]]></content:encoded>
			<wfw:commentRss>http://agilebi.com/jwelch/2011/08/18/naming-columns-for-script-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using OLE DB Connections from Script Tasks</title>
		<link>http://agilebi.com/jwelch/2011/08/17/oledb-connections-in-script-tasks/</link>
		<comments>http://agilebi.com/jwelch/2011/08/17/oledb-connections-in-script-tasks/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 14:00:00 +0000</pubDate>
		<dc:creator>jwelch</dc:creator>
				<category><![CDATA[SSIS]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://agilebi.com/jwelch/2011/08/17/oledb-connections-in-script-tasks/</guid>
		<description><![CDATA[Use OLE DB Connections from Script Tasks in SSIS]]></description>
			<content:encoded><![CDATA[<p>I write scripts on a pretty regular basic, and often need to access database connections from them. It’s pretty easy to do this if you are using an ADO.NET connection. However, if you are using OLE DB, you have to go through a couple of additional steps to convert the connection to an ADO.NET version. Matt Masson posted a <a href="http://blogs.msdn.com/b/mattm/archive/2008/08/22/accessing-oledb-connection-managers-in-a-script.aspx">great code sample for doing this conversion</a>.</p>
<p>I use a slightly altered version of this code pretty regularly. It’s been modified to support both OLE DB and ADO.NET connections, so that I can switch connections without having to change the script code.</p>
<p>To use it, you need to add a reference in your script project to Microsoft.SqlServer.DTSRuntimeWrap. Then, add the following to the usings section at the top of the script:</p>
<div style="padding-bottom: 0px;margin: 0px;padding-left: 0px;padding-right: 0px;float: none;padding-top: 0px" class="wlWriterEditableSmartContent">
<pre>
<pre class="brush: csharp; title: ; notranslate">
using System.Data.Common;
using Wrap = Microsoft.SqlServer.Dts.Runtime.Wrapper;
</pre>
</pre>
</div>
<p>For the code to get the connection, use the following:</p>
<div style="padding-bottom: 0px;margin: 0px;padding-left: 0px;padding-right: 0px;float: none;padding-top: 0px" class="wlWriterEditableSmartContent">
<pre>
<pre class="brush: csharp; pad-line-numbers: true; title: ; notranslate">
ConnectionManager cm = Dts.Connections[&quot;MyConnection&quot;];
DbConnection conn = null;
if (cm.CreationName == &quot;OLEDB&quot;)
{
	Wrap.IDTSConnectionManagerDatabaseParameters100 cmParams =
	cm.InnerObject as Wrap.IDTSConnectionManagerDatabaseParameters100;
	conn = cmParams.GetConnectionForSchema() as DbConnection;
}
else
{
	conn = cm.AcquireConnection(null) as DbConnection;
}

if (conn.State == ConnectionState.Closed)
{
	conn.Open();
}

// TODO: Add your code here

conn.Close();
Dts.TaskResult = (int)ScriptResults.Success;
</pre>
</pre>
</div>
<p>You can use the “conn” object to perform actions against the connection. Since it’s using the common DBConnection interface, you can use it against any database connection that you have an ADO.NET provider for (which includes OLE DB providers).</p>
]]></content:encoded>
			<wfw:commentRss>http://agilebi.com/jwelch/2011/08/17/oledb-connections-in-script-tasks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQLSaturday and Touring the South</title>
		<link>http://agilebi.com/jwelch/2011/07/29/sqlsaturday-and-touring-the-south/</link>
		<comments>http://agilebi.com/jwelch/2011/07/29/sqlsaturday-and-touring-the-south/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 04:35:08 +0000</pubDate>
		<dc:creator>jwelch</dc:creator>
				<category><![CDATA[SQLSaturday]]></category>
		<category><![CDATA[Presentations]]></category>

		<guid isPermaLink="false">http://agilebi.com/jwelch/2011/07/29/sqlsaturday-and-touring-the-south/</guid>
		<description><![CDATA[I’m sitting in the Seattle-Tacoma airport right, now, waiting for my redeye flight back to Charlotte after a fun and productive week in Seattle. When I get home, I’ll be jumping straight into a car with my family and driving for 7 or 8 hours. Why, you ask? To get to Birmingham, Alabama for SQLSaturday [...]]]></description>
			<content:encoded><![CDATA[<p>I’m sitting in the Seattle-Tacoma airport right, now, waiting for my redeye flight back to Charlotte after a fun and productive week in Seattle. </p>
<p>When I get home, I’ll be jumping straight into a car with my family and driving for 7 or 8 hours. Why, you ask? To get to Birmingham, Alabama for <a href="http://sqlsaturday.com/81/eventhome.aspx">SQLSaturday #81</a> on 7/30. I’m giving two sessions, <a href="http://sqlsaturday.com/viewsession.aspx?sat=81&amp;sessionid=4652">Do More (ETL) with Less (Effort) – Automating SSIS</a> and <a href="http://sqlsaturday.com/viewsession.aspx?sat=81&amp;sessionid=4665">Handling Advanced Data Warehouse Scenarios in SSIS</a>.</p>
<p>The following weekend, 8/6, I’ll be in Baton Rouge, LA for <a href="http://sqlsaturday.com/64/eventhome.aspx">SQLSaturday #64</a>, delivering the same sessions. If you happen to be attending either one, please look me up.</p>
]]></content:encoded>
			<wfw:commentRss>http://agilebi.com/jwelch/2011/07/29/sqlsaturday-and-touring-the-south/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delivering a Pre-Con at SQLSaturday #89 (#sqlsat89)</title>
		<link>http://agilebi.com/jwelch/2011/06/27/ssis-data-warehouse-deep-dive-sqlsat89/</link>
		<comments>http://agilebi.com/jwelch/2011/06/27/ssis-data-warehouse-deep-dive-sqlsat89/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 15:16:36 +0000</pubDate>
		<dc:creator>jwelch</dc:creator>
				<category><![CDATA[SQLSaturday]]></category>
		<category><![CDATA[Data Warehouse]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://agilebi.com/jwelch/2011/06/27/delivering-a-pre-con-at-sqlsaturday-89-sqlsat89/</guid>
		<description><![CDATA[Data Warehousing with SSIS Deep Dive at SQLSaturday #89]]></description>
			<content:encoded><![CDATA[<p>I’ll be delivering an <a href="http://www.eventbrite.com/event/1804919563/efblike">all-day deep dive into using SSIS for data warehouse ETL processes</a> the day before <a href="http://www.sqlsaturday.com/89/eventhome.aspx">SQLSaturday #89</a>, on Friday, September 16th. We’ll be taking an in-depth tour of implementing data warehouse extract, transform, and load processes with SSIS, with plenty of demonstrations and sample code. If you’ve ever wondered about how to handle data errors during your ETL, how to handle updates to large fact tables, or how to load a dimension table that combines type 1, 2, and 3 attributes, then come to this pre-con. We’ll cover all of that, plus a lot more. We have a reduced rate on the pre-con until July 1st, so <a href="http://www.eventbrite.com/event/1804919563/efblike">now’s a great time to register.</a></p>
<p>Pre-cons like this are some of the most cost effective training you can get – plenty of time to both cover a topic from end to end, and to dive into the real implementation details that are often missing from shorter presentations because of the time constraints. I hope to see you there!</p>
<h3>Data Warehousing with SSIS Deep Dive</h3>
<p>Want to learn more about implementing data warehouse ETL with SQL Server Integration Services? Attend this full day seminar, and we’ll cover using SSIS for data warehousing in-depth. You’ll learn everything you need to know to populate your data warehouse with data. We’ll cover how to develop a common framework for your packages, automate the creation of rote packages for staging data, implement common patterns for handling various types of dimensions and fact tables, and how to instrument your packages to identify and recover from failures when loading data. We’ll be using the AdventureWorks databases for the examples, so bring along a laptop configured with SQL Server 2005 or later, and the AdventureWorks sample databases installed. We’ll also cover how the upcoming Denali release of SQL Server affects what we discuss in this seminar.</p>
<ul>
<li>Laying out a framework for your ETL
<ul>
<li>Logging</li>
<li>Restartability and Recoverability</li>
<li>Auditing</li>
</ul>
</li>
<li>Handling Dimensions
<ul>
<li>SCD Type 1</li>
<li>SCD Type 2</li>
<li>Advanced Dimension Types</li>
</ul>
</li>
<li>Handling Facts
<ul>
<li>Transactional</li>
<li>Periodic Snapshot</li>
<li>Accumulating Snapshot</li>
<li>Advanced Fact Patterns</li>
</ul>
</li>
<li>Errors
<ul>
<li>Handling Processing Errors</li>
<li>Handling Data Errors</li>
<li>Recovering from Errors</li>
</ul>
</li>
<li>Best Practices for Managing Your ETL</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://agilebi.com/jwelch/2011/06/27/ssis-data-warehouse-deep-dive-sqlsat89/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Presenting at SQLSaturday #82 (#sqlsat82)</title>
		<link>http://agilebi.com/jwelch/2011/06/23/presenting-at-sqlsaturday-82/</link>
		<comments>http://agilebi.com/jwelch/2011/06/23/presenting-at-sqlsaturday-82/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 14:52:48 +0000</pubDate>
		<dc:creator>jwelch</dc:creator>
				<category><![CDATA[SQLSaturday]]></category>
		<category><![CDATA[Presentations]]></category>

		<guid isPermaLink="false">http://agilebi.com/jwelch/2011/06/23/presenting-at-sqlsaturday-82/</guid>
		<description><![CDATA[Presenting at SQLSaturday #82]]></description>
			<content:encoded><![CDATA[<p>I’ll be presenting two sessions at SQLSaturday #82 this weekend in Indianapolis. </p>
<p>If you’ve seen my posts about using <a href="http://www.varigence.com/documentation/biml/">Biml</a> to <a href="http://agilebi.com/jwelch/2011/05/13/biml-functionality-in-bids-helper/">generate SSIS packages</a>, and you’d like to learn more, then please check out “Do More (ETL) with Less (Effort) – Automating SSIS”. I’ll talk about the Biml support in <a href="http://bidshelper.codeplex.com/">BIDS Helper</a>, as well as other approaches for creating SSIS packages without all the manual effort. In my other presentation, “Tuning Analysis Services Processing Performance”, we’ll look at some of the common performance problems people encounter with Analysis Services, and how to resolve them. We’ll also cover a process for doing the tuning.</p>
<p>I really enjoy presenting at SQLSaturday events, and I’m looking forward to this one. I hope to see you there.</p>
<p>&#160;</p>
<h3>Do More (ETL) with Less (Effort) &#8211; Automating SSIS</h3>
<p>SSIS is a great tool for transferring data from one data source to another, and for implementing complex ETL processes. However, for simple, straightforward data transfer tasks or packages that adhere to a pattern, creating SSIS packages by hand can be time-consuming and repetitious. By attending this session, you&#8217;ll learn how to automate package creation in SSIS, including the dynamic generation of data flows. We’ll cover some of the free and open source tools available for this, and discuss “roll your own” options.</p>
<h3>Tuning Analysis Services Processing Performance</h3>
<p>You’ve got your Analysis Services cube created, and deployed in production. However, you notice that every night, the cube is taking longer and longer to process, and users are starting to complain about their data not being ready when they arrive in the morning. If you’ve found yourself in this situation, or want to avoid being in it in the first place, come to this session. We’ll cover how to benchmark processing performance, track down bottlenecks, and how to tune things to get the best performance for processing your cube.</p>
]]></content:encoded>
			<wfw:commentRss>http://agilebi.com/jwelch/2011/06/23/presenting-at-sqlsaturday-82/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Defining the Data Flow in Biml</title>
		<link>http://agilebi.com/jwelch/2011/06/15/defining-the-data-flow-in-biml/</link>
		<comments>http://agilebi.com/jwelch/2011/06/15/defining-the-data-flow-in-biml/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 16:36:28 +0000</pubDate>
		<dc:creator>jwelch</dc:creator>
				<category><![CDATA[SSIS]]></category>
		<category><![CDATA[BIDSHelper]]></category>
		<category><![CDATA[Biml]]></category>

		<guid isPermaLink="false">http://agilebi.com/jwelch/2011/06/15/defining-the-data-flow-in-biml/</guid>
		<description><![CDATA[Define data flow paths in Biml]]></description>
			<content:encoded><![CDATA[<p><em>This post is </em><a href="http://agilebi.com/jwelch/2011/05/13/biml-functionality-in-bids-helper/">part 5 of a series</a><em> </em><em>on using <a href="http://www.varigence.com/documentation/biml/">Biml</a> in <a href="http://bidshelper.codeplex.com/">BIDS Helper</a>. This post builds on some of the information and the sample from the previous posts.</em></p>
<p>In the previous post in the series, I talked about <a href="http://agilebi.com/jwelch/2011/06/13/controlling-the-control-flow-in-biml/">controlling the order of execution in the control flow</a>. In this post, the focus will be on the dataflow, and controlling how the data in the pipeline flows from one component to the next. This post uses a new table as the target of the data flow, so you may want to review <a href="http://agilebi.com/jwelch/2011/05/26/creating-tables-using-biml-and-bimlscript/">Part 2: Creating Tables using Biml and BimlScript</a> to see how to create the table locally. The Biml below describes the table. You can create it in the database of your choice – I used a database named Target.</p>
<pre>&lt;Biml xmlns=&quot;http://schemas.varigence.com/biml.xsd&quot;&gt;
    &lt;Connections&gt;
        &lt;OleDbConnection Name=&quot;Source&quot; ConnectionString=&quot;Provider=SQLNCLI10;Server=.;Initial Catalog=AdventureWorksDW2008R2;Integrated Security=SSPI;&quot;/&gt;
        &lt;OleDbConnection Name=&quot;Target&quot; ConnectionString=&quot;Provider=SQLNCLI10;Server=.;Initial Catalog=Target;Integrated Security=SSPI;&quot;/&gt;
    &lt;/Connections&gt;
    &lt;Tables&gt;
        &lt;Table Name=&quot;DimAccount_Test&quot; ConnectionName=&quot;Target&quot;&gt;
            &lt;Columns&gt;
                &lt;Column Name=&quot;AccountKey&quot; /&gt;
                &lt;Column Name=&quot;ParentAccountKey&quot; IsNullable=&quot;true&quot; /&gt;
                &lt;Column Name=&quot;AccountCodeAlternateKey&quot; IsNullable=&quot;true&quot; /&gt;
                &lt;Column Name=&quot;ParentAccountCodeAlternateKey&quot; IsNullable=&quot;true&quot; /&gt;
                &lt;Column Name=&quot;AccountDescription&quot; DataType=&quot;String&quot; Length=&quot;50&quot; IsNullable=&quot;true&quot; /&gt;
                &lt;Column Name=&quot;AccountType&quot; DataType=&quot;String&quot; Length=&quot;50&quot; IsNullable=&quot;true&quot; /&gt;
                &lt;Column Name=&quot;Operator&quot; DataType=&quot;String&quot; Length=&quot;50&quot; IsNullable=&quot;true&quot; /&gt;
                &lt;Column Name=&quot;CustomMembers&quot; DataType=&quot;String&quot; Length=&quot;300&quot; IsNullable=&quot;true&quot; /&gt;
                &lt;Column Name=&quot;ValueType&quot; DataType=&quot;String&quot; Length=&quot;50&quot; IsNullable=&quot;true&quot; /&gt;
                &lt;Column Name=&quot;CustomMemberOptions&quot; DataType=&quot;String&quot; Length=&quot;200&quot; IsNullable=&quot;true&quot; /&gt;
            &lt;/Columns&gt;
        &lt;/Table&gt;
    &lt;/Tables&gt;
&lt;/Biml&gt;</pre>
<p>With the table created, we can move on to the interesting part – transforming the data. In a simple, straightforward data flow, the Biml compiler will do most of the work for you. Take this data flow as an example:</p>
<pre>&lt;Dataflow Name=&quot;Dataflow 1&quot;&gt;
    &lt;Transformations&gt;
        &lt;OleDbSource Name=&quot;Source&quot; ConnectionName=&quot;Source&quot;&gt;
            &lt;DirectInput&gt;SELECT * FROM dbo.DimAccount&lt;/DirectInput&gt;
        &lt;/OleDbSource&gt;
        &lt;OleDbDestination Name=&quot;Target&quot; ConnectionName=&quot;Target&quot;&gt;
            &lt;ExternalTableOutput Table=&quot;dbo.DimAccount_Test&quot;/&gt;
        &lt;/OleDbDestination&gt;
    &lt;/Transformations&gt;
&lt;/Dataflow&gt;</pre>
<p>In this case, you don’t have to specify any data paths. The Biml compiler will infer that the OleDbSource’s output should be connected to the input of the OleDbDestination. </p>
<p><a href="http://agilebi.com/jwelch/files/2011/06/image6.png"><img style="border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px" border="0" alt="image" src="http://agilebi.com/jwelch/files/2011/06/image_thumb6.png" width="154" height="139" /></a></p>
<p>The compiler is able to do this by using default outputs. In Biml, most components have a default output defined. In the absence of other information, the compiler will automatically connect the default output of a transformation to the input of the next component defined in the Biml. So, if we use a slightly more complex data flow, like this:</p>
<pre>&lt;Dataflow Name=&quot;Dataflow 2&quot;&gt;
    &lt;Transformations&gt;
        &lt;OleDbSource Name=&quot;Source&quot; ConnectionName=&quot;Source&quot;&gt;
            &lt;DirectInput&gt;SELECT * FROM dbo.DimAccount&lt;/DirectInput&gt;
        &lt;/OleDbSource&gt;
        &lt;Lookup Name=&quot;Check For Existing&quot; OleDbConnectionName=&quot;Target&quot; NoMatchBehavior=&quot;RedirectRowsToNoMatchOutput&quot;&gt;
            &lt;DirectInput&gt;SELECT AccountKey FROM dbo.DimAccount&lt;/DirectInput&gt;
            &lt;Inputs&gt;
                &lt;Column SourceColumn=&quot;AccountKey&quot; TargetColumn=&quot;AccountKey&quot;/&gt;
            &lt;/Inputs&gt;
        &lt;/Lookup&gt;
        &lt;ConditionalSplit Name=&quot;Test ID Range&quot;&gt;
            &lt;OutputPaths&gt;
                &lt;OutputPath Name=&quot;High ID&quot;&gt;
                    &lt;Expression&gt;AccountKey &gt;= 100&lt;/Expression&gt;
                &lt;/OutputPath&gt;
            &lt;/OutputPaths&gt;
        &lt;/ConditionalSplit&gt;
        &lt;OleDbDestination Name=&quot;Target&quot; ConnectionName=&quot;Target&quot;&gt;
            &lt;ExternalTableOutput Table=&quot;dbo.DimAccount_Test&quot;/&gt;
        &lt;/OleDbDestination&gt;
    &lt;/Transformations&gt;
&lt;/Dataflow&gt;</pre>
<p>We end up with a data flow that still automatically connects data paths between components. In this case, though, it’s probably not doing exactly what we want, since it’s just connecting the default outputs. The Conditional Split (“Test ID Range”) in this example is connected by the default output, but we want to use the”High ID” output to filter out IDs less than 100. In the case of the Lookup (“Check For Existing”), the default output being used is the “Match” output, but we only want the non-matched records, so that only new rows are inserted.</p>
<p><a href="http://agilebi.com/jwelch/files/2011/06/image7.png"><img style="border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px" border="0" alt="image" src="http://agilebi.com/jwelch/files/2011/06/image_thumb7.png" width="162" height="306" /></a></p>
<p><em>I explicitly choose the option BIDS to display the path Source Names for this screenshot – by default, they aren’t displayed in the generated package. You can change the setting in BIDS by selecting the path, opening the Properties tool window, and changing the PathAnnotation property to SourceName.</em></p>
<p>So how would we change the Biml to get the desired results? If we add an <a href="http://www.varigence.com/documentation/biml/biml_Varigence.Languages.Biml.Transformation.AstDataflowInputPathNode.html">InputPath</a> element to the appropriate components, we can control which output is tied to the component’s input. In this case, we need to add explicit InputPath instructions to the Conditional Split (that will reference the Lookup’s NoMatch output) and to the OleDbDestination (which will reference the ConditionalSplit’s High ID output).</p>
<pre>&lt;Dataflow Name=&quot;Dataflow 3&quot;&gt;
    &lt;Transformations&gt;
        &lt;OleDbSource Name=&quot;Source&quot; ConnectionName=&quot;Source&quot;&gt;
            &lt;DirectInput&gt;SELECT * FROM dbo.DimAccount&lt;/DirectInput&gt;
        &lt;/OleDbSource&gt;
        &lt;Lookup Name=&quot;Check For Existing&quot; OleDbConnectionName=&quot;Target&quot; NoMatchBehavior=&quot;RedirectRowsToNoMatchOutput&quot;&gt;
            &lt;DirectInput&gt;SELECT AccountKey FROM dbo.DimAccount&lt;/DirectInput&gt;
            &lt;Inputs&gt;
                &lt;Column SourceColumn=&quot;AccountKey&quot; TargetColumn=&quot;AccountKey&quot;/&gt;
            &lt;/Inputs&gt;
        &lt;/Lookup&gt;
        &lt;ConditionalSplit Name=&quot;Test ID Range&quot;&gt;
            &lt;InputPath OutputPathName=&quot;Check For Existing.NoMatch&quot;/&gt;
            &lt;OutputPaths&gt;
                &lt;OutputPath Name=&quot;High ID&quot;&gt;
                    &lt;Expression&gt;AccountKey &gt;= 100&lt;/Expression&gt;
                &lt;/OutputPath&gt;
            &lt;/OutputPaths&gt;
        &lt;/ConditionalSplit&gt;
        &lt;OleDbDestination Name=&quot;Target&quot; ConnectionName=&quot;Target&quot;&gt;
            &lt;InputPath OutputPathName=&quot;Test ID Range.High ID&quot;/&gt;
            &lt;ExternalTableOutput Table=&quot;dbo.DimAccount_Test&quot;/&gt;
        &lt;/OleDbDestination&gt;
    &lt;/Transformations&gt;
&lt;/Dataflow&gt;</pre>
<p>This gives you the following data flow.</p>
<p><a href="http://agilebi.com/jwelch/files/2011/06/image8.png"><img style="border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px" border="0" alt="image" src="http://agilebi.com/jwelch/files/2011/06/image_thumb8.png" width="154" height="303" /></a></p>
<p>That’s a few examples of controlling the data paths in a data flow. There are a few other bits of information that are important to know about data paths in the data flow.</p>
<ul>
<li>Most components have a default output named “Output”, and a second output named “Error” for the error output (if the component supports errors).</li>
<li>The Multicast component has no default output, so you always need to explicitly define the data path mapping from it to the next component. </li>
<li>The Union All, Merge, and Merge Join components need to be explicitly mapped, since they support multiple inputs.</li>
<li>The Slowly Changing Dimension (SCD) transformation has multiple outputs. The “New” output is the default. There are also outputs named “Unchanged”, “FixedAttribute”, “ChangingAttribute”, “HistoricalAttribute”, and “InferredMember”.</li>
<li>The Percentage Sampling and Row Sampling transformations have two output named “Selected” (the default) and “Unselected”.</li>
</ul>
<p>The <a href="http://cid-71c6f14e3c205217.office.live.com/self.aspx/Public/BimlSamples/DataFlow.zip">sample Biml for this post is on my SkyDrive</a>. Please download it and try it out with the <a href="http://bidshelper.codeplex.com/">latest release of BIDS Helper</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://agilebi.com/jwelch/2011/06/15/defining-the-data-flow-in-biml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Controlling the Control Flow in Biml</title>
		<link>http://agilebi.com/jwelch/2011/06/13/controlling-the-control-flow-in-biml/</link>
		<comments>http://agilebi.com/jwelch/2011/06/13/controlling-the-control-flow-in-biml/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 19:01:23 +0000</pubDate>
		<dc:creator>jwelch</dc:creator>
				<category><![CDATA[SSIS]]></category>
		<category><![CDATA[BIDSHelper]]></category>
		<category><![CDATA[Biml]]></category>

		<guid isPermaLink="false">http://agilebi.com/jwelch/2011/06/13/controlling-the-control-flow-in-biml/</guid>
		<description><![CDATA[Learn to define precedence constraints for SSIS in Biml]]></description>
			<content:encoded><![CDATA[<p><em>This post is </em><a href="http://agilebi.com/jwelch/2011/05/13/biml-functionality-in-bids-helper/">part 4 of a series</a><em> </em><em>on using <a href="http://www.varigence.com/documentation/biml/">Biml</a> in <a href="http://bidshelper.codeplex.com/">BIDS Helper</a>. This post builds on some of the information and the sample from the previous posts.</em></p>
<p>So far, we’ve looked at some relatively simple packages, in terms of their flow. In this post, we’re going to look at how to handle more complex control flow in Biml. </p>
<p>One feature of Biml is the ConstraintMode property that’s part of packages and containers. This property controls how precedence constraints are generated in the control flow. In the simple case, if you want all tasks to be run in sequence, you can set the ConstraintMode to Linear. This causes the package to be produced with all tasks connected sequentially by Success precedence constraints, in the order they were specified in the Biml. So, the following Biml:</p>
<pre>&lt;Biml xmlns=&quot;http://schemas.varigence.com/biml.xsd&quot;&gt;
    &lt;Packages&gt;
        &lt;Package Name=&quot;Control Flow Sample 1&quot; AutoCreateConfigurationsType=&quot;None&quot; ConstraintMode=&quot;Linear&quot;&gt;
            &lt;Tasks&gt;
                &lt;Dataflow Name=&quot;Task 1&quot;/&gt;
                &lt;Dataflow Name=&quot;Task 2&quot;/&gt;
                &lt;Dataflow Name=&quot;Task 3&quot;/&gt;
            &lt;/Tasks&gt;
        &lt;/Package&gt;
    &lt;/Packages&gt;
&lt;/Biml&gt;</pre>
<p>results in a package that looks like this:</p>
<p><a href="http://agilebi.com/jwelch/files/2011/06/image2.png"><img style="border-right-width: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px;padding-top: 0px" border="0" alt="image" src="http://agilebi.com/jwelch/files/2011/06/image_thumb2.png" width="153" height="222" /></a></p>
<p>This type of linear flow is great in some situations, but sometimes you need more control. In those cases, you can change the ConstraintMode to Parallel. The generated package will not have any automatically created precedence constraints, so it will look like this:</p>
<p><a href="http://agilebi.com/jwelch/files/2011/06/image3.png"><img style="border-right-width: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px;padding-top: 0px" border="0" alt="image" src="http://agilebi.com/jwelch/files/2011/06/image_thumb3.png" width="512" height="152" /></a></p>
<p>Once a container is in Parallel constraint mode, you can start adding explicit precedence constraints. Let’s use an example to highlight this. Imagine you have a package that needs to run three data flows. (I’m using data flows for the example because they are simple to read in Biml, and I want the focus to be on the constraints, not the tasks.) I want one data flow to execute first – this data flow will be named “Me First”. If “Me First” succeeds, the data flow named “Me Next (Success)” should execute. The third data flow, named “I’m Last (Always)” should always be executed, regardless of the success or failure of the other two tasks. So my package should look like this:</p>
<p><a href="http://agilebi.com/jwelch/files/2011/06/image4.png"><img style="border-right-width: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px;padding-top: 0px" border="0" alt="image" src="http://agilebi.com/jwelch/files/2011/06/image_thumb4.png" width="245" height="234" /></a></p>
<p>So how do we get this output from Biml? We can use the <a href="http://www.varigence.com/documentation/biml/biml_Varigence.Languages.Biml.Task.AstTaskflowPrecedenceConstraintsNode.html">PrecedenceConstraints</a> collection on each task. At it’s simplest, you just add an <a href="http://www.varigence.com/documentation/biml/biml_Varigence.Languages.Biml.Task.AstTaskflowInputPathNode.html">Input</a> to the collection, and reference the output of the task that should execute prior to this one. In Biml, all tasks have a built-in output named Output. You can reference it using TaskName.Output (“Me First.Output” in the example below). This will create a regular, Success constraint between the tasks.</p>
<pre>&lt;Dataflow Name=&quot;Me Next (Success)&quot;&gt;
    &lt;PrecedenceConstraints&gt;
        &lt;Inputs&gt;
            &lt;Input OutputPathName=&quot;Me First.Output&quot;/&gt;
        &lt;/Inputs&gt;
    &lt;/PrecedenceConstraints&gt;
&lt;/Dataflow&gt;</pre>
<p>For the next set of constraints, we want to use the OR logical type, using the LogicalType property, for the constraints, since either of them should cause the third task to run. We also need to explicitly set the evaluation value on these, using the EvaluationValue property.</p>
<pre>&lt;Dataflow Name=&quot;I'm Last (Always)&quot;&gt;
    &lt;PrecedenceConstraints LogicalType=&quot;Or&quot;&gt;
        &lt;Inputs&gt;
            &lt;Input OutputPathName=&quot;Me First.Output&quot; EvaluationValue=&quot;Failure&quot;/&gt;
            &lt;Input OutputPathName=&quot;Me Next (Success).Output&quot; EvaluationValue=&quot;Completion&quot;/&gt;
        &lt;/Inputs&gt;
    &lt;/PrecedenceConstraints&gt;
&lt;/Dataflow&gt;</pre>
<p>You can also add expression constraints to the Inputs, to control whether tasks run based on the results on an expression. You use the EvaluationOperation and Expression properties to configure that.</p>
<pre>&lt;Package Name=&quot;Control Flow Sample 3&quot; AutoCreateConfigurationsType=&quot;None&quot; ConstraintMode=&quot;Parallel&quot;&gt;
    &lt;Variables&gt;
        &lt;Variable Name=&quot;Continue&quot; DataType=&quot;Int32&quot;&gt;0&lt;/Variable&gt;
    &lt;/Variables&gt;
    &lt;Tasks&gt;
        &lt;Dataflow Name=&quot;Task 1&quot;/&gt;
        &lt;Dataflow Name=&quot;Task 2&quot;&gt;
            &lt;PrecedenceConstraints&gt;
                &lt;Inputs&gt;
                    &lt;Input OutputPathName=&quot;Task 1.Output&quot; EvaluationOperation=&quot;Expression&quot; Expression=&quot;@Continue==1&quot;/&gt;
                &lt;/Inputs&gt;
            &lt;/PrecedenceConstraints&gt;
        &lt;/Dataflow&gt;
    &lt;/Tasks&gt;
&lt;/Package&gt;</pre>
<p>That Biml results in a package that looks like this.</p>
<p><a href="http://agilebi.com/jwelch/files/2011/06/image5.png"><img style="border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px" border="0" alt="image" src="http://agilebi.com/jwelch/files/2011/06/image_thumb5.png" width="155" height="146" /></a></p>
<p>That’s how to control the precedence constraints. I’ve uploaded the Biml from this post to <a href="http://cid-71c6f14e3c205217.office.live.com/self.aspx/Public/BimlSamples/ControlFlow.biml">my SkyDrive here</a>, so you can download and experiment with this yourself. In the next post, we’ll look at controlling the data paths in a data flow.</p>
]]></content:encoded>
			<wfw:commentRss>http://agilebi.com/jwelch/2011/06/13/controlling-the-control-flow-in-biml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BIDS Helper 1.5 Is Available!</title>
		<link>http://agilebi.com/jwelch/2011/06/09/bids-helper-1-5-available/</link>
		<comments>http://agilebi.com/jwelch/2011/06/09/bids-helper-1-5-available/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 14:54:05 +0000</pubDate>
		<dc:creator>jwelch</dc:creator>
				<category><![CDATA[SSIS]]></category>
		<category><![CDATA[BIDSHelper]]></category>
		<category><![CDATA[Biml]]></category>
		<category><![CDATA[SSAS]]></category>

		<guid isPermaLink="false">http://agilebi.com/jwelch/2011/06/09/bids-helper-1-5-available/</guid>
		<description><![CDATA[BIDS Helper 1.5 Released]]></description>
			<content:encoded><![CDATA[<p>The new version of <a href="http://bidshelper.codeplex.com/">BIDS Helper</a> has now been released. If you haven’t used it before, now’s a great time to get started with it. BIDS Helper has been adding much needed functionality functionality to the BIDS environment for over 4 years, with the first release happening back in May, 2007. </p>
<p>I <a href="http://agilebi.com/jwelch/2011/05/13/biml-functionality-in-bids-helper/">posted last month</a> about the beta – thanks to everyone that downloaded it and provided feedback. The major new features are: </p>
<h3>Duplicate Roles</h3>
<p><a href="http://bidshelper.codeplex.com/wikipage?title=Duplicate%20Role">This feature</a> allows you to copy a role with all of the associated settings and permissions. This is implemented as a new menu item on the right click menu for a role.</p>
<h3>Biml Package Generator</h3>
<p>The <a href="http://bidshelper.codeplex.com/wikipage?title=Biml%20Package%20Generator">Biml Package Generator</a> provides the ability to create packages from <a href="http://www.varigence.com/documentation/biml/">Business Intelligence Markup Language (Biml)</a>. You can find some <a href="http://bidshelper.codeplex.com/wikipage?title=Samples%20and%20Tutorials&amp;referringTitle=Biml%20Package%20Generator">tutorials on using this functionality here</a>, and a <a href="http://bidshelper.codeplex.com/wikipage?title=Introduction%20to%20Biml%20in%20BIDS%20Helper&amp;referringTitle=Samples%20and%20Tutorials">short introduction video here</a>.</p>
<p>There were also several issues resolved, and other improvements. The <a href="http://bidshelper.codeplex.com/wikipage?title=Enable%2fDisable%20features">Enable/Disable features dialog</a> has been improved to provide additional information and help links. The new version of the <a href="http://expressioneditor.codeplex.com/">SSIS Expression Editor</a> is also included, and there are improvements to the variable move feature, the Expression list, and the Printer Friendly Dimension Usage feature.</p>
<p>I’m pretty excited about this release, since I’ve been working on the <a href="http://www.varigence.com/documentation/biml/">Biml</a> language and technology since joining <a href="http://www.varigence.com/">Varigence</a>. I think it’s great that we’re able to provide some of this functionality for free to the community through BIDS Helper. I’m particularly interested in seeing what interesting uses the community comes up with for it. As I <a href="http://agilebi.com/jwelch/2011/05/26/creating-tables-using-biml-and-bimlscript/">mentioned here</a>, I think it will provide a nice way to package up complete, working samples that someone can just copy and paste from a web page, and use locally. On top of that, it will help automate a lot of rote tasks in SSIS, as I’ll continue to highlight in <a href="http://agilebi.com/jwelch/2011/05/13/biml-functionality-in-bids-helper/">my series on using Biml in BIDS Helper</a>.</p>
<p>We’ve already gotten some great feedback on the new version, along with some suggestions for continued improvements. If there’s functionality you’d like to see added to BIDS Helper, please suggest it at the <a href="http://bidshelper.codeplex.com/workitem/list/basic">Issue Tracker page</a> – you can also use that to track new feature suggestions.</p>
]]></content:encoded>
			<wfw:commentRss>http://agilebi.com/jwelch/2011/06/09/bids-helper-1-5-available/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

