union_extract
Extract the value with the named tags from the union. NULL if the tag isn't currently selected.
Try an expression
In Formula, enter the expression and set Output type to VARCHAR.
Expression
union_extract(union_value(k := 'hello'), 'k')Result
'hello'To use your own data, replace the example values with column names. Keep format strings and other options as written.
Arguments and types
union_extract(union, tag)- union
- Union
- tag
- Text
Supported signatures (1)
union_extract(union: UNION, tag: VARCHAR) → ANYThe result type can depend on the input types. See DuckDB for the full argument rules.
Function metadata from DuckDB, used under the MIT license.