Logical 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 logical expressions:
  • && for "and"
  • || for "or"
  • ! for "not"

The operators && and || can be used between literal values, identifiers, functions or expressions. If an expression can be interpreted as an assignment expression, it should be in parentheses. For example, string1 = "Hello " && string2 = "World!" is interpreted as an assignment expression for the identifier string1. A valid logical expression would be either (string1 = "Hello ") && (string2 = "World!") or string1 == "Hello " && string2 == "World!".

The operator ! can be followed directly by a literal value, an identifier or a function, or by an expression in parentheses.

The following examples are valid logical expressions:
customer.status.defined && customer.status.enabled
customer.birthday.defined || customer.age.defined
itemId == 1 && itemQuantity > 0
!contains(customer.name, 'Dr')
!(customer.id == order.cust_id)