Skip to content
REFERENCE

String Functions

A list of available functions to manipulate string types


concat_with_separator(separator:string:…)

Section titled “concat_with_separator(separator:string:…)”

Concatenate many strings, separated by separator. NULL inputs are skipped.

concat_with_separator(separator: STRING, string: STRING, ...: STRING) -> STRING

Concatenate many strings. NULL inputs are skipped. See also string || string.

concat(value: STRING, ...: STRING) -> STRING

Return true if search_string is found within string.

contains(value: STRING, search_string: STRING) -> BOOLEAN

Return true if string ends with search_string.

ends_with(value: STRING, search_string: STRING) -> BOOLEAN

Selects the largest value using lexicographical ordering. Note that lowercase characters are considered ‘larger’ than uppercase characters.

greatest(x1: STRING, x2: STRING, ...: STRING) -> STRING

Selects the smallest value using lexicographical ordering. Note that uppercase characters are considered ‘smaller’ than lowercase characters.

least(x1: STRING, x2: STRING, ...: STRING) -> STRING

Convert a base64 encoded string to a character string.

from_base64(value: STRING) -> STRING

Number of characters in string.

length(value: STRING) -> BIGINT

Convert string to lower case.

lower(value: STRING) -> STRING

Returns the MD5 hash of the string as a VARCHAR.

md5_hash(value: STRING) -> STRING

regex_extract_first(string:pattern:options?)

Section titled “regex_extract_first(string:pattern:options?)”

Extracts the first matched sequence of characters that matches the regular expression pattern.

regex_extract_first(string: STRING, pattern: STRING, options?: STRING) -> STRING

regex_extract_all(string:pattern:options?)

Section titled “regex_extract_all(string:pattern:options?)”

Extracts non-overlapping occurrences of regex in string. A set of optional options can be set.

regex_extract_all(string: STRING, pattern: STRING, options?: STRING) -> STRING[]

regex_replace_all(string:pattern:replacement:options?)

Section titled “regex_replace_all(string:pattern:replacement:options?)”

If string contains the regex pattern, replaces all matching parts with replacement. A set of optional options can be set.

regex_replace_all(string: STRING, pattern: STRING, replacement: STRING, options?: STRING) -> STRING[]

Returns ‘true’ if string contains the regex pattern, otherwise false.

regex_contains(string: STRING, pattern: STRING) -> STRING[]

Replaces any occurances of the source with the target within string.

replace(string: STRING, source: STRING, target: STRING) -> STRING

Reverses the provided value.

reverse(value: STRING) -> STRING

Returns a VARCHAR with the SHA-256 hash of the value.

sha256_hash(value: STRING) -> STRING

Splits the string along the separator.

split(value: STRING, separator: STRING) -> STRING[]

Removes any spaces from either side of the string.

trim(value: STRING) -> STRING

Removes any occurrences of any of the characters from either side of the string.

trim_clean(value: STRING, characters: STRING) -> STRING

Convert string to upper case.

upper(value: STRING) -> STRING