Filter functions
This page goes over the filter functions in Upsolver.
Last updated
This page goes over the filter functions in Upsolver.
Last updated
AND
Returns true
if all operands are true.
BETWEEN
Checks if a value is between two values.
value
lowerBound
upperBound
CONTAINS
Returns true
for instances where the left operand contains the right operand.
haystack
needle
EQUAL_TO
Returns true for instances where the operands are equal.
EXISTS
Opt in all the rows that contains the specified field.
GREATER_THAN
Returns true
for instances where operand 1 is greater than operand 2.
GREATER_THAN_OR_EQUAL_TO
Returns true
for instances where operand 1 is greater than or equal to operand 2.
IN_SET
Returns true
for instances where the value is contained in the given set.
Set - Values separated by line breaks
IS_DUPLICATE
Returns true
if it's not the first time the input value is seen in the data within the specified window size.
This function creates a lookup table that holds all previous keys until the current run. During the current run, it uses in-memory caching to save all keys. A row returns true if the key exists in one of these two caches. However, because the in-memory cache does not work across shards, outputs with shards may contain duplicates that are not marked as such within the run (see workaround below).
value - value to deduplicate
Dedup Id
Window Size - Deduplication window size in minutes
The following workaround removes duplicates from the same minute (the interval of the output) when using shards:
LESS_THAN
Returns true
for instances where operand 1 is less than operand .
LESS_THAN_OR_EQUAL_TO
Returns true
for instances where operand 1 is less than or equal to operand 2.
NOT
Returns true
if the value is false.
NOT_EQUAL_TO
Returns true
for instances where the operands are not equal.
OR
Returns true
if at least one of the operands is true.
RANDOM
Returns true
for a percentage of items equal to the input.
percent - percentage (in decimal; e.g. 0.2, 0.5, etc) of items to mark as true
XOR
Returns true
only if the operands are different from each other.
inputs
result
false
, false
false
false
, true
false
true
, false
false
true
, true
true
haystack
needle
result
"abcde"
"a"
true
"abcde"
"f"
false
operand 1
operand 2
result
0
0
true
1
0
false
0
1
false
"a"
"a"
true
"a"
"b"
false
input
result
"a"
true
false
operand 1
operand 2
result
0
0
false
1
0
true
0
1
false
operand 1
operand 2
result
0
0
true
1
0
true
0
1
false
input
set
result
"a"
"a
b"
true
"c"
"a
b"
false
1
"1
2
3.14"
true
2
"1
2
3.14"
true
3
"1
2
3.14"
false
3.14
"1
2
3.14"
true
operand 1
operand 2
result
0
0
false
1
0
false
0
1
true
operand 1
operand 2
result
0
0
true
1
0
false
0
1
true
input
result
true
false
false
true
operand 1
operand 2
result
0
0
false
1
0
true
0
1
true
"a"
"a"
false
"a"
"b"
true
inputs
result
false
, false
false
false
, true
true
true
, false
true
true
, true
true
operand 1
operand 2
result
false
false
false
false
true
true
true
false
true
true
true
false