Tutorial Gateway

  • C
  • C#
  • Java
  • Python
  • SQL
  • MySQL
  • Js
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Go Programs
    • Python Programs
    • Java Programs

Right Outer Join in SSIS

by suresh

In this article, we are going to perform SSIS Right Outer Join on two SQL tables using Merge Join Transformation.

Before designing the SSIS Package, let see two source tables on which we are going to perform Right Outer Join in SSIS using Merge Join Transformation.

Please refer to Left Outer Join in SSIS article to understand. And also, see Full Outer Join in SSIS article to know Full Join using Merge Join Transformation.

Employees Table inside the [SSIS Tutorial] Database is:

Right Outer Join in SSIS 1

Department Table inside the [SSIS Tutorial] Database is:

Right Outer Join in SSIS 2

Configure Right Outer Join in SSIS Merge Join Transformation

STEP 1: Drag and drop the data flow task from the toolbox to the control flow region and rename it as Performing Right Outer Join in SSIS Using Merge Join Transformation

Right Outer Join in ssis Using Merge Join Transformation 1

Double click on the data flow task will take us to the Data flow region.

STEP 2: Drag and Drop two OLE DB Sources from the toolbox to the data flow region. Next, double-click on the first OLE DB source in the data flow region opens the connection manager settings and provides an option to select the table.

Right Outer Join in ssis Using Merge Join Transformation 2

From the above screenshot, you can observe that we selected [Employees] Table from [SSIS Tutorials] Database

STEP 3: Click on the columns tab to verify the columns. In this tab, we can uncheck the unwanted columns.

Right Outer Join in ssis Using Merge Join Transformation 3

STEP 4: Double click on the second OLE DB source to configure the Second table to perform Merge Join. Here, we selected the [Department] Table

Right Outer Join in ssis Using Merge Join Transformation 4

STEP 5: Repeat Step 3

Right Outer Join in ssis Using Merge Join Transformation 5

TIP: Merge Join Transformation will not work without sorting the input rows. So Sort Transformation is mandatory before applying SSIS Right Outer Join.

STEP 6: Drag and drop two Sort Transformations from the SSIS toolbox to the Data Flow region. Next, connect the OLE DB Source output arrow to the Sort Transformation.

Right Outer Join in ssis Using Merge Join Transformation 6

STEP 7: Double click on Sort Transformation to configure it. Check the columns we want to sort, and don’t forget to Pass Through the remaining column. If you forget to select the Pass Through then, they won’t appear in output columns.

From the source data, DepartID is the Joining key between Employees and Department tables. So We are sorting the Employees table by DepartID in ascending order.

Right Outer Join in ssis Using Merge Join Transformation 7

Double click on Sort Transformation 1 and sort the Department table using the id column in ascending order.

Right Outer Join in ssis Using Merge Join Transformation 8

STEP 8: Now drag and drop the Merge Join Transformation into the data flow region to perform SSIS Right Outer Join on the sorted tables.

When you drag the output arrow of the Sort Transformation into Merge Join Transformation, an Input Output Selection window will appear to select whether it is Merge Join Left Input or Right Input.

Right Outer Join in ssis Using Merge Join Transformation 9

Here we selected Merge Join Left Input for Employees table. Click ok and drag and drop the output arrow of the Sort Transformation 1. Here Merge Join Right Input is automatically selected by the intelligence.

STEP 9: Double click on Merge Join Transformation will open the Merge Join Transformation Editor to configure it.

Join Type provides a drop-down list to select the Join type (such as Inner Join, Left Outer Join, and Full Outer Join) you want to perform on the source data. In this example, Although we are performing Right Outer Join, SSIS Merge Join Transformation Editor doesn’t have that option. So for now, We selected the Left Outer Jon option from the Join Type option.

Right Outer Join in ssis Using Merge Join Transformation 10

As you can observe from the source data, both Employees and Department tables are joined using DepartID and id columns. So select them as Join keys by dragging the arrow.

Now select the columns you want to send to the destination table (Pass through columns) by check-marking the column names.

Right Outer Join in ssis Using Merge Join Transformation 11

From the above screenshot, you can see we selected [First Name], [Last Name], and [Department Name] columns as output columns. To perform the SSIS Right Outer Join, we have to Swap the tables, so click on the Swap Inputs button. By this Left table become Right table, and Right table becomes Left table.

Right Outer Join in ssis Using Merge Join Transformation 12

It means SSIS Right Outer Join displays all the [Department Name] column rows and matching rows of [First Name], [Last Name] columns from the Employees tables where DepartID is exactly equal to any of the id column data. All the nonmatching rows of the [First Name], [Last Name] columns treated as NULL.

STEP 10: Drag and drop the OLE DB destination into the data flow region and double-click on it to configure the destination server and destination table to store the Merge Join Transformation output

Right Outer Join in ssis Using Merge Join Transformation 13

Here we selected [SSIS Tutorials] as database and [Right Outer Join Using Merge Join Transformation] as the destination table

STEP 11: Click on the columns Tab to check whether input columns are matching with the destination columns or not. If not, Please assign the appropriate columns to destination columns

Right Outer Join in ssis Using Merge Join Transformation 14

We finished designing the Performing SSIS Right Outer Join Using Merge Join Transformation package. Let us execute the SSIS Right Outer Join package

Right Outer Join in ssis Using Merge Join Transformation 15

