Comparison functions - Cloud

Talend Data Shaping Language Reference Guide

Version
Cloud
Language
English (United States)
Product
Talend Cloud
Module
Data Shaping Language
Content
Design and Development

The following functions can be used to compare values.

Function Description Arguments Example
equals Returns true if the first two arguments are equal. All supported literals can be used. The third argument allows you to specify an epsilon to check a non-strict equality. It can be used only if at least one of the values to compare is a real number. The other number can be a real number, a string representation of a real number or bytes.
  1. First value.
  2. Second value.
  3. Epsilon as a double or float.
Expression: equals(1.57, 1.58, 0.1F)

Result: true

greater Returns true if the first argument is greater than the second argument. All supported literals can be used. The third argument allows you to specify an epsilon to check a non-strict equality. It can be used only if at least one of the values to compare is a real number. The other number can be a real number, a string representation of a real number or bytes.
  1. First value.
  2. Second value.
  3. Epsilon as a double or float.
Expression: greater(2,3)

Result: false

greaterOrEqual Returns true if the first argument is greater than or equal to the second argument. All supported literals can be used. The third argument allows you to specify an epsilon to check a non-strict equality. It can be used only if at least one of the values to compare is a real number. The other number can be a real number, a string representation of a real number or bytes.
  1. First value.
  2. Second value.
  3. Epsilon as a double or float.
Expression: greaterOrEqual(1, 0xFF)

Result: true

lower Returns true if the first argument is lower than the second argument. All supported literals can be used. The third argument allows you to specify an epsilon to check a non-strict equality. It can be used only if at least one of the values to compare is a real number. The other number can be a real number, a string representation of a real number or bytes.
  1. First value.
  2. Second value.
  3. Epsilon as a double or float.
Expression: lower(1.5, 2, 0.1D)

Result: true

lowerOrEqual Returns true if the first argument is lower than or equal to the second argument. All supported literals can be used. The third argument allows you to specify an epsilon to check a non-strict equality. It can be used only if at least one of the values to compare is a real number. The other number can be a real number, a string representation of a real number or bytes.
  1. First value.
  2. Second value.
  3. Epsilon as a double or float.
Expression: lowerOrEqual(42.4,42.2,1F)

Result: true