Skip To Content

Attribute filters

Attribute filters in a GeoEvent Service filter events based on attribute criteria. An attribute filter can be configured with one or more attribute expressions. The logical combination of these expressions represents the criteria an event record must satisfy to pass through the filter.

The following attribute operators are supported in GeoEvent Server:

  • Equals (=)—This operator retains event records whose attribute values equal a specified value, such as the following example:
    IdString = 3XAB891
  • Not equal (!=)—This operator retains event records whose attribute values do not equal a specified value, such as the following example:
    StatusString != Err
    Note:

    The Equals (=) and Not equal (!=) operators should not be applied to floating point values. For example, do not configure a filter expression such as Radius = 3.14159. Instead, use the Greater than (>), Less than (<), or other operator.

  • Greater than (>)—This operator retains event records whose attribute values are greater than a specified value, such as the following example:
    Speed > 50
  • Greater or equal (>=)—This operator retains event records whose attribute values are greater than or equal to a specified value, such as the following example:
    Speed >= 50
  • Less than (<)—This operator retains event records whose attribute values are less than a specified value, such as the following example:
    Altitude < 1000
  • Less or equal (<=)—This operator retains event records whose attribute values are less than or equal to a specified value, such as the following example:
    Altitude <= 1000
    Note:

    The Greater than (>), Less than (<), and other operators should not be applied to string values. For example, do not configure a filter expression such as Company > ABC. Instead, use the Equals (=) or Not equal (!=) operator and incorporate the entire string into the expression.

  • IN—This operator retains event records when a specified field's value exists in a comma-separated list of values, such as the following example:
    StatusCode IN HK1,HK3,HK5
  • MATCHES—This operator retains event records when a specified field's value matches a regular expression, such as the following example:
    StatusCode MATCHES ^HK[135]

    Note:

    The specified regular expression is evaluated as either matching or not matching the entire event field value; partial matches are not supported. In the example above, if the StatusCode contained additional characters beyond the single numeric digit, the expression would need to include .* to match any trailing characters in the attribute value.

  • EXISTS—This operator retains event records when a specified field exists in the received event's schema, such as the following example:
    Geometry EXISTS
    .
  • ISNULL—This operator retains event records when a specified field contains a null value, such as the following example:
    Geometry ISNULL
Note:

String attribute values may be null or empty. A string whose length is zero (0) is defined as an empty string. A string object whose value is undefined is a null string. Use the ISNULL operator to test whether a string is null. Use the MATCHES operator with the regular expression ^$ to test whether a string is an empty string.