variant_type_name
variant_type_name(value: variant) -> string
Resolves the data type of a variant column so that column may be typed for better performance.
Given a variant value (typically, something you get from looking up a path or element in a JSON object or array,) determine what type that value has.
The possible types are:
- "string"
- "bool"
- "float64"
- "int64"
- "object"
- "array"
- null
Domain
This is a scalar function (calculates a single output value for a single input row).
Categories
Examples
This code parses a JSON object from string, and then constructs a column
containing the name of the type of each object in that made object. The values
of the columns will be:
| column | value |
|---|---|
| typ_str | "string" |
| typ_int | "int64" |
| typ_flt | "float64" |
| typ_bol | "bool" |
| typ_obj | "object" |
| typ_ary | "array" |
| typ_nul | "null" |
| typ_xxx | null |