Skip to content
Advertisement

How to break a row into multiple rows based on a column value in Athena (Presto)?

I have a Athena table that has a column containing array of values. I want to create multiple rows from one row such that the column of array can be changed to contain only 1 value.

E.g. :

to look like :

How can I write my query to achieve this?

Advertisement

Answer

I think unnest() does what you want:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement