Home > SSIS > Conditional Data-flow

Conditional Data-flow


SSIS has plenty of ways to carry the data from a source to data flow destination. In data transformation, we may in to a situation to split the data from the source to different destination. SSIS is a beautiful tool to handle data row by row.

In this article I will be talking about the conditional split transformation task.

Conditional split transformation task redirect the incoming row to a specific output pipeline based on expressions.

For instance, Postal office categorize mails based on the zip code to make the delivery process much faster

In today’s sample package design, I am going to use conditional split transformation task to redirect the source result set to different destination.

Implementation

Step 1: Create a SSIS package and add a data flow task in to it.

Step 2: Go to data flow environment then add ado.net data source and configure with Adventreworks relational database.

Step 3: During the table selection use Person.Address table as a source table.

Step 4: Add a conditional split task and connect the ado.net source task with conditional split.

Step 5: Add 2 expressions to define the case for the row splitting. In this demo, I have defined two equal (==) conditional expressions to split the rows based on the zip-code.

Step 6: Add Union all task for the testing purpose. Because, Union all task can receive multiple input pipelines.

Step 7: Execute the package and see the output with the data viewer.

Thanks for Reading. Visit Facebook page SQLServerRider.com for the latest update of SQL Server and other Microsoft technology.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: