Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a question please advise -
I am trying to output only latest record in tMap - for below example I only need 3/12/2019 record show in my output report. for now I can only catch all record or the first one. those input data are showing no sequence.
Thank you!
Trans DateTime | record |
3/11/2019 6:51 | A |
3/12/2019 10:43 | A |
3/11/2019 8:08 | A |
Are those three records already loaded or this particular record is getting loaded when you run your job, so you wanted to take only with the latest time stamp, can you give bit more details about it
3/12/2019 10:43 | A |
@szhou1 first you need to sort records in descending order
and then filter in tMap using sequence
result:
But if you want to have natural order you have to use 2x tMap
In first you have to add new column with sequence
Then you have tu use tSortRow and sort your rows in descending order of sequence column
Then you can use the second tMap in which you have add filter the same way as I show in my previous post.
it still will work, even without group by, just select last
Function: Select the operator among: count, min, max, avg, sum, first, last, list, list(objects), count(distinct), standard deviation.
"s2", "s1" etc is an unique name of the sequence. It can be also "blablabla";