Berserk Docs
Types

Introduction to Types

KQL scalar types overview

Every value in KQL has a scalar type. Types determine which operators and functions can be applied to a value.

Scalar Types

TypeDescriptionExample literals
boolTrue or falsetrue, false
int32-bit signed integer42, -1
long64-bit signed integer100000000000
real64-bit floating point3.14, 1e10, real(+inf)
decimal128-bit high-precision numberdecimal(1.23456789)
stringUTF-8 text"hello", 'world'
datetimePoint in time (UTC)datetime(2026-03-11)
timespanDurationtimespan(1d), 5m, 2h
guidGlobally unique identifierguid(...)
dynamicJSON-like value (array, object, or scalar)dynamic([1, 2]), dynamic({"a": 1})

Non-Finite Reals

real covers the IEEE 754 non-finite values. Write them with the real(...) constructor (double(...) is an alias), which takes inf, infinity or nan, signed or bare:

print pos = real(+inf), neg = real(-infinity), non = real(nan)

The name only means a non-finite value as the constructor's argument — a bare inf elsewhere is an ordinary column reference, so a column named inf stays reachable. Only real and double accept one: long(inf) is an error.

tostring renders them inf, -inf and NaN, and the conversion functions read those spellings back, so toreal(tostring(real(+inf))) round-trips. toreal also accepts "Infinity" and "-Infinity".

Unlike Kusto, a non-finite value written inside a dynamic literal stays a real. Kusto parses its dynamic literals as JSON, which has no infinity, so there the value degrades to the string "Infinity":

print s = dynamic([10.0, real(+inf), 10.0])
| extend elem_type = gettype(s[1])   // "real" here, "string" in Kusto

Null

Most scalar types have a null value representing missing or unknown data. Null propagates through arithmetic and ordering comparisons (int(null) < 4 is null) — but equality against a concrete value is two-valued: int(null) == 4 is false and int(null) != 4 is true. See Nulls, Dynamics, and Coercion for the full rules.

T | where isnull(value)
T | extend result = iif(isnull(x), "missing", tostring(x))

The string type is an exception — see Strings and Null for details.

Type Conversions

Use type conversion functions to convert between types:

T | extend n = toint("42")
T | extend t = todatetime("2026-03-11")
T | extend s = tostring(42)

See Scalar Functions for the full list of conversion functions.

Type Classes

Some functions and operators work with any type that has certain capabilities. A type class is a group of types that share a common behavior — for example, ordered groups all types that can be compared and sorted.

On this page