EXAMPLE - Comparison Functions1

This simple example demonstrate available comparison functions:

Source:

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

Transform:

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

derive value:LESSTHAN(colA, colB) as:'lt'

derive value:LESSTHANEQUAL(colA, colB) as:'lte'

derive value:EQUAL(colA, colB) as:'eq'

derive value:NOTEQUAL(colA, colB) as:'neq'

derive value:GREATERTHAN(colA, colB) as:'gt'

derive value:GREATERTHANEQUAL(colA, colB) as:'gte'

Results:

colAcolBgtegtneqeqltelt
111falsefalsetruefalsetruetrue
210falsefalsetruefalsetruetrue
39falsefalsetruefalsetruetrue
48falsefalsetruefalsetruetrue
57falsefalsetruefalsetruetrue
66truefalsefalsetruetruefalse
75truetruetruefalsefalsefalse
84truetruetruefalsefalsefalse
93truetruetruefalsefalsefalse
102truetruetruefalsefalsefalse
111truetruetruefalsefalsefalse
Was this page helpful? Let us know how we did:

Send feedback about...

Google Cloud Dataprep Documentation