Archive

Archive for the ‘Script Tasks’ Category

SSIS : Using and Configuring For Loop Container

July 5, 2014 Leave a comment

What is For Loop Container?

For loop defines a repeating control flow. It has similar behavior as the “FOR” loop available in programming languages.  The For Loop container uses 3 expressions as definition

  1. Initialization expression:  it assigns value to the loop counters. This expression is optional.
  2. Evaluation expression : It contains the expression to test whether the loop should continue executing  or exit.
  3. An optional iteration expression that increments or decrements the loop counter.

The expressions used must be valid SSIS expression. A variable is generally used in the expression.

Using and Configuring For Loop Container

(Task in hand: print counter variable value for each iteration times.)

Drag a for loop container into the SSIS Control flow window from the Toolbox. Double click on the for loop container to view the “For Loop Editor”. As mentioned earlier it contains 3 expressions. Now create a variable by name “TestVariable” of type “int32”.

Use this variable as counter in the container using expressions as shown below.

Read more…

 

 

Advertisements

SSIS : Sequence Container

July 5, 2011 Leave a comment

Sequence containers is used to group the package into multiple separate control flows, each containing one or more tasks and containers that run within the overall package control flow. There are several advantages in using sequence container

  1. Provides facility to set property of multiple tasks by setting the property of sequence container.
  2. Provides the facility of disabling groups of tasks to focus debugging on one subset of the package control flow.
  1. Scope for variables that a group of related tasks and containers use can be controlled easily.
  2. Managing and visualization of group of tasks becomes easier using sequence container.
  3. We can also expand and collapse the container, hence making the package look neat.

Using Sequence Container

Create a new SSIS package ( refer video to create new SSIS package). Drag the sequence container from the toolbox on the left hand side into the package.

Read more…