Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
noobTalendDev
Contributor
Contributor

tAggregateRow

I have about 8 different rows in my talend, i want to keep all of the rows however i am performing an action on 2. I have a username and a number of days of access so i am adding all of the number of days per user and adding them up. The rest of the rows I do not want to change at all, i noticed that if i didn't include them in operations table it would show NULL. I changed that to the picture below and randomly used function 'last'. Is this the correct way to do this? Or is there a better way to make sure i dont get NULL. 0695b00000LxIbbAAF.png

Labels (3)
6 Replies
corentin1
Contributor III
Contributor III

You have to see tAggregateRow as an equivalent of a GROUP BY operation in SQL. If you GROUP BY NTID , then using option "LAST" on the other field could result in a loss of data. E.g if you have 3 rows containing the same ID, only one row will come out of the tAggregate, getting only the last value for all the other columns (workstation, number, state, etc). Is it ok for you to lose this data ? If so your option is valid. Otherwise I guess you should have one main flow with your detailed data, then another flow making the sum operation. Then you can join the two flows with a tMap (using NTID to join the two flows)

Anonymous
Not applicable

Hi

You are right, if these fields have the same value, and you want to output them also in the output, use the function 'first' or 'last' for these fields.

 

Regards

Shong

noobTalendDev
Contributor
Contributor
Author

So the only data I care for is NTID/Number of days so I guess it is okay for me to continue using this method

noobTalendDev
Contributor
Contributor
Author

but is there no way to just bring in all of the other data i do not want to touch and move it to the next component? Seems very weird that I would have to choose a function to use for example First or Last to move all of the other data to the next component.

Anonymous
Not applicable

another way is to store the data into memory, after you do the aggregation, do an inner join to get the other data back. About inner join, you can read an example job in this page.

 

noobTalendDev
Contributor
Contributor
Author

ahh ok, is there any reason when this was created there wasn't an option to let the data flow through without changing it at all? And only changing necessary fields?