Scalar FunctionsType Functions
gettype
Return the type of a value as a string, from ADX's closed set of names.
A typed value reports string, int, long, real, bool,
datetime, timespan or guid (a typed null keeps its type's name).
A value inside a dynamic reports null, array, dictionary,
string, bool, long, double, datetime or timespan: a real
inside a dynamic is double, and an int packed into one is long.
Divergences from Microsoft Kusto:
- Berserk has no runtime
guidvalue. A guid-typed column reportsguid, but a guid literal,toguid()and a guid packed into a dynamic are strings and reportstring. - Berserk has no
decimaltype, sodecimalis never reported. parse_jsonkeeps a datetime- or guid-shaped JSON string astring; Kusto stores it as a dynamicdatetimeorguid.
Syntax
gettype(value)Parameters
Prop
Type
Returns: string
Examples
Example 1
print gettype(1), gettype(1.5), gettype("s"), gettype(true), gettype(dynamic([1, 2])), gettype(
dynamic({"a":1})
)| print_0 (string) | print_1 (string) | print_2 (string) | print_3 (string) | print_4 (string) | print_5 (string) |
|---|---|---|---|---|---|
| long | real | string | bool | array | dictionary |
Example 2
print gettype(dynamic(1.5)), gettype(pack("i", int(1))["i"])| print_0 (string) | print_1 (string) |
|---|---|
| double | long |