Now let’s open the SQL Server Management studio and select the columns from [Right Outer Join Using Merge Join Transformation] table.

Right Outer Join in ssis Using Merge Join Transformation 16

Placed Under: SSIS

  • What is SSIS
  • Install SQL Server Data Tools
  • Learn SSIS in 28 Days
  • Create a SSIS Project
  • Create SSIS Package
  • SSIS Connection Manager
  • OLE DB Connection Manager
  • SSIS ADO Connection Manager
  • ADO.NET Connection Manager
  • SSIS Cache Connection Manager
  • SSIS Excel Connection Manager
  • SSIS File Connection Manager
  • SSIS FTP Connection Manager
  • SSIS SMO Connection Manager
  • Source Assistance in SSIS
  • Flat File Source in SSIS
  • OLE DB Source in SSIS
  • Excel Source in SSIS
  • ADO.NET Source in SSIS
  • SSIS FLAT FILE Destination
  • SSIS OLE DB Destination
  • SSIS ADO.NET Destination
  • SSIS Transformations
  • SSIS Audit Transformation
  • SSIS Aggregate Transformation
  • SSIS Aggregate Advanced Mode
  • SSIS Cache Transformation
  • SSIS Character Map
  • SSIS Conditional Split
  • SSIS Copy Column
  • SSIS Data Conversion
  • SSIS Derived Column
  • SSIS Export Column
  • SSIS Fuzzy Grouping
  • SSIS Fuzzy Lookup
  • SSIS Import Column
  • SSIS Lookup Introduction
  • Lookup – OLE DB Connection
  • SSIS Lookup in Full Cache Mode
  • SSIS Lookup – Case Sensitivity
  • SSIS Merge Transformation
  • SSIS Merge Join Transformation
  • SSIS Merge Join – Left Outer Join
  • SSIS Merge – Right Outer Join
  • SSIS Merge Join – Full Outer Join
  • SSIS Multicast Transformation
  • SSIS OLEDB Command
  • OLEDB Command – Delete Data
  • OLEDB Command-Update Data
  • SSIS Percentage Sampling
  • SSIS Pivot Transformation 2008
  • SSIS Pivot Transformation
  • SSIS Row Count Transformation
  • SSIS Row Sampling
  • Script Component as Source
  • Script Component as Destination
  • SSIS Script as Transformation
  • SSIS Sort Transformation
  • SSIS SCD Type 0
  • SSIS SCD Type 1
  • SSIS SCD Type 2
  • SSIS Term Lookup
  • SSIS Term Extraction Intro
  • Term Extraction – Extract Nouns
  • SSIS Extract Noun Phrases
  • Extract Nouns & Noun Phrases
  • Term Extraction – Exclusion Tab
  • SSIS Unpivot Transformation
  • SSIS Union All Transformation
  • SSIS For Loop Container
  • SSIS ForEach File Enumerator
  • SSIS ForEach SMO Enumerator
  • SSIS ForEach Variable
  • SSIS Foreach NodeList
  • Foreach ADO.NET Schema Rowset Enumerator
  • SSIS Bulk Insert Task
  • SSIS Data Profiling Task
  • Execute T-SQL Statement Task
  • SSIS Execute SQL Task Intro
  • SSIS Execute SQL Task Example
  • Execute SQL Task- Single Rowset
  • Execute SQL Task – Full Row Set
  • SSIS Execute Package Task
  • Execute Packages in SQL Server
  • Execute Packages in File System
  • SSIS Execute Package Project Reference
  • SSIS File System Task
  • SSIS File System Task- Copy Files
  • File System Task-Copy Directory
  • File System Task – Delete Files
  • File System Task – Delete Folder
  • File System Task -Move Directory
  • SSIS File System Task -Move File
  • File System – Move Multiple files
  • File System Task – Rename File
  • File System Task – Set Attributes
  • SSIS FTP TASK
  • SSIS Create Local Directory
  • SSIS Create Remote Directory
  • SSIS FTP Task Send Files
  • SSIS FTP – Send Multiple Files
  • SSIS FTP Task Delete Local Files
  • FTP TASK Delete Local Directory
  • FTP Task Delete Remote files
  • SSIS Delete Remote Directory
  • SSIS FTP Task Receive Files
  • SSIS FTP Receive Multiple Files
  • SSIS Script Task
  • Transfer SQL Server Objects Task
  • Transfer SQL Table Structures
  • Transfer SQL Tables with Data
  • Transfer SQL Stored Procedures
  • Transfer User Defined Functions
  • Transfer SQL Views in SSIS
  • SSIS Web Service Task
  • SSIS XML Task-Validate XML File
  • Transform XML File using XSLT
  • XML Task-XML files Differences
  • Create SSIS Catalog
  • Package Deployment using BIDS
  • Deploy Package Using SQL
  • Deploy using SQL Server Wizard
  • SSIS Breakpoints
  • SSIS Checkpoints
  • SSIS Error Handling
  • SSIS Event Handlers
  • SSIS Transactions
  • SSIS Logging
  • SSIS Parameters
  • SSIS Package Configuration
  • Configure using SQL Server
  • Config using Registry Entry
  • Conf with Environment Variable
  • SSIS XML Configuration File
  • XML Configuration File Part 2
  • SSIS Package Protection Level
  • SSIS Incremental Load
  • Incremental Load Example 2
  • SSIS Remove Double Quotes

Copyright © 2021· All Rights Reserved.
About | Contact | Privacy Policy