Five Stars

How to execute an expression iteratively on input rows?

Performing ETL on a dataset, I have obtained the "yyyyMM" column as "MonthYear", and total "CB" in that month.

Now, I want to find out total CB of previous 3 months, for each month.


In SQL, I can do that by a nested subquery, or using self-join. How do I execute this query on the current Talend job without having to store the rows as a table in a (MySQL) DB?


My other option is to use Talend components to carry out the remaining steps.

But are there any components in Talend where I can extract rows iteratively and perform aggregation on them? Or some way to perform join and aggregation both in tMap?


I have attempted this so far ... but how do I get the "test" expression to be evaluated iteratively?


Screenshot (7).png



Nine Stars

Re: How to perform a query on the output of a job?



Amy you can try tHashoutput. First load derived data in tHasoutput and use that as source usingtHashInput and do you required calculations.



Veeru Boppudi
Five Stars

Re: How to perform a query on the output of a job?

@vboppudi But which query component can I use on the tHashxxxx components?