.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> DataBase >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Merge Join Transformation in SSIS - SQL Server Integration Services (SSIS) - Part 52

Posted By:Karthikeyan Anbarasan       Posted Date: May 11, 2011    Points: 200    Category: DataBase    URL: http://www.dotnetspark.com  

In this article we are going to see on how to use the Merge Join Transformation in SQL Server Integration Services (SSIS) packaging
 

Introduction:


In this article we are going to see how to use the Merge Join Transformation in SSIS packaging. Merge Join Transformation is similar to merge transformation; it handles multiple data from different sources and merges into one process and handles it as if it came from a single source. Also Merge simply recombines portions of the data flow without changing the shape of the buffer, much like a UNION but which maintains the sort order. A Merge Join adds elements to the buffer which will change its shape, similar to an INNER, LEFT OR RIGHT OUTER JOIN. Let's jump start to see this sample of how to set the properties of the sorting.


You can also read my other articles on SSIS from Here

Steps:


Follow steps 1 to 3 on my first article to open the BIDS project and select the right project to work on an integration services project. Once the project is created, we will see how to use the Merge Join Transformation task. Once you open the project, just drag and drop both a Merge Join transformation control and a source provider as shown in the image below:



Here I configured the source data source from 2 different files as shown below:

Source 1:



Source 2:




Now I created a table in the database and hosted it as the destination database as shown below:


Script:

Create table ProductMaster 
( 
Productid int, 
Productname varchar(50), 
ProductDate datetime, 
ProductLineId int, 
ProductOrderID int, 
Productorderdetail varchar(40) 
) 
Select * from ProductMaster 

Now the source files are configured and the sorting properties are enabled as shown in my previous article. Now let us configure the Merge join task as shown below:



Here I make an inner join to perform the task and I select productid as the primary key and select the list of columns that the destination table should have to be updated as shown in the above image. Now the task is configured and ready for data. Now we need to have a destination system to update the data so we will have the OLEDB destination provider as shown in the below screen and we configure it with the exact mapping.



Now the complete package is ready to build and execute. Press F5 to do the process, you will see the screen as below:



Now let's see how it got affected in the table. Run the destination system query and see the end result which will be like below: 

 

Conclusion:


So in this article we have seen how to use the Merge Join transformation task and the key configurations used in order to use this task easily.

 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend