You are not logged in.
Announcement
Unanswered posts
|
Pages: 1
Hi,
I want to apply filter in my job
i/p: string output : string
i/p -------> tmap -------> delete
-------> insert
i want to filter all the text which is numeric or float or null
delete the rest
i tried with
row1.id.matches("-?\\d+(.\\d+)?") in tmap filter
but somehow doesnt wrk for null
i also tried with
Relational.ISNULL(row1.id) &&
row1.id.matches("-?\\d+(.\\d+)?")
but i m getting a nullpointer
can u help
regards,
djugal
Offline

Hi Djugal
According to your description, the condition should be like this with "||".
Relational.ISNULL(row1.id) ||
row1.id.matches("-?\\d+(.\\d+)?")Besides, the expression of id columns should be as below.
Relational.ISNULL(row1.id)?"":row1.id
Regards,
Pedro
Offline
thks for the quick reply, now the full prob
this is the filterfor the reject records, somehows doesnt wrk
all cols are string output also string
Relational.ISNULL(row16.date)
||
TalendDate.isDate(row16.date,"yyyy-MM-dd HH:mm:ss")==false
||
(row16.c.matches("-?\\d+(.\\d+)?")==false &&
Relational.ISNULL(row16.c))
||
(row16.e.matches("-?\\d+(.\\d+)?")==false &&
Relational.ISNULL(row16.e))
||
(row16.prp.matches("-?\\d+(.\\d+)?")==false &&
Relational.ISNULL(row16.prp))
||
(row16.pr.matches("-?\\d+(.\\d+)?")==false &&
Relational.ISNULL(row16.pr))
Thanks & regards,
djugal
Offline
Pages: 1