union_value
Create a union with one member. The tag comes from the name of the argument, as in union_value(k := 1).
Try an expression
In Formula, enter the expression and set Output type to VARCHAR.
Expression
union_value(k := 'hello')Result
'hello'The expression returns UNION(k VARCHAR). Formula stores it as VARCHAR in this example. To use your own data, replace the example values with column names. Keep format strings and other options as written.
Arguments and types
union_value(...)Supported signatures (1)
union_value(...: ANY) → UNIONThe result type can depend on the input types. See DuckDB for the full argument rules.
Things to know
The selected member can be missing
union_value(name := NULL::VARCHAR)'NULL'
Function metadata from DuckDB, used under the MIT license.