First One:
Using the merge join operator, do the followings:
- Merge Join - Source Left join Destination
- Conditional Split -
- Destination ID is null - "OLEDB Destination"
- Destination ID is not null - "OLEDB Command". Use update operation within "OLEDB Command"
Second One:
Using the "Slowly Changing Dimension" operator, do the followings -
- Add the "Slowly Changing Dimension" and configure it using wizard
- Using OLEDB Connection, choose the destination table and set its ID as "Business key"
- After clicking next, select all other destination columns and select the Change Type as "Changing attribute"
- Keep all others default.
If you compare these two figures, you will find that how easy it is. The SCD really does a lot for you. It encapsulates sort, merge join and conditional split and auto generate the OLE DB command. So, no programmer forgets to use it instead of using the first option or calling script task from SSIS and make the code less programmer friendly.
If the table size is large, then the first option should be used. On the other hand, if the table size is small, performance of first and second option is almost same. For detail, please read this article -
http://chrisjarrintaylor.co.uk/