I am writing a query inside of AWS Athena. The Origianl Table is something like:
employee|manager1|manager2|manager3|... | manager10
12345|A . |B . |C . |... | (null)
54321|I . |II . |III . |... | X
And the result should look like:
employee | manager
12345 . | A
12345 . | B
12345 . | C
54321 | I
54321 . | II
54321 . |...
54321 . | X
I tried to use unpivot inside of Athena but got some syntax errors. Also, with unpivot it means i need to hardcoding all these columns.
This is my first time with Athena and I don't know if Athena can achieve it or not. And if yes, what's the correct way?