I have a table like
name string
address string
timezone string
one_key_value array<struct<key:string,value:array<string>>
two_key_value array<struct<key:string,value:array<string>>
and want to convert it to
name string
address string
timezone string
one_key_value map<string,array<string>>
two_key_value map<string,array<string>>
using presto. There is lateral view inline
but it doesn't really work in presto. How can I do this?
Based on the provided information, you basically need two things:
map_from_entries(one_key_value)
(docs: https://prestosql.io/docs/current/functions/map.html#map_from_entries)