I have a query in Postgres that needs to be ported to Impala SQL. It looks like this:
SELECT
a.id,
unnest(array[
'colname1',
'colname2',
'colname3']) as "Column"
unnest(array[
a.value1,
b.value2,
c.value3]) as "Value"
FROM
public.table1 a
INNER JOIN public.table2 b on b.table2id = a.table2id
INNER JOIN public.table3 c on c.table3id = a.table3id
Is there any way to replicate this in Impala? It doesn’t seem to support conversion to complex types on-the-fly this way. I’m experimenting with using LOAD DATA to just hard-code the string array, but I’m lost as to how to express the second array (which looks like a funky sub-SELECT?) in Impala’s complex data type paradigm.