Developer Transformation Guide > Joiner Transformation > Joining Data from the Same Source
  

Joining Data from the Same Source

You can join data from the same source if you want to perform a calculation on part of the data and join the transformed data with the original data.
When you join data from the same source, you can maintain the original data and transform parts of that data within one mapping. You can join data from the same source in the following ways:

Joining Two Branches of the Same Pipeline

When you join data from the same source, you can create two branches of the pipeline.
When you branch a pipeline, you must add a transformation between the mapping input and the Joiner transformation in at least one branch of the pipeline. You must join sorted data and configure the Joiner transformation for sorted input.
For example, you have a source with the following ports:
In the target, you want to view the employees who generated sales that were greater than the average sales for their departments. To do this, you create a mapping with the following transformations:
The mapping example shows a source called Employees_West, a Sorter transformation, a pipeline branch 1 from the Sorter transformation to a Joiner transformation. It shows a second pipeline branch 2 from the Sorter transformation to an Aggregator transformation and then to the Joiner transformation, and a target called T_Employee_Totals.
  1. 1. Employees_West Source
  2. 2. Pipeline branch 1
  3. 3. Pipeline Branch 2
  4. 4. Sorted Joiner transformation
  5. 5. Filter out employees with less than above average sales
Joining two branches might decrease performance if the Joiner transformation receives data from one branch much later than the other branch. The Joiner transformation caches all the data from the first branch and writes the cache to disk if the cache fills. The Joiner transformation must then read the data from disk when it receives the data from the second branch.

Joining Two Instances of the Same Source

You can join data from the same source by creating a second instance of the source.
After you create the second source instance, you can join the pipelines from the two source instances. If you want to join unsorted data, you must create two instances of the same source and join the pipelines.
The following figure shows two instances of the same source joined with a Joiner transformation:
The mapping shows two instances of a source, ITEMS and ITEMS1, an Aggregator transformation, a Joiner transformation, and a target. One instance of the source connects to the Joiner transformation directly. The other instance connects to an Aggregator transformation and then the Joiner transformation.
When you join two instances of the same source, the Data Integration Service reads the source data for each source instance. Performance can be slower than joining two branches of a pipeline.

Guidelines for Joining Data from the Same Source

Certain guidelines apply when you decide whether to join branches of a pipeline or join two instances of a source.
Use the following guidelines when you decide whether to join branches of a pipeline or join two instances of a source: