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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access