Categories: Semi-Structured Data
Explodes compound values into multiple rows. This function takes a
LIST column and produces a lateral view (that is, an inline view that contains correlation referring to other tables that precede it in the FROM clause).
FLATTEN(expression list) → list
- expression: The expression that will be unpacked into rows. The expression must be of data type
SELECT FLATTEN(CONVERT_FROM ('["Ford", "BMW", "Fiat"]', 'json'))