[resolved] Extract row with the maximum value

One Star

[resolved] Extract row with the maximum value

hello;
I have a file with 3 colums:
|category|name|upd_date(yyyymmdd)
|=--------+-----+-------=
|1 |foo |20091201
|1 |bar |20100101
|2 |hoge |20091215
category => Group by
upd_date => max(condition)
name => extract
I want to extract the name that has it with the newest upd_date (maximum value) each category(Group by ).
I want to get this result:
|category|name|upd_date
|=--------+-----+-------=
|1 |bar |20100101
|2 |hoge |20091215

Can you help me
Thank you.

Accepted Solutions
Community Manager

Re: [resolved] Extract row with the maximum value

Hello guy
Here I show you an example,
in.csv:

1;foo;20091201
1;bar;20100101
2;hoge;20091215
2;shong;20091214

result:
Starting job forum9360 at 11:28 25/12/2009.
connecting to socket on port 4283
connected
.--+----+--------.
| tLogRow_1 |
|=-+----+-------=|
|id|name|upd_date|
|=-+----+-------=|
|1 |bar |20100101|
|2 |hoge|20091215|
'--+----+--------'
disconnected
Job forum9360 ended at 11:28 25/12/2009.

Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
Community Manager

Re: [resolved] Extract row with the maximum value

Hello guy
Here I show you an example,
in.csv:

1;foo;20091201
1;bar;20100101
2;hoge;20091215
2;shong;20091214

result:
Starting job forum9360 at 11:28 25/12/2009.
connecting to socket on port 4283
connected
.--+----+--------.
| tLogRow_1 |
|=-+----+-------=|
|id|name|upd_date|
|=-+----+-------=|
|1 |bar |20100101|
|2 |hoge|20091215|
'--+----+--------'
disconnected
Job forum9360 ended at 11:28 25/12/2009.

Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Extract row with the maximum value

hi Shong
Thank you ;Problem resolved
=)
at tFileInputDelimited_2...
Should I sort (order by upd_date, id) it before the link of tMap(Lookup)?
Community Manager

Re: [resolved] Extract row with the maximum value

Hello
Should I sort (by upd_date) it before the link of Lookup?

No, it don't need.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Extract row with the maximum value

Where is the solution?
Got the same problem.
Community Manager

Re: [resolved] Extract row with the maximum value

Hi litttledirk 
This topic was a little old, please report a new topic for your problem with details in order to manage and follow up your question more easier.
Thanks!
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Extract row with the maximum value

My problem is exactly what you describe in post #2 (example and expected result).