Piotr Pawlaczek
01/31/2023, 3:30 PMunnest function counterpart in Flink SQL?
For example, lets say I have a following csv file:
Date,USD,GBP
2022-08-01,1.01,1.30
In postgres I can run:
SELECT date,
unnest(array['USD','GBP']) as currency
unnset(array[USD,GBP]) as rate
so I get:
date. |currency|rate
----------+--------+----
2022-08-01|USD. |1.01
2022-08-01|GBP. |1.30
In other words: is there a way to convert columns into rows?Martijn Visser
01/31/2023, 3:31 PMCROSS JOIN UNNEST - See https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/sql/queries/joins/#array-expansion