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 a GeoEvent must satisfy to pass through the filter.

The following attribute operators are supported in GeoEvent Server:

  • Equals (=)—This operator retains GeoEvents whose attribute values equal a specified value, such as the following example:
    IdString = 3XAB891
  • Not Equal (!=)—This operator retains GeoEvents 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 GeoEvents whose attribute values are greater than a specified value, such as the following example:
    Speed > 50
  • Greater Or Equal (>=)—This operator retains GeoEvents whose attribute values are greater than or equal to a specified value, such as the following example:
    Speed >= 50
  • Less Than (<)—This operator retains GeoEvents whose attribute values are less than a specified value, such as the following example:
    Altitude < 1000
  • Less Or Equal (<=)—This operator retains GeoEvents 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 GeoEvents 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 GeoEvents 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 GeoEvents when a specified field exists in the received event's schema, such as the following example:
    Geometry EXISTS
    .
  • ISNULL—This operator retains GeoEvents 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 a zero-length (or empty) string.