isNotNull
isNotNull
✓ BooleanCheck 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.
Edge Cases
Section titled “Edge Cases”- Returns
truefor empty strings"", zero0, andfalse(all valid, non-null values) - Returns
falseonly if the field is missing or explicitlynull isNotNull(x)is equivalent to!(isNull(x))
Examples
Section titled “Examples”| 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.