Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
ivanaksen
Contributor III
Contributor III

How to load latest date in the script?

Hello everybody, 
Please support with the bellow question.
So, I have GUID field, which is KEY, Completed_AT( in format 'YYYY-MM-DD hh:mm:ss') and Completed_By as the name.
The problem that I should have only latest date with corresponding name. But I have full history of actions. 

1.jpg

I ve tried with FirstSortedValue and MAX, but I didn`t have big results.  Also it`s necessary to set such command only in script, as these fields latter are LeftJoining into main table.

Thanks a million in advance.

Labels (1)
3 Replies
sunny_talwar

May be do a Right Join to this table on GUID and max COMPLETED_AT. Something like this

Table:
LOAD GUID,
   COMPLETED_AT,
   COMPLETED_BY
FROM ....;

Right Join (Table)
LOAD GUID,
   Max(COMPLETED_AT) as COMPLETED_AT
Resident Table
Group By GUID;
ivanaksen
Contributor III
Contributor III
Author

Hello, thank you for you reply,

Unfortunately this variant is not working, as I have a great mess:(

sunny_talwar

ok