05 ssis control flow

11
SQL Server Integration Services: Control Flow

Upload: slava-kokaev

Post on 31-Oct-2014

22 views

Category:

Documents


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: 05 SSIS Control Flow

SQL Server Integration Services: Control Flow

Page 2: 05 SSIS Control Flow

Defining Control and Data Flow ObjectsThe control flow is the workflow engine that contains control flow tasks, containers, and precedence constraints, which manage when tasks and containers execute.

The data flow, in contrast, is directly related to processing and transforming data from sources to destinations.

Page 3: 05 SSIS Control Flow

Defining Control Flow ObjectsThere are three primary types of control flow objects:Control flow tasks Workflow objects that perform operational-

level jobsControl flow containers Provide a grouping mechanism for

tasks and other containersConstraints Let you connect tasks and containers and define

execution ordering and precedence

Page 4: 05 SSIS Control Flow

Control Flow TasksA control flow task is an SSIS component that performs a high level of operations such as sending an e-mail message, executing a SQL statement, or copying a file from an FTP server. When a control flow task is complete, it either succeeded or failed.

Page 5: 05 SSIS Control Flow

Control Flow ContainersThere are three primary containers in SSIS: a Sequence Container, a For Loop Container, and a Foreach Loop Container.Sequence Container Lets you organize subordinate tasks by grouping them together, and lets you apply transactions or assign logging to the container.For Loop Container Provides the same functionality as the Sequence Container except that it also lets you run the tasks within it multiple times based on an evaluation condition, such as looping from 1 to 10.Foreach Loop Container Also allows looping, but instead of providing a condition expression, you loop over a set of objects, such as files in a folder.

Page 6: 05 SSIS Control Flow

Package VariablesWithin SSIS, there are two types of variables: system variables and user variables.System variables System variables are not editable but can be referenced within tasks and containers. System variables are set by the package for tracking metadata such as the package name and the user that executes the package. User variables You can create and define user variables for any purpose in the package.

User::[VariableName] System::[VariableName]

Page 7: 05 SSIS Control Flow

Understanding a Control Flow

Page 8: 05 SSIS Control Flow

Common Tasks in SSIS

Page 9: 05 SSIS Control Flow

Understanding Control Flow

STEP 1

STEP 2

STEP 3

3. Notify Management if @ > 2

2. Send Email to each Customer

1. Retrieve Customers from DB

Complete Control Flow

Page 10: 05 SSIS Control Flow

Understanding Variables

Full Name Email

User::Full Name User::Email

User::Customer Records

User::Email Counter

Email Counter > 2User::Email Counter

COMPLETE

COMPLETE

STEP 1

STEP 2

STEP 3

Page 11: 05 SSIS Control Flow

ResourcesControl Flow Elements- http://msdn.microsoft.com/en-us/library/ms137681.aspx

Designing Package Control Flow- http://msdn.microsoft.com/en-us/library/ms140234.aspx