Trying to splint a string into multiple columns in qubole using presto query.
{"field0":[{"startdate":"2022-07-13","lastnightdate":"2022-07-16","adultguests":5,"childguests":0,"pets":null}]}
Would like startdate,lastnightdate,adultguests,childguests and pets into its own column.
I tried to unnest string but that didn't work.
The data looks a lot like json, so you can process it using json functions first (parse, extract, cast to
array(map(varchar, json))orarray(map(varchar, varcchar))) and then flatten withunnest:Output: