Datasheet

Chapter 1: Welcome to SQL Server Integration Services
12
before the task is executed and the path followed. The constraint evaluates only the success or failure of
the previous task to determine whether the next step will be executed. The SSIS developer can set the
conditions by using evaluation operators. Once you create a precedence constraint, you can set the
Evaluation Option property to any one of the following options:
Constraint: This is the default setting and specifies that only the constraint will be followed in
the workflow.
Expression: This option gives you the ability to write an expression (much like VB.NET) that
allows you to control the workflow based on conditions that you specify.
ExpressionAndConstraint: Specifies that both the expression and the constraint must be met
before proceeding.
ExpressionOrConstraint: Specifies that either the expression or the constraint can be met before
proceeding.
In Figure 1 - 6, you can see an example that contains three tasks. In this example, the package first
attempts the copying of files using the File System Task. If this prior task is successful and meets the
expression criteria for a good file to transfer, the package will divert to the Data Flow Task to transform
the files. However, if the first step fails, a message will be sent to the user using the Send Mail Task. You
can also see in the graphic a small fx icon above the Data Flow Task and on the precedence constraint.
This is the graphical representation for a conditional expression and visually informs that this task will
not execute unless an expression has also been met. The expression can check anything, such as looking
at a checksum, before running the Data Flow Task.
❑
❑
❑
❑
Figure 1-6
Containers
Containers are a core unit in the SSIS architecture to group tasks together logically into units of work.
Besides providing visual consistency, containers allow you to define variables and event handlers (these
are discussed in a moment) within the scope of the container instead of the package. There are four types
of containers in SSIS:
Task Host Container: The core type of container implements the basic interface to which
every task implicitly belongs by default. The SSIS architecture extends variables and event
handlers to the task through the Task Host Container.
The Task Host Container is not a visible element that you ’ ll find in the Toolbox, but is an abstract
concept like an interface.
❑
c01.indd 12c01.indd 12 8/28/08 12:01:19 PM8/28/08 12:01:19 PM