Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to move the filtering condition inside the tMap instead of tFilterRow. By filtering it within tMap, only the rows that are necessary would be fetched.
MyRoutine11709.getQuarter(row1.SaleDate).equals(MyRoutine11709.getQuarter(TalendDate.getCurrentDate()))
package routines;
public class MyRoutine11709 {
static int month = 0;
static String quarter = null;
public static String getQuarter(java.util.Date date) {
month = date.getMonth() + 1;
if (month >= 1 && month <= 3) {
quarter = "Q1";
}
if (month >= 4 && month <= 6) {
quarter = "Q2";
}
if (month >= 7 && month <= 9) {
quarter = "Q3";
}
if (month >= 10 && month <= 12) {
quarter = "Q4";
}
return quarter;
}
}
input_row.Quarter.equals(MyRoutine11709.getQuarter(TalendDate.getCurrentDate()))
Starting job forum11709 at 10:26 23/07/2010.
connecting to socket on port 3493
connected
.------+-------+-----------.
| tLogRow_1 |
|=-----+-------+----------=|
|region|Quarter|Total_Sales|
|=-----+-------+----------=|
|North |Q3 |1500 |
|South |Q3 |3500 |
'------+-------+-----------'
disconnected
Job forum11709 ended at 10:26 23/07/2010.
Is it possible to move the filtering condition inside the tMap instead of tFilterRow. By filtering it within tMap, only the rows that are necessary would be fetched.
MyRoutine11709.getQuarter(row1.SaleDate).equals(MyRoutine11709.getQuarter(TalendDate.getCurrentDate()))
Shong,
You're doing an amazing job !! I hope the talend community knows how helpful you are.
Best regards;