Fungsi String BigQuery
Fungsi untuk manipulasi teks dan karakter. Temukan semua 48 fungsi string di BigQuery lengkap dengan syntax, contoh, dan penjelasan bahasa Indonesia.
48 fungsi string di BigQuery
← Semua fungsi BigQueryASCII
Returns the ASCII value (code point) of the first character in the string.
INT64BYTE_LENGTH
Mengembalikan jumlah bytes dari STRING atau BYTES value.
INT64CHAR_LENGTH
Returns the number of characters in a string. An alias for LENGTH, available for standard SQL compatibility.
INT64CHR
Converts a Unicode code point value into a string character. The inverse of the ASCII function.
STRINGCODE_POINTS_TO_BYTES
Converts an array of code points (extended ASCII 0–255) into BYTES.
BYTESCODE_POINTS_TO_STRING
Converts an array of Unicode code points into a STRING.
STRINGCONCAT
Concatenates two or more strings into one. A foundational string concatenation function in BigQuery that supports multiple data types.
STRINGCONTAINS_SUBSTR
Checks whether a string contains a specified substring. Case-insensitive and supports JSON structures.
BOOLENDS_WITH
Checks whether a string ends with a specified suffix. Returns a boolean.
BOOLFARM_FINGERPRINT
Menghitung fingerprint menggunakan algoritma FarmHash. Sangat cepat dan cocok untuk BigQuery.
INT64FORMAT
Formats values into a string based on a format string (similar to printf). Supports a wide range of format specifiers.
STRINGGENERATE_UUID
Menghasilkan UUID (Universally Unique Identifier) versi 4 secara random.
STRINGINITCAP
Capitalizes the first letter of each word and lowercases the rest. Title case transformation.
STRINGINSTR
Finds the position of a substring within a string. Supports searching from a specific position and locating the nth occurrence.
INT64LEFT
Extracts a specified number of characters from the left (beginning) of a string. A more readable shorthand than SUBSTR for extracting leading characters.
STRINGLENGTH
Returns the number of characters in a string. For BYTES, returns the number of bytes.
INT64LOWER
Converts all characters in a string to lowercase. Supports Unicode characters.
STRINGLPAD
Pads the left side of a string with characters until it reaches a specified length. Left padding.
STRINGLTRIM
Removes characters from the left side (beginning) of a string. Left trim for leading characters.
STRINGMD5
Menghitung MD5 hash dari input. Return BYTES.
BYTESNORMALIZE
Normalizes a Unicode string to a canonical form. Useful for consistent string comparisons across different Unicode representations.
STRINGNORMALIZE_AND_CASEFOLD
Normalizes a Unicode string and applies case-folding for correct Unicode-aware case-insensitive comparisons.
STRINGREGEXP_CONTAINS
Returns TRUE if the value matches the regular expression. Useful for pattern matching and format validation.
BOOLREGEXP_EXTRACT
Extracts the first substring that matches the regular expression. If the pattern has a capturing group, returns that group instead.
STRINGREGEXP_EXTRACT_ALL
Extracts all substrings that match the regular expression and returns them as an array.
ARRAY<STRING>REGEXP_INSTR
Returns the position (1-based) of the substring that matches the regular expression. Returns 0 if there is no match.
INT64REGEXP_REPLACE
Replaces all substrings that match the regular expression with a replacement string. Supports backreferences.
STRINGREGEXP_SUBSTR
Alias for REGEXP_EXTRACT. Extracts the substring that matches the regular expression.
STRINGREPEAT
Repeats a string n times. Useful for generating patterns.
STRINGREPLACE
Replaces all occurrences of a substring with a new string. Replacement is case-sensitive.
STRINGREVERSE
Reverses the order of characters in a string. The first character becomes the last and vice versa.
STRINGRIGHT
Extracts a specified number of characters from the right (end) of a string. A more readable shorthand for extracting trailing characters.
STRINGRPAD
Pads the right side of a string with characters until it reaches a specified length. Right padding.
STRINGRTRIM
Removes characters from the right side (end) of a string. Right trim for trailing characters.
STRINGSAFE_CONVERT_BYTES_TO_STRING
Safely converts a BYTES value to a STRING, replacing any invalid UTF-8 characters with the Unicode replacement character instead of raising an error.
STRINGSESSION_USER
Mengembalikan email address dari user yang menjalankan query.
STRINGSHA1
Menghitung SHA-1 hash dari input. Return BYTES.
BYTESSHA256
Menghitung SHA-256 hash dari input. Aman untuk kriptografi.
BYTESSHA512
Menghitung SHA-512 hash dari input. Hash paling kuat di keluarga SHA-2.
BYTESSPLIT
Splits a string into an array based on a delimiter. Very useful for parsing CSV-style data.
ARRAY<STRING>STARTS_WITH
Checks whether a string begins with a specified prefix. Returns a boolean.
BOOLSTRPOS
Finds the first position of a substring within a string. A simplified version of INSTR.
INT64SUBSTR
Extracts a portion of characters from a string starting at a specified position. An alias for SUBSTRING, highly useful for data extraction and parsing.
STRINGSUBSTRING
Extracts a portion of characters from a string. Identical to SUBSTR, available for standard SQL compatibility.
STRINGTO_CODE_POINTS
Converts a STRING or BYTES value into an array of code points (Unicode code points for STRING, values 0-255 for BYTES).
ARRAY<INT64>TRANSLATE
Replaces each character from the source character set with the corresponding character in the target character set. Character-level translation.
STRINGTRIM
Removes characters from the beginning and end of a string. By default, removes whitespace.
STRINGUPPER
Converts all characters in a string to uppercase. Supports Unicode characters.
STRING