One Star

minDate and maxDate on tmap filtering

Hello,
I want to implement a where clause in tmap filtering rather than in the input component query. What i want to do is retrieve and load data based on the minimum and maximum load date for all records. tAggregateRow is not producing the desired result. Any suggestions?
Many thanks.
2 REPLIES
One Star

Re: minDate and maxDate on tmap filtering

what about tAggregateRow is not working?
are you using a Date datatype?
One Star

Re: minDate and maxDate on tmap filtering

what about tAggregateRow is not working?
are you using a Date datatype?

I wouldn't say tAggregateRow is not working but i'm not getting the results that i want. I am working with very unstructured data that needs creativity. Yes - the data type is "date"
What i want is pull all records for a specific date (MAX) even with duplicates where it does exist.
Snippet of the clause currently in the input component
WHERE  \"Date\" = (SELECT MAX(\"Date\") FROM \"Data\")
AND  EXTRACT (YEAR FROM \"Period\")= 2008
Second part implemented in tMap and works
 (row1.Period != null && TalendDate.formatDate("yyyy",row1.Period).equals("2008"))