I am trying to use the below logic to get the expected output, but getting error mentioned on my question,
I am trying to unnest multiple columns based on comma delimiter and to avoid duplicates while unnesting it and doing a join to avoid duplicates. when i join 2 columns with offset, i am not seeing any issues , but when doing with more than 2 columns, facing errors.
select Colm_A, Colm_B, Colm_C
from your_table,
unnest(split(Colm_B)) Colm_B with offset
join unnest(split(Colm_C)) Colm_C with offset join unnest(split(Colm_D)) Colm_D
using (offset);
SOURCE TABLE
Colm_A Colm_B Colm_C COL_D
1 Fish F H
2 Dog,cat D,C G,T
Expected output
Colm_A Colm_B Colm_C COLM_D
1 Fish F H
2 Dog D G
2 Cat C T
Use below
with output