- Categories:
String & binary functions (General) , Semi-structured and structured data functions (Conversion/Casting)
STRTOK_TO_ARRAY¶
Tokenizes the given string using the given set of delimiters and returns the tokens as an ARRAY value.
Syntax¶
Arguments¶
Required:
stringText to be tokenized.
Optional:
delimiterSet of delimiters.
Default: A single space character.
Returns¶
This function returns a value of type ARRAY or NULL.
The function returns an empty array if tokenization produces no tokens.
If either argument is a NULL or JSON null value, the function returns NULL.
Examples¶
The following example uses the STRTOK_TO_ARRAY function to split a string into an array:
The following example tokenizes on multiple delimiters (. and @):