Comparison and logical operators - Data360_Analyze - Latest

Data360 Analyze Server Help

Product type
Software
Portfolio
Verify
Product family
Data360
Product
Data360 Analyze
Version
Latest
Language
English
Product name
Data360 Analyze
Title
Data360 Analyze Server Help
Copyright
2024
First publish date
2016
Last updated
2024-11-28
Published on
2024-11-28T15:26:57.181000
CAUTION:
This topic relates to Data360 Analyze Script which is the language that is used in some deprecated nodes. If you are looking for help configuring the Python-based nodes, see Python scripting.

In general, the following syntax is used with comparison and logical operators:

<Expression1> <operator> <expression2>

4 > 2 # true

Comparison operators compare two expressions and logical operators can be used to return values that match a specific condition.

Operator Definition and format
==

Is equal to.

expression1 == expression2

!=, <>

Is not equal to.

expression1 != expression2

>

Greater than.

expression1 > expression2

>=

Greater than or equal to.

expression1 >= expression2

<

Less than.

expression1 < expression2

<=

Less than or equal to.

expression1 <= expression2

not

Returns values that do not match the specified condition, that is, if the expression is false. Excludes data if the specified condition is true.

not expression

not(expression)

not(2<5) In this example, a false value is returned because 2<5 is true.

For further information, see not.

or

Returns the boolean value of true if one or more of the expressions is true.

A or B

where A and B are boolean expressions. A boolean value of true is returned if either A or B are true, or if both A and B are true.

(5 < 3) or true or false # value: true

For further information, see or.

and

Returns the boolean value of true if both expressions are true.

A and B

where A and B are boolean expressions. A boolean value of true is returned if both A and B are true.

true and (1 == 1.0) # value: true

For further information, see and.

Only output data when field1 equals value1:

output “out1”{emit *wherefield1 == “value1”}

Only output data when field1 equals value2:

output “out2”{emit *wherefield1 == “value2”}

Only output data when field1 does not equal value1 or value2:

output “out3”{emit *where not(field1 == “value1” orfield1 == “value2”)}