Skip to content

isNotNull

isNotNull

✓ Boolean

Check if a value is defined and not null

isNotNull(value) → boolean
boolean

true if value is defined and not null, false otherwise

The isNotNull function returns true if the input value is not null and the field is present, otherwise false.

  • Returns true for empty strings "", zero 0, and false (all valid, non-null values)
  • Returns false only if the field is missing or explicitly null
  • isNotNull(x) is equivalent to !(isNull(x))
| where isNotNull(user)

Matches records where the user field is present and not null.

| eval has_metadata = isNotNull(metadata_json)

Creates a boolean field has_metadata that is true if metadata_json exists.

| where isNotNull(user_id) && isNotNull(request_id)

Filters to records with both user and request identifiers.

  • where — as a filter condition
  • eval — to create a boolean field