split_to_array function - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

split_to_array function

Uses a delimiter as an optional parameter. If no delimiter is present, then the default is a comma.


split_to_array( string,delimiter )



The input string to be split.


An optional value on which the input string will be split. The default is a comma.

Return type

The split_to_array function returns a SUPER data value.


The following example show a split_to_array function.

SELECT SPLIT_TO_ARRAY('12|345|6789', '|'); split_to_array ------------------------- ["12","345","6789"] (1 row)