Microsoft Integration: SSIS Conditional Split and It's use

 Conditional Split and its use

Aim:

To filter data from CSV (Comma separated value) file and export data in the SQL database table.

Tools required:

  • SSIS tool (SQL server integration services)

  • SSMS tool (SQL server management studio)

  • Source CSV file.


Steps to perfume task:

Step 1:

Set up package with a proper name and make a table in SSMS tool database with a proper name.

SSIS_01.png



Step 2:

Make control flow and set up data flow, configure your data source.

SSIS_02.png

Set up data type of your data in Connection manager editor > Advanced  according to your SQL server data destination table.

SSIS03.png

Step 3:

ADD conditional split in data flow tag from  SSIS toolbox>Common> Conditional Split and double Configure condition for filtering.

SSIS04.png

Here we are filtering data which is from Country United states that why filtering condition is 

Condition:  FINDSTRING (UPPER ([country]), "UNITED STATES", 1)>0

And then set up default output name (Condition not fulfilled) and output name (condition fulfilled) and click ok. Join data flow arrow from source to condition slit.


Step 4:

Now set up data destination connection for data which match filtering and which does not and store those data in separate tables or as you want.

Do all mapping properly by double-clicking on Data destination 

OLE DB destination editor > Mapping > Set each source column with correct destination column. 

SSIS05.png


After setting up everything click ok.

Step 5:

Now it time to run your package and see the result.

SSIS06.png



And the result can be seen in SQL server tables also

SSIS07.png


Note: Try to be extra care full about data type conversion and your CSV file because it may create errors.


Comments