<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'ssis' and 'Design Pattern'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=ssis,Design+Pattern&amp;orTags=0</link><description>Search results matching tags 'ssis' and 'Design Pattern'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Presenting Loading Data Warehouse Partitions with SSIS 2012 at SQL Saturday DC!</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2012/11/19/presenting-loading-data-warehouse-partitions-with-ssis-2012-at-sql-saturday-dc.aspx</link><pubDate>Mon, 19 Nov 2012 18:37:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:46287</guid><dc:creator>andyleonard</dc:creator><description>&lt;p&gt;Join Darryll Petrancuri and I as we present &lt;a target="_blank" href="http://sqlsaturday.com/viewsession.aspx?sat=173&amp;amp;sessionid=11735"&gt;Loading Data Warehouse Partitions with SSIS 2012&lt;/a&gt; Saturday 8 Dec 2012 at &lt;a target="_blank" href="http://sqlsaturday.com/173/eventhome.aspx"&gt;SQL Saturday 173 in DC&lt;/a&gt;!&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;SQL Server 2012 table partitions offer powerful Big Data solutions to the Data Warehouse ETL Developer. In this presentation, Darryll Petrancuri and Andy Leonard demonstrate one approach to loading partitioned tables and managing the partitions using SSIS 2012, and reporting partition metrics using SSRS 2012. Objectives&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;A practical solution for loading Big Data Fact tables (1B+ rows).&lt;/li&gt;      &lt;li&gt;Learn more about SQL Server 2012 table partitioning.&lt;/li&gt;      &lt;li&gt;Learn more about using SSIS Expression Language to generate dynamic SQL in SSIS 2012.&lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;p&gt;I hope to see you there!&lt;/p&gt;  &lt;p&gt;:{&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;About &lt;/i&gt;&lt;a target="_blank" href="http://www.linkedin.com/in/dpetrancuri"&gt;&lt;i&gt;Darryll Petrancuri&lt;/i&gt;&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&lt;a target="_blank" href="http://www.linkedin.com/in/dpetrancuri"&gt;Darryll Petrancuri&lt;/a&gt; is a Data &amp;amp; Business Intelligence Architect for SPS Commerce. He has been in software development for over 30 years, working across a wide variety of industries and domains serving as a consultant, developer, architect, thought leader, visionary, mentor and instructor. His background in the Microsoft technology stack includes VB (from Classic 1.0 Beta &amp;amp; .Net), C#, SQL Server 6.5 - 2012 (Core, Reporting Services, Integration Services, Notification Services, Analysis Services), component, application, database, data warehouse and business intelligence architecture and development. He currently specializes in innovative data warehouse solutions architecture and development, leveraging custom metadata repositories and automation.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;About Andy Leonard&lt;/i&gt;:&lt;/p&gt;  &lt;p&gt;Andy Leonard is CSO of &lt;a href="http://linchpinpeople.com/"&gt;Linchpin People&lt;/a&gt;, an SSIS Trainer and Consultant, SQL Server database and Integration Services developer, SQL Server data warehouse developer, community mentor, blogger, and engineer. He is a co-author of &lt;a href="http://www.amazon.com/SSIS-Design-Patterns-Matt-Masson/dp/1430237716"&gt;SSIS Design Patterns&lt;/a&gt;. His background includes Visual Basic and web application architecture and development and SQL Server 2000-2012.&lt;/p&gt;</description></item><item><title>SSIS Design Pattern: Producing a Footer Row</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2012/10/09/ssis-design-pattern-producing-a-footer-row.aspx</link><pubDate>Tue, 09 Oct 2012 11:00:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:45487</guid><dc:creator>andyleonard</dc:creator><description>&lt;blockquote&gt;   &lt;p&gt;&lt;a title="SSIS Design Patterns" href="http://www.amazon.com/SSIS-Design-Patterns-Matt-Masson/dp/1430237716" target="_blank"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;float:right;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" align="right" src="http://sqlblog.com/blogs/andy_leonard/image_650D2D24.png" width="194" height="244" /&gt;&lt;/a&gt;&lt;em&gt;The following is an excerpt from &lt;/em&gt;&lt;a href="http://www.amazon.com/SSIS-Design-Patterns-Matt-Masson/dp/1430237716" target="_blank"&gt;&lt;em&gt;SSIS Design Patterns&lt;/em&gt;&lt;/a&gt;&lt;em&gt; (now &lt;/em&gt;&lt;a href="http://www.amazon.co.uk/SSIS-Design-Patterns-Matt-Masson/dp/1430237716" target="_blank"&gt;&lt;em&gt;available&lt;/em&gt;&lt;/a&gt;&lt;em&gt; in the UK!) Chapter 7, Flat File Source Patterns. The only planned appearance of all five authors presenting on SSIS Design Patterns is the &lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3159" target="_blank"&gt;SSIS Design Patterns day-long pre-conference session&lt;/a&gt; at the &lt;a href="http://www.sqlpass.org/summit/2012" target="_blank"&gt;PASS Summit 2012&lt;/a&gt;. &lt;a href="https://www.regonline.com/register/checkin.aspx?MethodId=0&amp;amp;eventsessionId=c09266791bfa4138b026b094a3a7eb89&amp;amp;eventID=1018613" target="_blank"&gt;Register today&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Let’s look at producing a footer row and adding it to the data file. For this pattern, we will leverage project and package parameters. We will also leverage the Parent-Child pattern, which will be discussed in detail in another chapter. We are not going to build the package that creates a flat file containing data. We will start with the assumptions that an extract file exists and we know the number of rows and the extract date. We will use parameters to transmit metadata from the parent package to the child package. Let’s get started!&lt;/p&gt;  &lt;p&gt;Create a new SSIS package and name it WriteFileFooter.dtsx. Click on the Parameters tab and add the following parameters:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="0"&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;b&gt;&lt;u&gt;Name&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;b&gt;&lt;u&gt;Data Type&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;b&gt;&lt;u&gt;Value&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;&lt;b&gt;&lt;u&gt;Required&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;AmountSum&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;Decimal&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;0&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;FALSE&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;DateFormat&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;String&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;&amp;#160;&lt;/td&gt;        &lt;td&gt;         &lt;p&gt;TRUE&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;Debug&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;Boolean&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;TRUE&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;FALSE&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;Delimiter&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;String&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;,&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;TRUE&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;ExtractFilePath&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;String&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;&amp;#160;&lt;/td&gt;        &lt;td&gt;         &lt;p&gt;TRUE&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;LastUpdateDateTime&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;DateTime&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;1/1/1900&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;TRUE&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;RecordCount&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;Int32&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;0&lt;/p&gt;       &lt;/td&gt;        &lt;td&gt;         &lt;p&gt;TRUE&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;The parameters, when entered, appear as shown in Figure 7-20:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/andy_leonard/image_0EA0F858.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/andy_leonard/image_thumb_0879ABBD.png" width="244" height="102" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;em&gt;Figure 7-20. Parameters for the WriteFileFooter.dtsx Package&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The Sensitive property for each parameter is set to False. The Description is optional and available in the image.    &lt;br /&gt;We’re going to do the heavy lifting in a Script Task. Return to the Control Flow and drag a Script Task onto the canvas. Change the name to “scr Append File Footer” and open the editor. On the Script page, click the ellipsis in the ReadOnlyVariables property’s value textbox. When the Select Variables window displays, select the following variables:     &lt;br /&gt;•&amp;#160;&amp;#160;&amp;#160; System::PackageName     &lt;br /&gt;•&amp;#160;&amp;#160;&amp;#160; System::TaskName     &lt;br /&gt;•&amp;#160;&amp;#160;&amp;#160; $Package::AmountSum     &lt;br /&gt;•&amp;#160;&amp;#160;&amp;#160; $Package::DateFormat     &lt;br /&gt;•&amp;#160;&amp;#160;&amp;#160; $Package::Debug     &lt;br /&gt;•&amp;#160;&amp;#160;&amp;#160; $Package::Delimiter     &lt;br /&gt;•&amp;#160;&amp;#160;&amp;#160; $Package::ExtractFilePath     &lt;br /&gt;•&amp;#160;&amp;#160;&amp;#160; $Package::LastUpdateDateTime     &lt;br /&gt;•&amp;#160;&amp;#160;&amp;#160; $Package::RecordCount&lt;/p&gt;  &lt;p&gt;The Select Variables window will not appear exactly as shown in Figure 7-21, but these are the variables you need to select for use inside the “scr Append File Footer” Script Task:    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/andy_leonard/image_6BEC940F.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/andy_leonard/image_thumb_52746B08.png" width="244" height="190" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;em&gt;Figure 7-21.Selecing Variables for the Footer File&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Click the OK button to close the Select Variables window. Set the ScriptLanguage property to Microsoft Visual Basic 2010. Click the Edit Script button to open the VstaProjects window. At the top of the ScriptMain.vb code window, you will find an “Import” region. Add the following lines to that region:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Imports System.IO      &lt;br /&gt;Imports System.Text&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Just after the Partial Class declaration, add the variable declaration for the bDebug variable (the Dim statement below):&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Partial Public Class ScriptMain      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Dim bDebug As Boolean&lt;/font&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Replace the code in Public Sub Main with the following:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; Public Sub Main()&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 1: detect Debug setting...      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bDebug = Convert.ToBoolean(Dts.Variables(&amp;quot;Debug&amp;quot;).Value)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 2: declare and initialize variables...      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 2a: generic variables...       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim sPackageName As String = Dts.Variables(&amp;quot;PackageName&amp;quot;).Value.ToString       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim sTaskName As String = Dts.Variables(&amp;quot;TaskName&amp;quot;).Value.ToString       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim sSubComponent As String = sPackageName &amp;amp; &amp;quot;.&amp;quot; &amp;amp; sTaskName       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim sMsg As String       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 2b: task-specific variables...       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim sExtractFilePath As String = Dts.Variables(&amp;quot;ExtractFilePath&amp;quot;).Value.ToString       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim iRecordCount As Integer = Convert.ToInt32(Dts.Variables(&amp;quot;RecordCount&amp;quot;).Value)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim sAmountSum As String = Dts.Variables(&amp;quot;AmountSum&amp;quot;).Value.ToString       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim sDateFormat As String = Dts.Variables(&amp;quot;DateFormat&amp;quot;).Value.ToString       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim sDelimiter As String = Dts.Variables(&amp;quot;Delimiter&amp;quot;).Value.ToString       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim sLastUpdateDateTime As String= _       &lt;br /&gt;Strings.Format(Dts.Variables(&amp;quot;LastUpdateDateTime&amp;quot;).Value, sDateFormat) _       &lt;br /&gt;'&amp;quot;yyyy/MM/dd hh:mm:ss.fff&amp;quot;)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim sFooterRow As String       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim s As Integer = 0&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 3: log values...      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sMsg = &amp;quot;Package Name.Task Name: &amp;quot; &amp;amp; sSubComponent &amp;amp; ControlChars.CrLf &amp;amp; _       &lt;br /&gt;ControlChars.CrLf &amp;amp; _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Extract File Path: &amp;quot; &amp;amp; sExtractFilePath &amp;amp; ControlChars.CrLf &amp;amp; _       &lt;br /&gt;ControlChars.CrLf &amp;amp; _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Record Count: &amp;quot; &amp;amp; iRecordCount.ToString &amp;amp; ControlChars.CrLf &amp;amp; _       &lt;br /&gt;ControlChars.CrLf &amp;amp; _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Amount Sum: &amp;quot; &amp;amp; sAmountSum &amp;amp; ControlChars.CrLf &amp;amp; ControlChars.CrLf &amp;amp; _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Date Format: &amp;quot; &amp;amp; sDateFormat &amp;amp; ControlChars.CrLf &amp;amp; ControlChars.CrLf &amp;amp; _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Delimiter: &amp;quot; &amp;amp; sDelimiter &amp;amp; ControlChars.CrLf &amp;amp; ControlChars.CrLf &amp;amp; _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;LastUpdateDateTime: &amp;quot; &amp;amp; sLastUpdateDateTime &amp;amp; ControlChars.CrLf &amp;amp; _       &lt;br /&gt;ControlChars.CrLf &amp;amp; _       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Debug: &amp;quot; &amp;amp; bDebug.ToString       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dts.Events.FireInformation(0, sSubComponent, sMsg, &amp;quot;&amp;quot;, 0, True)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If bDebug Then MsgBox(sMsg)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 4: create footer row...      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sFooterRow = iRecordCount.ToString &amp;amp; sDelimiter &amp;amp; sAmountSum &amp;amp; sDelimiter &amp;amp; _       &lt;br /&gt;sLastUpdateDateTime       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 5: log...       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sMsg = &amp;quot;Footer Row: &amp;quot; &amp;amp; sFooterRow       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dts.Events.FireInformation(0, sSubComponent, sMsg, &amp;quot;&amp;quot;, 0, True)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If bDebug Then MsgBox(sMsg)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 6: check if the file is in use...      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; While FileInUse(sExtractFilePath)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 6a: if file is in use, sleep for a second...       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.Threading.Thread.Sleep(1000)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 6b: incrementor...       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; s += 1       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 6c: if incrementor reaches 10 (10 seconds),       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If s &amp;gt; 10 Then       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' exit the loop...       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Exit While       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End If 's &amp;gt; 10       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End While 'FileInUse(sExtractFilePath)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 7: log...       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If s = 1 Then       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sMsg = &amp;quot;File was in use &amp;quot; &amp;amp; s.ToString &amp;amp; &amp;quot; time.&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Else ' s = 1       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sMsg = &amp;quot;File was in use &amp;quot; &amp;amp; s.ToString &amp;amp; &amp;quot; times.&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End If ' s = 1       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dts.Events.FireInformation(0, sSubComponent, sMsg, &amp;quot;&amp;quot;, 0, True)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If bDebug Then MsgBox(sMsg)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 8: if the file exists...      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If File.Exists(sExtractFilePath) Then       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Try       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 8a: open it for append, encoded as built, using a streamwriter...       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim writer As StreamWriter = New StreamWriter(sExtractFilePath, True, _       &lt;br /&gt;Encoding.Default)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 8b: add the footer row...       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; writer.WriteLine(sFooterRow)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 8c: clean up...       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; writer.Flush()       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 8d: get out...       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; writer.Close()       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 8e: log...       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sMsg = &amp;quot;File &amp;quot; &amp;amp; sExtractFilePath &amp;amp; &amp;quot; exists and the footer row has &amp;quot; &amp;amp; _       &lt;br /&gt;&amp;quot;been appended.&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dts.Events.FireInformation(0, sSubComponent, sMsg, &amp;quot;&amp;quot;, 0, True)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If bDebug Then MsgBox(sMsg)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Catch ex As Exception       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 8f: log...       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sMsg = &amp;quot;Issue with appending footer row to &amp;quot; &amp;amp; sExtractFilePath &amp;amp; _       &lt;br /&gt;&amp;quot; file: &amp;quot; &amp;amp; ControlChars.CrLf &amp;amp; ex.Message       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dts.Events.FireInformation(0, sSubComponent, sMsg, &amp;quot;&amp;quot;, 0, True)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If bDebug Then MsgBox(sMsg)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End Try       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Else       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ' 8g: log...       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sMsg = &amp;quot;Cannot find file: &amp;quot; &amp;amp; sExtractFilePath       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dts.Events.FireInformation(0, sSubComponent, sMsg, &amp;quot;&amp;quot;, 0, True)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If bDebug Then MsgBox(sMsg)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End If ' File.Exists(sExtractFilePath)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; '&amp;#160; 9: return success...      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dts.TaskResult = ScriptResults.Success&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; End Sub&lt;/font&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Add the following function after Public Sub Main():&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; Function FileInUse(ByVal sFile As String) As Boolean&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If File.Exists(sFile) Then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Try       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim f As Integer = FreeFile()       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; FileOpen(f, sFile, OpenMode.Binary, OpenAccess.ReadWrite, _       &lt;br /&gt;OpenShare.LockReadWrite)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; FileClose(f)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Catch ex As Exception       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Return True       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End Try       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End If       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; End Function&lt;/font&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;This script builds the footer row and appends it to the Extract file. The first thing we do – at the comment labeled 1 – is assign a value to the Debug variable. I use the Debug variable to control message boxes displaying variable values and other pertinent information. I describe why in the chapter on Execution Patterns.&lt;/p&gt;  &lt;p&gt;At comment 2, we declare and initialize variables. I break variables into two categories: generic and task-specific variables. At comment 3, we build a message in the variable sMsg. This message contains the values of each variable used in the Script thus far. If we are running in Debug mode (if bDebug is True), the code displays a message box (via the MsgBox function) containing the contents of sMsg. Whether we’re running in Debug Mode or not, I use the Dts.Events.FireInformation method to raise an OnInformation event, passing it the contents of sMsg. This means the information is always logged and is optionally displayed by a message box. I like options (a lot).&lt;/p&gt;  &lt;p&gt;Comment 4 has us constructing the actual footer row and placing its text in the String variable sFooterRow. Note the delimiter is also dynamic. The String variable sDelimiter contains the value passed to the WriteFileFooter into the Package Parameter named $Package::Delimiter. At comment 5, we log the contents of the footer row.&lt;/p&gt;  &lt;p&gt;At comment 6, we initiate a check to make sure the Extract File is not marked as “in use” by the operating system. There are many ways to detect the state of the file in the file system, so I created a Boolean function named FileInUse to encapsulate this test. If the function I created doesn’t work for you, you can construct your own. If the file is in use, the code initiates a While loop that sleeps the thread for one second. Each iteration through the loop causes the variable s (the incrementor in this example) to increment at comment 6b. If s exceeds ten, the loop exits. We will only wait 10 seconds for the file to be usable. Note that if the file remains in use at this juncture, we still move on. We'll deal with the file in use matter later, but we will not hang ourselves in a potentially endless loop waiting for the file’s availability. We will instead fail. Whether the file is in use or not in use, the script logs its state at comment 7.&lt;/p&gt;  &lt;p&gt;At comment 8, we check for the existence of the file and begin a Try-Catch. If the file doesn’t exist, I opt to log a status message (via Dts.Events.FireInformation) and continue (see comment 8g). The Try-Catch enforces the final test of the file’s usability. If the file remains in use here, the Catch fires and logs the status message at comment 8f. At 8f and / or 8g, you may very well decide to raise an error using the Dts.Events.FireError method. Raising an error causes the Script Task to fail, and you may want this to happen. At comments 8a through 8d, we open the file, append the footer row, close the file, and clean up. At comment 8e, the code logs a status message. If anything fails when executing 8a through 8e, code execution jumps to the Catch block. &lt;/p&gt;  &lt;p&gt;If all goes well, the code returns Success to the SSIS Control Flow via the Dts.TaskResult function (comment 9).    &lt;br /&gt;The Script Task does all the work in this pattern.&lt;/p&gt;  &lt;p&gt;I created a test package called TestParent.dtsx to test this package. The package has variables that align with the parameters of the WriteFileFooter.dtsx package, as shown in Figure 7-22:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/andy_leonard/image_3C5DD9A9.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/andy_leonard/image_thumb_43B99956.png" width="244" height="84" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;em&gt;Figure 7-22. Variables in the TestParent.dtsx Package&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;If you’re playing along at home, you should adjust the path of the ExtractFooterFilePath variable.    &lt;br /&gt;I added a Sequence Container named “seq Test WriteFileFooter” and included an Execute Package Task named “ept Execute WriteFileFooter Package.” On the Package page of the Execute Package Task Editor, set the ReferenceType property to “Project Reference” and select WriteFileFooter.dtsx from the PackageNameFromProjectReference property dropdown. Map the TestParent package variables to the WriteFileFooter package parameters as shown in Figure 7-23:     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/andy_leonard/image_21155ADB.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/andy_leonard/image_thumb_094DFDA8.png" width="244" height="128" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;em&gt;Figure 7-23. Mapping Package Parameters&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Execute TestParent.dtsx to test the functionality. The package executes successfully and the footer row is appended to the file as shown in Figure 7-24:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/andy_leonard/image_6062E89E.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://sqlblog.com/blogs/andy_leonard/image_thumb_75FD213B.png" width="244" height="90" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;em&gt;Figure 7-24. Mission Accomplished&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Interesting stuff? I think so but I’m biased; I wrote it! You can get more in the &lt;a href="http://www.amazon.com/SSIS-Design-Patterns-Matt-Masson/dp/1430237716" target="_blank"&gt;SSIS Design Patterns&lt;/a&gt; book and by attending the &lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3159" target="_blank"&gt;SSIS Design Patterns day-long pre-conference session&lt;/a&gt; at the &lt;a href="http://www.sqlpass.org/summit/2012" target="_blank"&gt;PASS Summit 2012&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;:{&amp;gt;&lt;/p&gt;</description></item><item><title>Join the Authors of SSIS Design Patterns at the PASS Summit 2012!</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2012/09/19/join-the-authors-of-ssis-design-patterns-at-the-pass-summit-2012.aspx</link><pubDate>Wed, 19 Sep 2012 09:00:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:45232</guid><dc:creator>andyleonard</dc:creator><description>&lt;p&gt;My fellow authors and I will be presenting a day-long pre-conference session titled &lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3159" target="_blank"&gt;SSIS Design Patterns&lt;/a&gt; at the &lt;a href="http://www.sqlpass.org/summit/2012/" target="_blank"&gt;PASS Summit 2012&lt;/a&gt; in Seattle Monday 5 Nov 2012!&lt;/p&gt;  &lt;p&gt;&lt;a href="https://www.regonline.com/register/checkin.aspx?MethodId=0&amp;amp;eventsessionId=c09266791bfa4138b026b094a3a7eb89&amp;amp;eventID=1018613" target="_blank"&gt;Register&lt;/a&gt; to learn patterns for:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Package execution&lt;/li&gt;    &lt;li&gt;Package logging&lt;/li&gt;    &lt;li&gt;Loading flat file sources &lt;/li&gt;    &lt;li&gt;Loading XML sources&lt;/li&gt;    &lt;li&gt;Loading the cloud&lt;/li&gt;    &lt;li&gt;Dynamic package generation&lt;/li&gt;    &lt;li&gt;SSIS Frameworks&lt;/li&gt;    &lt;li&gt;Data warehouse ETL&lt;/li&gt;    &lt;li&gt;Data flow performance&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Presenting this session:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SpeakerDetails.aspx?spid=448" target="_blank"&gt;Matt Masson&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SpeakerDetails.aspx?spid=41" target="_blank"&gt;Tim Mitchell&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SpeakerDetails.aspx?spid=366" target="_blank"&gt;Jessica Moss&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SpeakerDetails.aspx?spid=941" target="_blank"&gt;Michelle Ufford&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SpeakerDetails.aspx?spid=195" target="_blank"&gt;Andy Leonard&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I hope to see you in Seattle! If you read this blog and attend our session or see me wandering around, please introduce yourself. I am the fat guy with a fu.&lt;/p&gt;  &lt;p&gt;:{&amp;gt;&lt;/p&gt;</description></item><item><title>Book Review: SSIS Design Patterns</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2012/09/17/book-review-ssis-design-patterns.aspx</link><pubDate>Mon, 17 Sep 2012 13:05:56 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:45231</guid><dc:creator>andyleonard</dc:creator><description>&lt;p&gt;Samuel Vanga (&lt;a href="http://svangasql.wordpress.com" target="_blank"&gt;Blog&lt;/a&gt; | &lt;a href="http://twitter.com/SamuelVanga" target="_blank"&gt;@SamuelVanga&lt;/a&gt;) has posted &lt;a href="http://svangasql.wordpress.com/2012/09/14/book-review-sql-server-2012-integration-services-design-patterns/" target="_blank"&gt;a review of our new book&lt;/a&gt; &lt;a href="http://www.amazon.com/SSIS-Design-Patterns-Matt-Masson/dp/1430237716" target="_blank"&gt;SSIS Design Patterns&lt;/a&gt; at his &lt;a href="http://svangasql.wordpress.com/2012/09/14/book-review-sql-server-2012-integration-services-design-patterns/" target="_blank"&gt;blog&lt;/a&gt;. Several of Sam’s statements struck me, but none more than this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Within a few hours of reading &lt;/em&gt;&lt;a href="http://www.amazon.com/Server-Integration-Services-Design-Patterns/dp/1430237716"&gt;&lt;em&gt;SQL Server 2012 Integration Services Design Patterns&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, it stood out that none of the authors were trying to impress by showing what they all know in SSIS. Instead, they focused on describing solutions and patterns in a great detail (exactly why I paid for).&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Sam mentions he could not locate the source code, a concern mentioned by others who have emailed me. Links source code is located on the &lt;a href="http://www.apress.com/9781430237716" target="_blank"&gt;Apress Home Page for SSIS Design Patterns&lt;/a&gt; shown here:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/andy_leonard/SNAG-0068_038ED9A0.jpg"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SNAG-0068" border="0" alt="SNAG-0068" src="http://sqlblog.com/blogs/andy_leonard/SNAG-0068_thumb_471664F5.jpg" width="244" height="140" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;I do not like this page design because it has a link at the top called “Source Code” and that link does &lt;em&gt;not&lt;/em&gt; take you to the source code for this book, but rather to a page that describes Apress’ source code supplied with books. &lt;/p&gt;  &lt;p&gt;The &lt;a href="http://www.apress.com/downloadable/download/sample/sample_id/1327/" target="_blank"&gt;link to the source code for SSIS Design Patterns&lt;/a&gt; is down the page a bit, shown here:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/andy_leonard/SNAG-0069_314C7C98.jpg"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SNAG-0069" border="0" alt="SNAG-0069" src="http://sqlblog.com/blogs/andy_leonard/SNAG-0069_thumb_1C7A8418.jpg" width="244" height="154" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I appreciate Samuel’s review and hope his experience is shared by many!&lt;/p&gt;  &lt;p&gt;:{&amp;gt;&lt;/p&gt;</description></item><item><title>Learn SSIS from the Authors of SSIS Design Patterns at the PASS Summit 2012!</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2012/08/22/learn-ssis-from-the-authors-of-ssis-design-patterns-at-the-pass-summit-2012.aspx</link><pubDate>Wed, 22 Aug 2012 11:00:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:44778</guid><dc:creator>andyleonard</dc:creator><description>&lt;p&gt;&lt;a href="http://www.amazon.com/SSIS-Design-Patterns-Matt-Masson/dp/1430237716" target="_blank"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SSISDesignPatterns" border="0" alt="SSISDesignPatterns" src="http://sqlblog.com/blogs/andy_leonard/SSISDesignPatterns_643F2E5D.jpg" width="244" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Jessica Moss (&lt;a href="http://jessicammoss.com/" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="http://twitter.com/jessicammoss" target="_blank"&gt;@jessicammoss&lt;/a&gt;), Michelle Ufford (&lt;a href="http://sqlfool.com/" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="http://twitter.com/sqlfool" target="_blank"&gt;@sqlfool&lt;/a&gt;), Tim Mitchell (&lt;a href="http://www.timmitchell.net/" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="http://twitter.com/tim_mitchell" target="_blank"&gt;@tim_mitchell&lt;/a&gt;), Matt Masson (&lt;a href="http://mattmasson.com/" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="mailto:|@mattmasson" target="_blank"&gt;@mattmasson&lt;/a&gt;), and me – we are &lt;em&gt;all&lt;/em&gt; presenting the &lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3159" target="_blank"&gt;SSIS Design Patterns pre-conference&lt;/a&gt; session at the &lt;a href="http://www.sqlpass.org/summit/2012/" target="_blank"&gt;PASS Summit 2012&lt;/a&gt;! We will be covering material from, and based upon, the book. &lt;/p&gt;  &lt;p&gt;We will describe and demonstrate patterns for package execution, package logging, loading flat file and XML sources, loading the cloud, dynamic package generation, SSIS Frameworks, data warehouse ETL, data flow performance, and more!&lt;/p&gt;  &lt;p&gt;Join us – &lt;a href="https://www.regonline.com/register/checkin.aspx?MethodId=0&amp;amp;eventsessionId=c09266791bfa4138b026b094a3a7eb89&amp;amp;eventID=1018613" target="_blank"&gt;register today&lt;/a&gt;!&lt;/p&gt;  &lt;p&gt;:{&amp;gt;&lt;/p&gt;</description></item><item><title>Presenting at Ohio North SQL Server User Group 1 May 2012!</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2012/04/20/presenting-at-ohio-north-sql-server-user-group-1-may-2012.aspx</link><pubDate>Fri, 20 Apr 2012 15:01:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:42908</guid><dc:creator>andyleonard</dc:creator><description>&lt;p&gt;I am honored to present Using BIML as an SSIS Design Patterns Engine to the &lt;a href="http://www.ohionorthsqlserverug.org/" target="_blank"&gt;Ohio North SQL Server User Group&lt;/a&gt; 1 May 2012! This presentation is based on one of my favorite chapters in the upcoming book: &lt;a href="http://www.amazon.com/SSIS-Design-Patterns-Matt-Masson/dp/1430237716" target="_blank"&gt;SSIS Design Patterns&lt;/a&gt; scheduled for release this summer. &lt;/p&gt;  &lt;p&gt;If you find yourself in the Cleveland area on the evening of 1 May, please drop by and introduce yourself. I am the fat guy with a fu.&lt;/p&gt;  &lt;p&gt;:{&amp;gt;&lt;/p&gt;</description></item><item><title>Updated SSIS Framework, Now Includes Reports</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2012/03/07/updated-ssis-framework-now-includes-reports.aspx</link><pubDate>Wed, 07 Mar 2012 12:00:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:42149</guid><dc:creator>andyleonard</dc:creator><description>&lt;p&gt;I have built a beta version of &lt;a href="http://linchpinpeople.com" target="_blank"&gt;Linchpin People&lt;/a&gt;’s SSIS Framework, now including much-requested reports. You can grab the updated copy &lt;a href="http://andyleonard.me/wp3/wp-content/uploads/2012/03/SSISConfigFrameworkAndReports_20120306.zip"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;I appreciate any feedback you care to share.&lt;/p&gt;  &lt;p&gt;:{&amp;gt;&lt;/p&gt;</description></item><item><title>Designing an SSIS Framework</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2011/09/16/designing-an-ssis-framework.aspx</link><pubDate>Fri, 16 Sep 2011 11:00:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:38495</guid><dc:creator>andyleonard</dc:creator><description>&lt;p&gt;In preparation for &lt;a href="http://www.sqlsaturday.com/84/eventhome.aspx" target="_blank"&gt;SQL Saturday #84 – Kalamazoo&lt;/a&gt;,&amp;nbsp; &lt;a href="http://sqlbits.com" target="_blank"&gt;SQLBits 9&lt;/a&gt;, and the &lt;a href="http://www.sqlpass.org/summit/2011/" target="_blank"&gt;PASS Summit 2011&lt;/a&gt;; I’ve been honing my presentation called Designing an SSIS Framework. I delivered this presentation a few times over the past couple months. Each time, I promised the attendees I’d send them the code if they emailed me… and a couple things got in the way:&lt;/p&gt;
  
&lt;p&gt;First, a &lt;em&gt;lot&lt;/em&gt; of people requested the presentation. Second, I got really busy! Both of those beat their respective alternatives.&lt;/p&gt;
  
&lt;p&gt;I finished building and barely testing the code this evening. You can grab an &lt;em&gt;updated&lt;/em&gt;&amp;nbsp;copy &lt;a href="http://andyleonard.me/wp3/wp-content/uploads/2012/03/SSISConfigFrameworkAndReports_20120306.zip" target="_blank"&gt;here&lt;/a&gt;. The zip file contains the SSIS 2008 R2 solution and two other folders: Config and Sql. Config holds a configuration file that points to a database named SSISConfig on the default instance of your local workstation or server (edit SSISConfigParent.dtsConfig if you want to change this location). &lt;/p&gt;
  
&lt;p&gt;To make it all work dynamically, you need to create a System Environment Variable named SSISConfig (case-sensitive) and set the value to the full path of SSISConfigParent.dtsConfig on your workstation or server. Next, run the “Create SSISConfig.sql” script in the Sql folder, followed by the “Add An SSIS Applications.sql” script (edited to reflect the folder that contains the SSIS packages on your workstation or server). This should get everything ready for the SSISConfig SSIS solution. When you execute Parent.dtsx, it should call Template1.dtsx, then Template2.dtsx, and finally ErrorTest.dtsx. &lt;/p&gt;
  
&lt;p&gt;Let me know how it goes!&lt;/p&gt;
  
&lt;p&gt;:{&amp;gt;&lt;/p&gt;</description></item><item><title>Presenting at SQL Saturday #84–Kalamazoo 17 Sep 2011!</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2011/09/07/presenting-at-sql-saturday-84-kalamazoo-17-sep-2011.aspx</link><pubDate>Wed, 07 Sep 2011 21:00:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:38333</guid><dc:creator>andyleonard</dc:creator><description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I am honored to present &lt;a href="http://www.sqlsaturday.com/viewsession.aspx?sat=84&amp;amp;sessionid=4538" target="_blank"&gt;Designing an SSIS Framework&lt;/a&gt; and &lt;a href="http://www.sqlsaturday.com/viewsession.aspx?sat=84&amp;amp;sessionid=4537" target="_blank"&gt;“I See a Control Flow. Now What?”&lt;/a&gt; at &lt;a href="http://www.sqlsaturday.com/84/eventhome.aspx" target="_blank"&gt;SQL Saturday #84 in Kalamazoo Michigan&lt;/a&gt; 17 Sep 2011!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;I See a Control Flow. Now What?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This highly-interactive, demo-intense presentation is for beginners and developers just getting started with SSIS. Attend and learn how to build SSIS packages from the ground up.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Designing an SSIS Framework&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In this “demo-tastic” presentation, SSIS trainer, author, and consultant Andy Leonard explains the what, why, and how of an SSIS framework that delivers metadata-driven package execution, connections management, and centralizes logging. Key takeaways: 1) Developers can migrate packages from Development, through their lifecycle, to Production without editing SSIS Connection Managers properties. 2) A metadata-driven approach to SSIS package execution. 3) Demonstration of a centralized logging reporting application.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you will be attending SQL Saturday #84 and read this blog, please introduce yourself! I’m the fat guy with a fu…&lt;/p&gt;  &lt;p&gt;:{&amp;gt;&lt;/p&gt;</description></item><item><title>Presenting at Hampton Roads SQL Server and SharePoint Users Group Tomorrow!</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2011/07/19/presenting-at-hampton-roads-sql-server-and-sharepoint-users-group-tomorrow.aspx</link><pubDate>Tue, 19 Jul 2011 16:58:14 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37120</guid><dc:creator>andyleonard</dc:creator><description>&lt;p&gt;I am honored to present Designing an SSIS Framework to Hampton Roads SQL Server and SharePoint Users Group tomorrow, 20 Jul 2011! You can &lt;a href="http://hrssugjuly.eventbrite.com/" target="_blank"&gt;register here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Details:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Infotec     &lt;br /&gt;100 Constitution Dr       &lt;br /&gt;Virginia Beach, VA 23462&lt;/p&gt;    &lt;p&gt;Wednesday, July 20, 2011 at 6:30 PM (ET)&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If you read this blog and will be there, introduce yourself! I’m the fat guy with a fu.&lt;/p&gt;  &lt;p&gt;:{&amp;gt;&lt;/p&gt;</description></item></channel></rss>