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 manipulation.
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 employees in the target.
Perform the following steps to implement the functionality:
Import the source using the
EMPLOYEE
Oracle table in Source Analyzer and create theTGT_TOTAL_SALARY
target in Target Designer.Create the
m_AGG_TOTAL_SALARY
mapping and drag the source and target from the navigator to the workspace. Create the Aggregator transformation with theAGG_TOTAL_SAL
name.As we need to calculate
TOTAL_SALARY
, drag only theSALARY
column from the source qualifier to the Aggregator transformation.Add a new
TOTAL_SALARY
column to the Aggregator transformation to calculate the total salary, as shown in the...