Professional Documents
Culture Documents
Join Condition
The integration service joins both the input sources based on the join condition. The join condition
contains ports from both the input sources that must match. You can specify only the equal (=)
operator between the join columns. Other operators are not allowed in the join condition. As an
example, if you want to join the employees and departments table then you have to specify the join
condition as department_id1= department_id. Here department_id1 is the port of departments
source and department_id is the port of employees source.
Join Type
Normal Join
Master Outer Join
Details Outer Join
Full Outer Join
We will learn about each join type with an example. Let say i have the following students and
subjects tables as the source.
Subject_Id subject_Name
-----------------------
1 Maths
2 Chemistry
3 Physics
Student_Id Subject_Id
---------------------
10 1
20 2
30 NULL
Assume that subjects source is the master and students source is the detail and we will join these
sources on the subject_id port.
Normal Join:
The joiner transformation outputs only the records that match the join condition and discards all the
rows that do not match the join condition. The output of the normal join is
---------------------------------------------
---------------------------------------------
1 Maths 10 1
2 Chemistry 20 2
In a master outer join, the joiner transformation keeps all the records from the detail source and only
the matching rows from the master source. It discards the unmatched rows from the master source.
The output of master outer join is
---------------------------------------------
1 Maths 10 1
2 Chemistry 20 2
---------------------------------------------
---------------------------------------------
1 Maths 10 1
2 Chemistry 20 2
The full outer join first brings the matching rows from both the sources and then it also keeps the
non-matched records from both the master and detail sources. The output of full outer join is
---------------------------------------------
---------------------------------------------
1 Maths 10 1
2 Chemistry 20 2
Sorted Input
Use the sorted input option in the joiner properties tab when both the master and detail are sorted on
the ports specified in the join condition. You can improve the performance by using the sorted input
option as the integration service performs the join by minimizing the number of disk IOs. you can see
good performance when worked with large data sets.
Sort the master and detail source either by using the source qualifier transformation or sorter
transformation.
Sort both the source on the ports to be used in join condition either in ascending or
descending order.
Specify the Sorted Input option in the joiner transformation properties tab.
The integration service blocks and unblocks the source data depending on whether the joiner
transformation is configured for sorted input or not.
In case of unsorted joiner transformation, the integration service first reads all the master rows
before it reads the detail rows. The integration service blocks the detail source while it caches the all
the master rows. Once it reads all the master rows, then it unblocks the detail source and reads the
details rows.
Blocking logic may or may not possible in case of sorted joiner transformation. The integration
service uses blocking logic if it can do so without blocking all sources in the target load order group.
Otherwise, it does not use blocking logic.
You cannot use joiner transformation when the input pipeline contains an update strategy
transformation.
You cannot connect a sequence generator transformation directly to the joiner
transformation.