I have a column of type long varchar that stores elements separated by the symbol ";".
Each record can have a length greater than 100,000 and more than 3,000 elements separated by ";".
I want to get the following
Original Table
| id | items |
|---|---|
| 1 | a_1;a_2; ... ; a_i |
| 2 | b_1;b_2; ... ; b_j |
| 3 | c_1;c_2; ... ; c_k |
Expected Table
| id | item |
|---|---|
| 1 | a_1 |
| 1 | a_2 |
| 1 | a_3 |
| ... | ... |
| 1 | a_i |
| 2 | b_1 |
| 2 | b_2 |
| 2 | b_3 |
| ... | ... |
| 2 | b_j |
I have tried the following:
-- Using Tokenizer select v_txtindex.StringTokenizerDelim(items, ';') over (partition by id) from foo; -- Using slip_part select split_part(items, ';', row_number() over (partition by id)) from foo; -- Using MapItems and MapDelimitedExtractor select id, mapitems(MapDelimitedExtractor(items using parameters delimiter = ';') over (partition best)) from foo;
But I got the following error:
[42883][3457] [Vertica]VJDBC ERROR: Function v_txtindex.StringTokenizerDelim(long varchar, unknown) does not exist, or permission is denied for v_txtindex.StringTokenizerDelim(long varchar, unknown)
Any suggestion to get the expected table.
Thank you very much in advance...