You can translate the question and the replies:

Vertical pivoting

Hi Team, Is there a way to do vertical pivoting in denodo? I have one data element which is a combination of 3 fields basically seperated by ~. Example: abc~dfv~1234 cvfdv~as~23 So the first seperation till ~ belongs to field A, second part belongs to field B and third belongs to field 3. I applied split('~',Data element) which splits but return in terms of array. Flattening this array creates duplicates. I need to either pivot the array vertically or need to understand how will i retrieve individual array elements. Please help !
user
26-09-2019 05:07:14 -0400

1 Answer

Hi, I think you an still use SPLIT function. I tried the following steps and it worked for me. 1. Create a Selection view and Split the data element in array form like: split_field = SPLIT('~',<data element>) 2. Create another selection view and create three columns on each element of the array split_field of step 2 like: 3. col_1 = ("split_field")[0].string 4. col_2 = ("split_field")[1].string 5. col_3 = ("split_field")[2].string And remove the split_field column from this view and save it. You should be able to get the values like: | Col_1 | Col_2 | Col_3 | | -------- | -------- | -------- | | abc | dfv | 1234 | Hope this helps!
Denodo Team
27-09-2019 02:05:46 -0400
You must sign in to add an answer. If you do not have an account, you can register here