String functions

This section describes the following string functions:

  • BASE64_DECODE: Decode a base 64 string into a string

  • BASE64_TO_HEX: Converts a base 64 string into a hex string

  • BYTES_SUBSTRING: Returns a substring of the input, using the offsets in bytes of the UTF-8 encoded byte representation. Partial characters and invalid UTF-8 code points are removed from the result.

  • CONCAT: Returns the concatenation of string1, string2, ..., stringN.

  • DATE: Casts String to Date

  • JOIN_ARRAYS: Joins any number of arrays by index using a MessageFormat pattern

  • LENGTH: Gets the length of the string

  • LOWER: Converts the string to lowercase letters

  • LPAD: Pad the input string to the left with a given padding string up until size

  • LTRIM: Returns the given string without leading whitespaces

  • MD5: Hashes the input using MD5

  • PARSE_DATETIME: Parses string into a timestamp with time zone using format

  • REPLACE: Replaces all instances of search with replace in input. If search is empty, inserts replace in front of every character and at the end of the input.

  • REVERSE: Returns a string with the characters in reverse order.

  • RPAD: Pad the input string to the right with a given padding string up until size

  • RTRIM: Returns the given string without trailing whitespaces

  • SHA1: Hashes the input using SHA-1

  • SHA256: Hashes the input using SHA-256

  • SHA3_512: Hashes the input using SHA3-512

  • SHA512: Hashes the input using SHA-512

  • SORT_VALUES: Returns the values sorted in dictionary order

  • SPLIT: Returns the given string split by the provided delimiter. Does not remove empty entries.

  • SPLIT_TO_RECORD: Returns the given string split by the provided delimiter.

  • STRING_FORMAT: Format any number of inputs into a string using the given format

  • STRIP_MARGIN: For each line remove prefix of control or whitespace characters followed by the given margin char

  • STRIP_PREFIX: Remove the given prefix string from the beginning of the string

  • STRIP_SUFFIX: Remove the given suffix string from the end of the string

  • STRPOS: Returns the starting position of the first instance of substring in string. Positions start with 1. If not found, 0 is returned.

  • SUBSTR: Returns a substring from string of length length from the starting position start. Positions start with 1. A negative starting position is interpreted as being relative to the end of the string.

  • SUBSTRING: Returns a substring from string of length length from the starting position start. Positions start with 1. A negative starting position is interpreted as being relative to the end of the string.

  • TRANSLATE: Translates the given value using a given dictionary

  • TRIM: Returns the given string without leading or trailing whitespaces

  • TRIM_CHARS: Returns the given string without leading or trailing characters

  • UPPER: Converts the string to uppercase letters

  • UUID_GENERATOR: Returns UUID

  • XX_HASH: Hashes the input using xxHash

Last updated