Chapter 4. Containers

In the last chapter, you read about tasks and how they interact in the Control Flow. There was one critical piece that was left out of that discussion. Containers are objects that help SSIS provide structure to one or more tasks. They can help you loop through a set of tasks until a criterion has been met or can help you group a set of tasks logically. Containers can also be nested, containing other containers. Containers are set in the Control Flow tab in the Package Designer. There are four types of containers in the Control Flow tab: Task Host, Sequence, For Loop, and Foreach Loop Containers.

Task Host Containers

The Task Host Container is the default container that single tasks fall into. You'll notice that this type of container is not in the Toolbox in Visual Studio, and is implicitly given to each task. In fact, even if you don't specify a container for a task, it will be placed in a Task Host Container. The SSIS architecture extends variables and event handlers to the task through the Task Host Container.

Sequence Containers

Sequence Containers handle the flow of a subset of a package and can help you divide a package into smaller, more manageable pieces. Some nice applications that you can use sequence containers for include the following:

  • Grouping tasks so that you can disable a part of the package that's no longer needed

  • Narrowing the scope of the variable to a container

  • Managing the properties of multiple tasks in one step by setting the properties of ...

Get Professional SQL Server® 2008 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.