blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

SSIS Junkie

Conchango are busy and need talented consultants in and around London. Interested? Email me or send me a message

SSIS: Team Development Experiences

Recently on this blog I mentioned in passing that I have been working for some considerable time now on a project with multiple SSIS developers. A few people asked me if I could give a rundown of how we went about this, any experiences of team development I could pass on, and any pitfalls that I had learnt about. That's what this blog post is all about.

 

Scene setting first. In August 2006 I started on a project where I headed up a team of 3, occasionally 4, SSIS developers. Our go-live date passed a couple of weeks ago without too many hitches and in the intervening 11 months we have built a system that extracts data from 5 (3 Oracle, 2 SQL Server) systems of record (SoRs) and pushes it all into the most ridiculously complicated data model known to mankind (not my choice - trust me). Our system employs 36 SSIS packages collectively executed nightly by two SQL Server Agent jobs. We employ Team Foundation Server (TFS) as our work tracking and source control system and have a continuous integration build process that bundles up all our SSIS packages, SSIS configuration files, environment variables and folder structure into a single, deployable, parameterizable Microsoft Installer (MSI) file that we can execute against any of our environments (of which we have 4 - development, system testing, user acceptance testing, production). Our system pushes approximately 1million rows of data a night and due to a backloading effort that we undertook prior to our go-live date we now have 29million fact data rows in our data cache. Not massive volumes but not insignificant.

 

OK, so that gives you an idea of what I have been working on and what my team has achieved. The point of this blog entry is to share learnings on how we achieved it, for better or worse. Off we go.

  • Use a source control system. Hopefully that's a given.
  • SSIS packages are effectively binary files - you can't really look at the XML code in a .dtsx file and understand what the package does. A downside of this is that merging changes made by two developers is not possible using a merge tool (the like of which appears in TFS). Hence, I try to impress upon my team the need to download the latest copy of all the packages on a regular basis (I suggest every morning) so that they are always working on the latest copy of a package.
  • Following on from the earlier points about (a) the inability for two developers to work on the same package and (b) the inability to merge changes, I recommend to my team that when they check-out a package from source control they take an exclusive lock on it. As you can see from the screenshot below this isn't the default in TFS.

 

  • As you have just read we have built a lot of packages. This was deliberate. A SSIS package can only be worked on by one developer at a time - this isn't like developing object oriented code where a class can be partial and thus worked on by multiple developers concurrently. This presents problems if you have a lot of functionality that you want to cram into your package so instead we made a decision to build many smaller packages with limited functionality in each. In essence this all means that we have a system that is greater than the sum of its parts and naturally implies that we make heavy use of the Execute Package Task. A small number of monolithic packages is not the way to go.
  • If you only take one piece of advice from this blog entry make sure its this - use templates; they are vital in a multi-developer environment. Templates are the only built-in mechanism for enabling common approaches to those mundane but necessary aspects of SSIS development like logging, annotating, checkpointing and configuration. Spend time at the beginning of your project deciding how you are going to accomplish logging, checkpointing and configuration and build an appropriate template to support those decisions. I have provided an example template here. Don't leave home without one.
  • If you need to store passwords set package property ProtectionLevel='DontSaveSensitive' and do so in your template. This ensures you don't run into entanglements with developers not being able to open or use packages built by someone else.
  • When you are building many packages it is easy to forget what each one does and the context in which it is used so use a sensible naming convention to clearly differentiate your packages. I have suggested one here but you can probably come up with your own.
  • Maintain a list of development practices that all developers should follow. Write a checklist that a developer should run through prior to each check-in and make sure they pin it up somewhere near their monitor. On my project we have a project wiki and I like to maintain these development practices and checklist on there.
  • Insist that packages are annotated properly - make them self-documenting. Developers can place annotations onto the design surface - use them. In fact, put skeleton annotations into your template contianing instructions on what the developer(s) should write. Each object within a SSIS package has a 'Description' property. Fill those in as well.
  • Use a work item tracking tool so that you know which developer made which changes. As I have alluded to a number of times in this post I highly recommend buying a copy of TFS.
  • Use separate projects to group together packages that work in concert with each other or collectively achieve a single goal. Don't be afraid to introduce more projects but only do so where it makes sense to. If you can, use a single solution for all your SSIS packages.

