Operators and expressions in filtering language
This table shows operators and expressions that are used in filtering language. Operators are exclusive.
If a condition is true for a transaction, then it is excluded from the
resulting data set.
Expression | Description | Example | Comment |
---|---|---|---|
=, <, > | Relational operators. | TOTALCOST <
1000 |
Exclude all the transactions with cost less than 1000. |
OR | Enables you to combine atomic filters, logical OR, can be repeated multiple times. | TOTALCOST < 1000 OR
TOTALCOST > 5000 |
Exclude all the transactions with cost less than 1000 and all the transactions with cost more than 5000. |
AND | Enables you to combine atomic filters, logical AND, can be repeated multiple times. | TOTALCOST < 1000 AND
AGE > 365 |
Exclude all the transactions with cost less than 1000 that submitted more than 365 das ago. |
NOT | Enables you to revert expression it is applied to. Can be repeated in combination with parentheses. | NOT TOTALCOST <
1000 |
Exclude all the transactions with cost more than 1000. |
[ :] | Interval can be used for all the terms and combined with other operators. | DATE IN [ 2016-01-04:
2017-01-04] |
Exclude all the transactions with date in the interval from 04-Jan-2016 till 04-Jan-2017. |
IN | Used in combination with interval, see example for interval. Forms the expression for filtering data in the interval. | DATE IN [ 2016-01-04:
2017-01-04]
|
Exclude all the transactions with date in the interval from 04-Jan-2016 till 04-Jan-2017. |
OUT | Used in combination with interval, result is opposite of IN. Forms the expression for filtering data outside the interval. | DATE OUT [ 2016-01-04:
2017-01-04] |
Exclude all the transactions with date outside the interval from 04-Jan-2016 till 04-Jan-2017. |
( ) | Parentheses used to override operator precedence. Expression in parentheses is evaluated before those outside. | TOTALCOST<1000 AND
TOTALCOST>500 OR AGE>365 AND AGE <500 TOTALCOST<1000 AND (TOTALCOST>500 OR
AGE>365) AND AGE <500 |
In the second example OR operator will be evaluated before AND. |
Integer value |
Terms corresponding to the data structure can be compared only to the correct type. Validation happens and filter is rejected in case of incorrect type usage. ('0' ..'9'+) |
PRODUCTID=30 |
Exclude transactions for product with id equal 30. Might be changed in the future releases to support products name and category tags instead. |
Float value | ('0' ..'9')+'.'('0'..'9')* | TOTALCOST <
1000.0 |
Integer can be used for float type, but not vice versa: TOTALCOST < 1000 is also valid filter. |
String value | '('a'..'z' | ('0'..'9') | 'A'..'Z' | '_')+' | CUSTID='36' |
For 2.1 only customer ID uses string comparison. |