Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

split_to_array function

Focus mode
split_to_array function - Amazon Redshift

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

Syntax

split_to_array( string,delimiter )

Arguments

string

The input string to be split.

delimiter

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.

Example

The following example show a split_to_array function.

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

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.