String Functions

This section provides reference information for the string functions in PlaidCloud Lakehouse.


APPEND_TRAILING_CHAR_IF_ABSENT

Use the APPEND_TRAILING_CHAR_IF_ABSENT string function in PlaidCloud Lakehouse. Appends a trailing character to a string if it is not already present.

ASCII

Learn how to use the ASCII string function in PlaidCloud Lakehouse. Returns the ASCII code of the first character in a string - with syntax and examples.

CHAR

Learn how to use the CHAR string function in PlaidCloud Lakehouse. Returns the character for a given ASCII code - see syntax, examples, and output.

CHAR_LENGTH

Learn how to use the CHAR_LENGTH string function in PlaidCloud Lakehouse. Returns the number of characters in a string - see syntax, examples, and output.

CHARACTER_LENGTH

Learn how to use the CHARACTER_LENGTH string function in PlaidCloud Lakehouse. Returns the number of characters in a string. Alias for CHAR_LENGTH.

CONCAT

Learn how to use the CONCAT string function in PlaidCloud Lakehouse. Concatenates two or more strings - see syntax, examples, and output.

CONCAT_WS

Learn how to use the CONCAT_WS string function in PlaidCloud Lakehouse. Concatenates strings with a separator - see syntax, examples, and output.

CRC32

Learn how to use the CRC32 string function in PlaidCloud Lakehouse. Returns the CRC-32 checksum of a string as an unsigned integer - with syntax and examples.

ENDS_WITH

Learn how to use the ENDS_WITH string function in PlaidCloud Lakehouse. Checks whether a string ends with a specified suffix - with syntax and examples.

FIELD

Learn how to use the FIELD string function in PlaidCloud Lakehouse. Returns the index position of a value in a list of arguments - with syntax and examples.

FIND_IN_SET

Learn how to use the FIND_IN_SET string function in PlaidCloud Lakehouse. Returns the position of a string within a comma-separated list.

FORMAT_BYTES

