Database Reference
In-Depth Information
The Aggregator transformation
The Aggregator transformation is used for calculations using aggregate functions in a
column as opposed to the Expression transformation that is used for row-wise manipula-
tion.
You can use aggregate functions, such as
SUM
,
AVG
,
MAX
, and
MIN
, in the Aggregator
transformation.
Use the
EMPLOYEE
Oracle table as the source and get the sum of the salaries of all em-
ployees in the target.
Perform the following steps to implement the functionality:
1. Import the source using the
EMPLOYEE
Oracle table in Source Analyzer and cre-
ate the
TGT_TOTAL_SALARY
target in Target Designer.
2. Create the
m_AGG_TOTAL_SALARY
mapping and drag the source and target from
the navigator to the workspace. Create the Aggregator transformation with the
AGG_TOTAL_SAL
name.
3. As we need to calculate
TOTAL_SALARY
, drag only the
SALARY
column from
the source qualifier to the Aggregator transformation.
4. Add a new
TOTAL_SALARY
column to the Aggregator transformation to calculate
the total salary, as shown in the following screenshot: