I have the following table with the parent_path array:
Id | Account Name | parent_path
1 A {1}
2 B {2,1}
3 C {3,2,1}
4 D {4,3,2,1}
What I'm looking to do is to have a recursive left join in order to create 1 column per item in the parent_path array
Id | Account Name | parent_path | parent_name1 | parent_name2 | parent_name3
1 A NULL NULL NULL NULL
2 B {1} A NULL NULL
3 C {2,1} B A NULL
4 D {3,2,1} C B A
Thanks!
map(id -> account_name)on the parent_path array), or limit the number ofparent_name_xcolumns.