If I think of any more then I shall add them up here later. In the meantime, feel free to pass on your own experiences in the comments section below.

-Jamie

 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Simone Greci said:

Hello Jamie,

wich kind of storage do you adopted for this project? Do you prefer file system or SSIS Storage?

Bye :-)

August 7, 2007 13:44
 

jamie.thomson said:

August 7, 2007 15:52
 

Kory Skistad said:

Great information Jamie- just what I was looking for.

I've also noticed (maybe just me) but when I use a template package, I had to remember to change the GUID of the package because everytime I made a copy of the same package, it used the same GUID.  Also, the I would have to change the package name as well (not the file name, but the name property of the package).

I found out when I deployed a package to SQL Server and executed it from within SSMS, it was actually running the wrong package!  I'm not sure if this was because the GUID was the same, or the name was the same.  In any case, I double checked my SSIS project and had 6 out of 10 packages with the same GUID (three had the same name property as well), all because I copied from a template file.

What is your experience with this?

-Kory

August 7, 2007 21:22
 

jamie.thomson said:

Kory,

You're absolutely correct. That's why I wrote this:

New suggestion for templates in Katmai

(http://blogs.conchango.com/jamiethomson/archive/2007/05/15/SSIS_3A00_-New-suggestion-for-templates-in-Katmai.aspx)

I'm glad you found this entry useful. You're the guy I wrote it for :)

-Jamie

August 7, 2007 21:31
 

KoryS said:

Thanks :)

Also- I've noticed the Dtutil.exe contains the /I option which generates a new GUID, so if you use dtutil as part of your deploy script, it will generate a new ID for you each time it runs.

-Kory

August 8, 2007 00:06
 

jaisheel410 said:

I am trying to add a custom dll(IncrementTask avalilable in SQL Server DTS Samples)

as an executable(Task) to an SSIS package.

The following console application consumes the Custom dll:

using System;

using Microsoft.SqlServer.Dts.Runtime;

using Microsoft.SqlServer.Dts.Tasks.FileSystemTask;

using Microsoft.SqlServer.Dts.Samples;

using Microsoft.Samples.SqlServer.Dts;

namespace Microsoft.SqlServer.Dts.Samples

{

   class Program

   {

       static void Main(string[] args)

       {

           Package p = new Package();

           // Add a File System task to the package.

           //This Line of code works fine.

//TaskHost execPkghost = (TaskHost)p.Executables.Add("STOCKQLTask");

//This line throws the following error: Object reference not set to an instance of an object.

TaskHost execPkghost = (TaskHost)p.Executables.Add("Microsoft.Samples.SqlServer.Dts.IncrementTaskUI,IncrementTaskCS,

Version=1.0.0.0,Culture=Neutral,PublicKeyToken=b23be0feabed1355");

           TaskHost thFileSystemTask = execPkghost as TaskHost;

           // Iterate through the package Executables collection.

           Executables pExecs = p.Executables;

           foreach (Executable pExec in pExecs)

           {

               TaskHost taskHost = (TaskHost)pExec;

               Console.WriteLine("Type {0}", taskHost.InnerObject.ToString());

           }

           Console.Read();

       }

   }

}

I am getting a runtime error that "object reference has not been set to an instance of the object".

Any help on this is higly appreciated.

August 8, 2007 21:33
 

jamie.thomson said:

jaisheel410,

Your question has got nothing to do with this blog entry so expect that the next time you check back here it (and the comment I'm writing right now) will have been deleted.

You should address your question to the SSIS forum.

-Jamie

August 8, 2007 22:14
 

Matt said:

Hi Jamie - thanks for the Blog!

I don't suppose you could share the details of your CI build setup with us?  It sounds like a great way to have the packages all ready for deployment, without developers needing to think about it too much.

September 5, 2007 04:48
 

jamie.thomson said:

Matt,

I can tell you the headlines but the detail isa  blog all of its own I'm afraid Which I plan to get around to - one day.

We use WiX to build installers that deploy our SSIS packages, configurations files and environment variables. I have an insight into how that works (and plan to blog about it soon) but after that my involvement ends. Another guy sets up all the build stuff - I have no knowledge of that.

-Jamie

September 5, 2007 04:55

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

News

Powered by Community Server (Personal Edition), by Telligent Systems