Use the FORMAT_BYTES string function in PlaidCloud Lakehouse. Converts a byte count into a human-readable string with the appropriate unit (B, KB, MB, GB, TB,.

GROUP_CONCAT

Learn how to use the GROUP_CONCAT string function in PlaidCloud Lakehouse. Concatenates values from a group into a single string with a separator.

HEX

Learn how to use the HEX string function in PlaidCloud Lakehouse. Returns the hexadecimal representation of a string or number - with syntax and examples.

HEX_DECODE_BINARY

Learn how to use the HEX_DECODE_BINARY string function in PlaidCloud Lakehouse. Decodes a hexadecimal string to a binary value - with syntax and examples.

HEX_DECODE_STRING

Learn how to use the HEX_DECODE_STRING string function in PlaidCloud Lakehouse. Decodes a hexadecimal string to a VARCHAR string - with syntax and examples.

INET_ATON

Learn how to use the INET_ATON string function in PlaidCloud Lakehouse. Converts an IPv4 address string to a numeric value - with syntax and examples.

INITCAP

Learn how to use the INITCAP string function in PlaidCloud Lakehouse. Capitalizes the first letter of each word in a string - with syntax and examples.

INSTR

Learn how to use the INSTR string function in PlaidCloud Lakehouse. Returns the position of the first occurrence of a substring in a string.

LCASE

Learn how to use the LCASE string function in PlaidCloud Lakehouse. Converts a string to lowercase. Alias for LOWER - see syntax, examples, and output.

LEFT

Learn how to use the LEFT string function in PlaidCloud Lakehouse. Returns the leftmost N characters of a string - see syntax, examples, and output.

LENGTH

Learn how to use the LENGTH string function in PlaidCloud Lakehouse. Returns the length of a string in bytes - see syntax, examples, and output.

LOCATE

Learn how to use the LOCATE string function in PlaidCloud Lakehouse. Returns the position of the first occurrence of a substring in a string.

LOWER

Learn how to use the LOWER string function in PlaidCloud Lakehouse. Converts a string to lowercase - see syntax, examples, and output.

LPAD

Learn how to use the LPAD string function in PlaidCloud Lakehouse. Pads a string on the left to a specified length with a fill string.

LTRIM

Learn how to use the LTRIM string function in PlaidCloud Lakehouse. Removes leading whitespace or specified characters from a string - with syntax and examples.

MONEY_FORMAT

Learn how to use the MONEY_FORMAT string function in PlaidCloud Lakehouse. Formats a number as a currency string with commas and two decimal places.

NGRAM_SEARCH

Learn how to use the NGRAM_SEARCH string function in PlaidCloud Lakehouse. Returns a similarity score between two strings based on n-gram matching.

NULL_OR_EMPTY

Learn how to use the NULL_OR_EMPTY string function in PlaidCloud Lakehouse. Checks whether a string is NULL or empty. Returns 1 if true, 0 otherwise.

PARSE_URL

Learn how to use the PARSE_URL string function in PlaidCloud Lakehouse. Extracts a specified part from a URL string - see syntax, examples, and output.

REGEXP_SPLIT

Learn how to use the REGEXP_SPLIT string function in PlaidCloud Lakehouse. Splits a string by a regular expression pattern and returns an array of substrings.

REPEAT

Learn how to use the REPEAT string function in PlaidCloud Lakehouse. Repeats a string a specified number of times - see syntax, examples, and output.

REPLACE

Learn how to use the REPLACE string function in PlaidCloud Lakehouse. Replaces all occurrences of a substring with another substring - with syntax and examples.

REVERSE

Learn how to use the REVERSE string function in PlaidCloud Lakehouse. Reverses a string - see syntax, examples, and output.

RIGHT

Learn how to use the RIGHT string function in PlaidCloud Lakehouse. Returns the rightmost N characters of a string - see syntax, examples, and output.

RPAD

Learn how to use the RPAD string function in PlaidCloud Lakehouse. Pads a string on the right to a specified length with a fill string.

RTRIM

Learn how to use the RTRIM string function in PlaidCloud Lakehouse. Removes trailing whitespace or specified characters from a string.

SPACE

Learn how to use the SPACE string function in PlaidCloud Lakehouse. Returns a string consisting of a specified number of spaces - with syntax and examples.

SPLIT

Learn how to use the SPLIT string function in PlaidCloud Lakehouse. Splits a string by a delimiter and returns an array - see syntax, examples, and output.

SPLIT_PART

Learn how to use the SPLIT_PART string function in PlaidCloud Lakehouse. Splits a string by a delimiter and returns the element at a specified index.

STARTS_WITH

Learn how to use the STARTS_WITH string function in PlaidCloud Lakehouse. Checks whether a string starts with a specified prefix - with syntax and examples.

STR_TO_MAP

Learn how to use the STR_TO_MAP string function in PlaidCloud Lakehouse. Splits a string into key-value pairs and returns a map - with syntax and examples.

STRCMP

Use the STRCMP string function in PlaidCloud Lakehouse. Compares two strings lexicographically. Returns 0 if equal, -1 if str1 < str2, 1 if str1 > str2.

STRLEFT

Learn how to use the STRLEFT string function in PlaidCloud Lakehouse. Returns the leftmost N characters of a string. Alias for LEFT.

STRPOS

Learn how to use the STRPOS string function in PlaidCloud Lakehouse. Returns the position of the first occurrence of a substring. Alias for LOCATE.

STRRIGHT

Learn how to use the STRRIGHT string function in PlaidCloud Lakehouse. Returns the rightmost N characters of a string. Alias for RIGHT.

SUBSTR

Learn how to use the SUBSTR string function in PlaidCloud Lakehouse. Returns a substring starting from a specified position with an optional length.

SUBSTRING

Learn how to use the SUBSTRING string function in PlaidCloud Lakehouse. Returns a substring starting from a specified position. Alias for SUBSTR.

SUBSTRING_INDEX

Use the SUBSTRING_INDEX string function in PlaidCloud Lakehouse. Returns a substring from a string before or after a specified number of delimiter occurrences.

TOKENIZE

Use the TOKENIZE string function in PlaidCloud Lakehouse. Tokenizes a string into an array of terms using the specified analyzer. Useful for full-text search.

TRANSLATE

Learn how to use the TRANSLATE string function in PlaidCloud Lakehouse. Replaces characters in a string based on a character mapping - with syntax and examples.

TRIM

Learn how to use the TRIM string function in PlaidCloud Lakehouse. Removes leading and trailing whitespace or specified characters from a string.

UCASE

Learn how to use the UCASE string function in PlaidCloud Lakehouse. Converts a string to uppercase. Alias for UPPER - see syntax, examples, and output.

UNHEX

Learn how to use the UNHEX string function in PlaidCloud Lakehouse. Converts a hexadecimal string to a character string - see syntax, examples, and output.

UPPER

Learn how to use the UPPER string function in PlaidCloud Lakehouse. Converts a string to uppercase - see syntax, examples, and output.

URL_DECODE

Learn how to use the URL_DECODE string function in PlaidCloud Lakehouse. Decodes a URL-encoded string - see syntax, examples, and output.

URL_ENCODE

Learn how to use the URL_ENCODE string function in PlaidCloud Lakehouse. Encodes a string for use in a URL - see syntax, examples, and output.

URL_EXTRACT_HOST

Learn how to use the URL_EXTRACT_HOST string function in PlaidCloud Lakehouse. Extracts the host from a URL string - see syntax, examples, and output.

URL_EXTRACT_PARAMETER

Learn how to use the URL_EXTRACT_PARAMETER string function in PlaidCloud Lakehouse. Extracts the value of a query parameter from a URL string.