Filter row by max date

Highlighted
Five Stars

Filter row by max date

Hello,

 

Im using a .csv with person data and a date. I'm trying to filter by desc date (it means now first row will be max date) and later obtain the max date row (output should have just a single row with max date). I'm not sure about the components i need to use. For example:                                                                                                 

INPUT         

1 | Person1 | 2019-01-01                                               

3 | Person3 | 2019-01-03     

2 | Person2 | 2019-01-02 

 

(desc) 

3 | Person3 | 2019-01-03   

2 | Person2 | 2019-01-02    

1 | Person1 | 2019-01-01

 

OUTPUT (max date)

3 | Person1 | 2019-01-03   

 

Thank you!


Accepted Solutions
Seven Stars

Re: Filter row by max date

Hello EnriqueLDE,

 

By using tsortRow --> tAggregateRow--> tSampleRow you can perform this scenario

1] tSortRow =  desc on date 

2] tAggregateRow = group by on sno. and person_name then in operation :- max function on date

3] tSampleRow= range will be "1,1,"

 

for more help please find attached snapshots 

thanks, 1.JPG2.JPG3.JPG4.JPG

 

 

 

Warm Regards,
Manish

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)


All Replies
Seven Stars

Re: Filter row by max date

Hello EnriqueLDE,

 

By using tsortRow --> tAggregateRow--> tSampleRow you can perform this scenario

1] tSortRow =  desc on date 

2] tAggregateRow = group by on sno. and person_name then in operation :- max function on date

3] tSampleRow= range will be "1,1,"

 

for more help please find attached snapshots 

thanks, 1.JPG2.JPG3.JPG4.JPG

 

 

 

Warm Regards,
Manish

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Five Stars

Re: Filter row by max date

Hi Manish,

 

Thank you very much, it works perfectly!

 

Kind regards,

Enrique

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Self-service Talend Migration: Moving from On-Premises to the Cloud

Move from On-Premises to the Cloud by following the advice of experts

Read Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read