Friday 19 December 2014

Conditional Split Transformation in SSIS

Conditional split is used to route data rows to different outputs based on conditions. This is similar to CASE statement in programming languages. The Conditional Split transformation can route data rows to different outputs depending on the content of the data. The implementation of the Conditional Split transformation is similar to a CASE decision structure in a programming language. The transformation evaluates expressions, and based on the results, directs the data row to the specified output. This transformation also provides a default output, so that if a row matches no expression it is directed to the default output.
Step by step example of Conditional Split Transformation
Take data flow task and double click.

In this example I am going to import table records in excel according to the condition. in table I have record of employee details I want to get there records according to gender and marital status. For example male employee may be single or married same as female.
Here I am taking data source as OLEDB and make connection.

Take the Conditional Split Data flow transformation

Double click on the conditional split transformation.



Order: - you can define the order of case.
Output Name: - you can give the name of the case.
Conditional: - here you write the condition according to your requirement.
Click ok.
Here I am taking four cases so I need to take five destinations because of default.


Make the connection of each excel destination.
Execute the package.

Executed successfully.
See the output.



No comments:

Post a Comment

If you have any doubt, please let me know.

Popular Posts