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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
MarcusDidius
Contributor
Contributor

Filtering Getting the newest row

I have the following problem:

I have a data table with several entries for each serial number and I need only the one entry with the latest timestamp for each serial number. I have no idea how to do this in talend.

Labels (2)
2 Replies
Anonymous
Not applicable

Hello,

Could you please elaborate your case with an example with input and expected output values?

Best regards

Sabrina

Anonymous
Not applicable

I suggest doing this with SQL. I would use a rank over partition function.

 

select

id,

name,

whatever,

rank() over (partition by id order by my_timestamp desc) as ranking

from my_table

 

the ranking column will contain 1 (or 0 - you need to check that) for the record with the newest timestamp.

Please take it as suggestion, the window functions have different syntax for different database products.