8.2. Reusable Packages

Some developers are familiar with the concept of object-oriented programming (OOP). In OOP, you break up large pieces of a program into its smallest unit of work. So, instead of having one big class file that performed every function in a program, you would, for example, have a class that handled data access. Then, you could refer to this object from any other program, rather than having to re-create the logic over and over again.

In SSIS, you use the concept of parent-and-children packages to perform a similar function, although it's not quite as elegant as OOP. The concept of parent-and-children packages is where you would break up a large SSIS package into smaller packages based on units of work, and then have a parent package tie the children packages together. How large the unit of work in the child package should be is based on a manageability compromise. Oftentimes, SSIS developers will create a package for each table they want to load; at other times they will create a package per subject area. A favorite way to componentize the package is to have one set of packages for the extract and transformation of the data, and another for the final load of data into the final destination. This way, you can stage your data throughout the day without affecting production. Then, when your production window allows, run the load package to move the data into the production database.

As discussed in the previous section, modularization also helps with development ...

Get Expert SQL Server™ 2005 Integration Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.