Comparison expressions - Cloud

Talend Data Shaping Language Reference Guide

English (United States)
Talend Cloud
Data Shaping Language
Design and Development

You can use the following operators in comparison expressions:
  • = or == for "equal to"
  • != for "not equal to"
  • < for "less than"
  • <= for "less than or equal to"
  • > for "greater than"
  • >= for "greater than or equal to"

Strings and bytes can be converted to numeric types when they are compared to numeric types. For example, in "1" < 2, "1" is converted to an integer to perform the comparison. If the string cannot be converted to a numeric type, an exception is raised.

If you compare a Boolean to a string, the string "true", regardless of its case, is interpreted as true, and other strings are interpreted as false.

The following examples are valid comparison expressions that return true:
2 < "3"
"200" >= 100
2 == "2"
"true" == true
0x0A == 10
"5e+2" == 500