One Star

How does tAggregateRow component work?

Hello,
In Talend tutorial is not giving complete information in detail.
Exam : tAggregateRow 
I have input columns like  Empno, Ename, Hiredate, Sal, Deptno  to  tAggregateRow 
           so if i want to group the data based on the Deptno then query will be
                             select  Empno, Ename, sum(Sal), Deptno
                              from Emp
                              where Hiredate > '2015-06-01'
                               group by Deptno;
so here we have select columns like : Empno,Ename,sum(Sal) ,Deptno
                         and where column like : HireDate
                         and  Group column like : Deptno
In Talend Group column Deptno can be given in Group By 
and sum(sal) can be cal in Operations 
but where to declare   Empno,  Ename  in Talend 
  
3 REPLIES
Community Manager

Re: How does tAggregateRow component work?

Hi 
Add Empno, Ename columns in the output schema, and select 'first' or 'last' or 'list' function in Operations based on your real request.
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: How does tAggregateRow component work?

Ok,
But Where we have to give conditional grouping 
ie; Filter the records while grouping it
Examp :  where sal > 2000
             group by deptno
and
            group by deptno 
            having  sum(sal) > 5000
Community Manager

Re: How does tAggregateRow component work?

use the special component tFilterRow to filter the rows before or after tAggregateRow.
----------------------------------------------------------
Talend | Data Agility for Modern Business