dane rias
dane rias

Reputation: 21

Talend - Null after tAggregateRow

I have made a structure like this to check the highest loan amount per Customer ID given their agreements.

tOracleInput (2) --> tMap --> tOracleOutput --> tAggregateRow --> tMap --> tOracleOutput

my first tOracleInput is where list of Customers and on my second tOracleInput is where agreements and loan amount are stored, then I used Tmap to map customer to their Agreements. (this is ok - it gets all the info), then I store those info on my tOracleOutput (this is OK- it gets all the info) then I use tAggregateRow to Group by Customer ID and Get the Max loanAmount of each Customer ID. So, I will expect 1 loanAmount per Customer ID. It did so. (but other info became null) Then, I map that record on my last tOracleOutput with all other information like, interest, name and others.... But, it only stores the Customer ID and loanAmount.

I have the following fields and it is mapped from tOracleOutput before the AggregateROw to the last tOracleOutput

Customer_ID ->  Customer_ID
Customer_Name -> Customer_Name
loanAmount   -> loanAmount
loanInterest -> loanInterest
delStatus  -> delStatus

but it only stores: Customer_ID |null|10000|null|null

why other information became null after tAggregateRow, is there a way to get all info that I need after determining the max?

Thanks for the help.

Upvotes: 0

Views: 1518

Answers (1)

Julien Boulay
Julien Boulay

Reputation: 1204

It is null because you need to specify an aggregate operation for the other fields too. You can use "first element", for exemple, to take the first value encountered in the input data.

Upvotes: 1

Related Questions