Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Evaluates an expression and returns a Boolean result indicating whether the value is null.
Note
String values can't be null. Use isempty to determine if a value of type string is empty or not.
Syntax
isnull(Expr)
Learn more about syntax conventions.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| Expr | scalar | ✔️ | The expression to evaluate whether the value is null. The expression can be any scalar value other than strings, arrays, or objects that always return false. For more information, see The dynamic data type. |
Returns
Returns true if the value is null and false otherwise. Empty strings, arrays, property bags, and objects always return false.
The following table lists return values for different expressions (x):
| x | isnull(x) |
|---|---|
"" |
false |
"x" |
false |
parse_json("") |
true |
parse_json("[]") |
false |
parse_json("{}") |
false |
Example
Find the storm events for which there's no begin location.
StormEvents
| where isnull(BeginLat) and isnull(BeginLon)
| project StartTime, EndTime, EpisodeId, EventId, State, EventType, BeginLat, BeginLon
Output
| StartTime | EndTime | EpisodeId | EventId | State | EventType | BeginLat | BeginLon |
|---|---|---|---|---|---|---|---|
| 2007-01-01T00:00:00Z | 2007-01-01T05:00:00Z | 4171 | 23358 | WISCONSIN | Winter Storm | ||
| 2007-01-01T00:00:00Z | 2007-01-31T23:59:00Z | 1492 | 7067 | MINNESOTA | Drought | ||
| 2007-01-01T00:00:00Z | 2007-01-31T23:59:00Z | 1492 | 7068 | MINNESOTA | Drought | ||
| 2007-01-01T00:00:00Z | 2007-01-31T23:59:00Z | 1492 | 7069 | MINNESOTA | Drought | ||
| 2007-01-01T00:00:00Z | 2007-01-31T23:59:00Z | 1492 | 7065 | MINNESOTA | Drought | ||
| 2007-01-01T00:00:00Z | 2007-01-31T23:59:00Z | 1492 | 7070 | MINNESOTA | Drought | ||
| 2007-01-01T00:00:00Z | 2007-01-31T23:59:00Z | 1492 | 7071 | MINNESOTA | Drought | ||
| 2007-01-01T00:00:00Z | 2007-01-31T23:59:00Z | 1492 | 7072 | MINNESOTA | Drought | ||
| 2007-01-01T00:00:00Z | 2007-01-31T23:59:00Z | 2380 | 11735 | MINNESOTA | Drought | ||
| 2007-01-01T00:00:00Z | 2007-01-31T23:59:00Z | 1492 | 7073 | MINNESOTA | Drought | ||
| 2007-01-01T00:00:00Z | 2007-01-31T23:59:00Z | 2240 | 10857 | TEXAS | Drought | ||
| 2007-01-01T00:00:00Z | 2007-01-31T23:59:00Z | 2240 | 10858 | TEXAS | Drought | ||
| 2007-01-01T00:00:00Z | 2007-01-31T23:59:00Z | 1492 | 7066 | MINNESOTA | Drought | ||
| ... | ... | ... | ... | ... | ... | ... | ... |