Syntax
Parameters
-
variant_expr: the expression that represents the VARIANT object. This is typically a VARIANT column from an Iceberg table. -
path: the expression that represents the path to an element in the VARIANT object. The value of this parameter is a string. The path syntax is similar to JSON path:$represents the root element.is used to access object fields[index]is used to access array elements (0-based indexing)- Field names with special characters can be quoted:
$."field.name"
Return values
get_variant_int: Returns a BIGINT value, or NULL if the value cannot be converted to an integer.get_variant_double: Returns a DOUBLE value, or NULL if the value cannot be converted to a double.get_variant_string: Returns a VARCHAR value, or NULL if the value cannot be converted to a string.get_variant_bool: Returns a BOOLEAN value (1 or 0), or NULL if the value cannot be converted to a boolean.