| |
| ||||||
The Merge Join TransformationThis is a discussion on The Merge Join Transformation within the BI Monkey forums, part of the CORTEX Blogs category; Fig 1: The Merge Join Transformation In this post I will be covering the Merge Join Transformation. The sample package can be found here for 2005 and guidelines on use ... |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
| | #1 |
| Guru Join Date: Jun 2009
Posts: 135
![]() | Fig 1: The Merge Join TransformationIn this post I will be covering the Merge Join Transformation. The sample package can be found here for 2005 and guidelines on use are here. What does the Merge Join Transformation do? The Merge Join Transformation*joins two data sets on a common key (or keys). It’s the same as performing an SQL Join – the options you have are Inner Join, Full Outer Join and Left Outer Join. However the difference is that SSIS rather than SQL is doing the join, so it’s an in-memory activity. The Merge Join is a Blocking transformation – it needs to receive all data from all inputs before it can proceeed, so this can have a significant negative effect on performance. Configuring the Merge Join Transformation A key thing to note for the Merge Join Transformation is that the inputs must be sorted on the keys on which you are joining the datasets, for both sets. This means you either have to set the IsSorted property on your source if the data is coming in sorted, or push it through a Sort transformation before you can attempt to do the join. In the example package, I have used 2 OLE DB sources. One of these is unsorted and I sort the output using a Sort column – note this is another blocking transform and another chance to drag performance down. The other one is sorted, and I tell SSIS by setting the IsSorted property of the OLE DB Source Output to true using the advanced Editor. In terms of configuration of the Merge Join, all you need to do is map the join keys using a drag and drop and select the columns you want on the output, as shown below: Fig 2: Configuring the Merge Join TransformationThe checkbox to the left of the column name in the join section indicates whether that column is output from the transformation. In the box below the join section, you can rename the output columns if you want. The Order column is the Sort Order, and is not configurable. The Join Key checkbox is ticked when you create a relationship. There is no advanced editor, but if you access the properties from the design surface there are a few extra properties to access which are worth knowing about:
The answer to this is simply that it should be used wherever it is not possible to perform the join using native SQL functionality – e.g. joining data from text file sources or other non database sources. If your sources are coming from the same database, use a query and get the database to do the work. It’ll be faster and more efficient in the vast majority of cases, and the fact that it’s a blocking transformation will slow down your package overall. MSDN Documentation for the Merge Join Transformation can be found here for 2008 and here for 2005. If you are still struggling, try these additional resources:
Get More from the original blog... |
| | |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Two more join Telstra board | Latest News Headlines | 2009 Q3 News Headlines | 0 | 3rd September 2009 10:58 AM |
| The Script Transformation part 1 ? a simple Transformation | James Beresford | BI Monkey | 0 | 1st September 2009 02:01 PM |
| SA credit unions merge | Latest News Headlines | 2009 Q3 News Headlines | 0 | 14th August 2009 09:58 AM |
| The Merge Transformation | James Beresford | BI Monkey | 0 | 20th July 2009 12:11 PM |
| Join Us! | admin | CORTEXers Wanted | 0 | 14th October 2007 07:23 PM |
| | |
| | |