How do I convert a tuple to an array type?
I have
('a', 'b')
And want to convert to an array type
['a', 'b']
The primary reason for the conversion is to use the arrayMap(~)
function to transform the elements. The tuple type doesn't seem to have an equivalent function.
Thanks
You can do something like this:
:) select array(untuple(('a', 'b'))) AS out
┌─out───────┐
│ ['a','b'] │
└───────────┘
Thanks