Comparison blocks are used within a transform to filter records, to join tables, and to evaluate clauses within a
Case statement. A comparison block always evaluates to either TRUE or FALSE.
Comparison blocks are made up of one or more comparison rows. A comparison row always evaluates to TRUE or FALSE; multiple rows are joined together with a logical AND/OR. If you have three or more comparison rows, you may specify parentheses to nest this logic.
A comparison row is made up of three components:
The left expression can contain variables from the source table, joined tables, as well as any newly created variables. All referenced new variables must be "upstream" from the current comparison, with the exception of joins, which may reference new variables that are constructed by any variables upstream of that join.
Depending on the operator selected, the left expression may contain multiple variables. In this case, each left expression will be evaluated against the right expression(s), and logically joined via an OR. If you want to take the logical AND of multiple variables, create a separate comparison row for each variable.
Redivis supports the following operators:
Checks if any the value(s) in the left expression are (not) equal to any values in the right expression.
Checks if the value in the left expression is less than, greater than, etc. the right expression.
String comparisons are lexicographically ordered, other data types are based on the numeric order of that value. You may only have one left and one right expression when utilizing these operators
Checks if the
string(s) in the left hand expression matches specified pattern(s) in the right hand expression. The pattern may contain the following characters:
A percent sign "%" matches any number of characters
An underscore "_" matches a single character
You can escape "\", "_", or "%" using one backslash. For example, "\%"
The right expression can contain any variables allowed in the left expression, as well as lists and literal values. The comparison row will evaluate to true when the left hand expression matches any of the right hand expressions, as specified by the comparator. Certain comparators only allow one right expression.
To match against a null datum (empty cell), you must specify the special literal value