Welcome Guest
Tanvtech logo
Tanvtech logo
 
SSIS –CONDITIONAL SPLIT
1-Open Microsoft visual studio 2005, File , New Project.

Choose Business Intelligence Projects and then Integration Services Project

Now lets create our first package in SSIS, call it datatransfer.dtsx. In this Package, we will transfer data from excel table to database table and while doing that we will filter, sort data. 1. create connections for source and destination tables Source Excel Table – Give location of Excel file

Destination Excel Table – Give location of Excel file

2. Drag Data Flow Task from toolbox into Control flow


3. Goto Data Flow Tab And Drag Excel Source

Lets preview what we have in Excel file

By looking at data, we noticed two data fields – id and user. Now we will use Conditional Split to filter data based upon id

4. Now drag Excel Destination to load data




Do the needful Mappings

Execute the Package

Based upon our condition id==2 in Conditional Split , there should be only 1 row of data in destination

We also need to delete old data in destination file each time we load new one. For that use File System Task to drop excel table and then use SQL Task to create Excel Table again.


That’s it thanks.
 
© Tanvtech. All Rights Reserved.