## Key

• This line was removed.
• Formatting was changed.
Excerpt

This example illustrates the comparison functions in

D s product
r true
.

Functions:

D generate list excerpts
pages LESSTHAN Function,LESSTHANEQUAL Function,EQUAL Function,NOTEQUAL Function,GREATERTHAN Function,GREATERTHANEQUAL Function

Source:

colAcolB
111
210
39
48
57
66
75
84
93
102
111

Transformation:

Add the following transforms to your recipe, one for each comparison function:

D trans
RawWrangle true 'lt' step derive type:single value:LESSTHAN(colA, colB) as:'lt' Formula type Single row formula Formula LESSTHAN(colA, colB) New column name New formula

D trans
RawWrangle true 'lte' step derive type:single value:LESSTHANEQUAL(colA, colB) as:'lte' Formula type Single row formula Formula LESSTHANEQUAL(colA, colB) New column name New formula

D trans
RawWrangle true 'eq' step derive type:single value:EQUAL(colA, colB) as:'eq' Formula type Single row formula Formula EQUAL(colA, colB) New column name New formula

D trans
RawWrangle true 'neq' step derive type:single value:NOTEQUAL(colA, colB) as:'neq' Formula type Single row formula Formula NOTEQUAL(colA, colB) New column name New formula

D trans
RawWrangle true 'gt' step derive type:single value:GREATERTHAN(colA, colB) as:'gt' Formula type Single row formula Formula GREATERTHAN(colA, colB) New column name New formula

D trans
RawWrangle true 'gte' step derive type:single value:GREATERTHANEQUAL(colA, colB) as:'gte' Formula type Single row formula Formula GREATERTHANEQUAL(colA, colB) New column name New formula

Results:

colAcolBgtegtneqeqltelt
111falsefalsetruefalsetruetrue
210falsefalsetruefalsetruetrue
39falsefalsetruefalsetruetrue
48falsefalsetruefalsetruetrue
57falsefalsetruefalsetruetrue
66truefalsefalsetruetruefalse
75truetruetruefalsefalsefalse
84truetruetruefalsefalsefalse
93truetruetruefalsefalsefalse
102truetruetruefalsefalsefalse
111truetruetruefalsefalsefalse

D s also
label example_comparison_functions1