Filter Conditin(and) in tMap help

One Star

Filter Conditin(and) in tMap help

Hello
Do you have some document regarding what kind of option we can use in the Filter Conditin(and) in tMap
exemple
I'm trying to filter data from table using this syntaxt
row2.projectID.equals(33) the projectID is a INT type
I have an error on my tMap "Orror on row2.projectID.equals(33) => Cannot invoke equals(int) on a primitive type int

And what is the correct syntaxt for not equals to 33 or to null?
THX
DN
Employee

Re: Filter Conditin(and) in tMap help

Denis,
If your are in a JavaProject, the equal condition for a INTEGER is not the same that for a STRING.
Test in your case the following syntax : row2.projectID == 33
Regards.
One Star

Re: Filter Conditin(and) in tMap help

Thx Antoine
But how different working != or =! , <>,...
DN
One Star

Re: Filter Conditin(and) in tMap help

Antoine
and for null
how do you do?
row2.projectID == null doesn't work
Employee

Re: Filter Conditin(and) in tMap help

Denis,
An "Int" cannot be NULL but an "Integer" can be NULL.
Verify your Schema, and change with "Integer" (check Nullable -> true), and you can test your expression : row2.projectID == null
Regards
One Star

Re: Filter Conditin(and) in tMap help

Thak you cantoine
You helped me too.
One Star

Re: Filter Conditin(and) in tMap help

Hi all,
I am new to Talend. I am trying to figure out how to filter out an excel column based on the column name without writing java code. For example if I want to skip all the columns whose names start with 'derive_' can I do it with tMap or something else within Talend?
Thanks
One Star

Re: Filter Conditin(and) in tMap help

Maybe post this as a separate thread instead of hijacking this one. you'll get a better response.
My suggestion:
Add a tMap. On the right hand side add a field called "worksheet" with the following variable as the expression: (replace with the correct global name)
((String)globalMap.get("tFileInputExcel_1_CURRENT_SHEET"))
Then use tFilterRow to filter rows that include or exclude the worksheet names you want.
Let me know if this helps.
One Star

Re: Filter Conditin(and) in tMap help

My apologies for the intrusion. Could somebody be kind enough to show me how to post a new thread?
Seven Stars

Re: Filter Conditin(and) in tMap help

At the top of this topic, under the Announcement section, click the Usage, Operation link. On the new page at the right is a Post new topic link.