Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

talend cannot convert from string to boolean

Hi Team,
I have input field  is string and output is also string.

Using this field to write expression (I need to filter data based on this condition) row3.Organization_Name.equals("MM")
and also I tried row3.Organization_Name=="MM"

but it gives error cannot convert string to Boolean. can u please help me with solution

do we have like operator in talen..because I need to handle row3.Organization_Name like"M%"

Labels (2)
2 Replies
rgagnon
Contributor

To simulate a LIKE operator, try something like this as a filter :

StringHandling.LEFT(row3.Organization_Name ,1).equals("M")
Anonymous
Not applicable
Author

The String class should have all you need.
You can say row3.Organization_Name.startsWith("M")
I'm not sure why your example would give you a String to Boolean error. You definitely cannot use "==" as this will always return false.
And don't forget to always null test first.