This is a Vertica User Defined Functions (UDF) for split string to multple rows.
STRSPLIT ( string [using parameters seperator=':separator'] ) over(...)
Parameters:
- string: input string.
- separator: separator character for spliting, default value is ','.
- (return): concat string of input express on window.
select word from strsplitTEST;
word
----------------
SingleWord
Break,On,Comma
Break:On:Colon
(3 rows)
select strsplit(word) over () from strsplittest;
word
----------------
SingleWord
Break
On
Comma
Break:On:Colon
(5 rows)
select strsplit(word using parameters separator=':') over () from strsplittest;
word
----------------
SingleWord
Break,On,Comma
Break
On
Colon
(5 rows)
Befoe build and install, g++ should be available(yum -y groupinstall "Development tools" && yum -y groupinstall "Additional Development" can help on this).
- Build: make
- Install: make install
- Test: make run
- Uninstall make uninstall