Forum Discussion
Jens_Fiederer
Apr 19, 2024Copper Contributor
"gettype()" function in KQL - "double" result
"double" is supposedly not a datatype in Kusto (Copilot says it is a synonym for "real"), but the gettype function will return it as a value... gettype(123.45) -> "real" gettype(cm.total) -> "doubl...
Kidd_Ip
Aug 27, 2025MVP
How about this:
- Normalize the output: You can write a wrapper function or conditional logic that maps "double" to "real" before processing.
- Raise a documentation request: You're spot-on, Microsoft should either:
- Normalize gettype() to always return "real" for doubles, or
- Explicitly mention "double" as a possible return value in the docs.
let type = gettype(cm.total);
case(
type == "double", "real",
type == "long", "long",
type == "string", "string",
"unknown"
)
- Jens_FiedererAug 27, 2025Copper Contributor
Thanks, didn't actually have any problems dealing with it when I found out what was going on...don't know how to do a formal "documentation request", this was sort of my ineffectual attempt at one!