BigQuery

Fungsi SQL BigQuery

Data warehouse serverless dari Google Cloud. 48 fungsi tersedia.

Menampilkan 24 dari 48 fungsi dalam kategori String

ASCII

String

Returns the ASCII value (code point) of the first character in the string.

Tipe hasil: INT64

BYTE_LENGTH

String

Mengembalikan jumlah bytes dari STRING atau BYTES value.

Tipe hasil: INT64

CHAR_LENGTH

String

Returns the number of characters in a string. An alias for LENGTH, available for standard SQL compatibility.

Tipe hasil: INT64

CHR

String

Converts a Unicode code point value into a string character. The inverse of the ASCII function.

Tipe hasil: STRING

CODE_POINTS_TO_BYTES

String

Converts an array of code points (extended ASCII 0–255) into BYTES.

Tipe hasil: BYTES

CODE_POINTS_TO_STRING

String

Converts an array of Unicode code points into a STRING.

Tipe hasil: STRING

CONCAT

String

Concatenates two or more strings into one. A foundational string concatenation function in BigQuery that supports multiple data types.

Tipe hasil: STRING

CONTAINS_SUBSTR

String

Checks whether a string contains a specified substring. Case-insensitive and supports JSON structures.

Tipe hasil: BOOL

ENDS_WITH

String

Checks whether a string ends with a specified suffix. Returns a boolean.

Tipe hasil: BOOL

FARM_FINGERPRINT

String

Menghitung fingerprint menggunakan algoritma FarmHash. Sangat cepat dan cocok untuk BigQuery.

Tipe hasil: INT64

FORMAT

String

Formats values into a string based on a format string (similar to printf). Supports a wide range of format specifiers.

Tipe hasil: STRING

GENERATE_UUID

String

Menghasilkan UUID (Universally Unique Identifier) versi 4 secara random.

Tipe hasil: STRING

INITCAP

String

Capitalizes the first letter of each word and lowercases the rest. Title case transformation.

Tipe hasil: STRING

INSTR

String

Finds the position of a substring within a string. Supports searching from a specific position and locating the nth occurrence.

Tipe hasil: INT64

LEFT

String

Extracts a specified number of characters from the left (beginning) of a string. A more readable shorthand than SUBSTR for extracting leading characters.

Tipe hasil: STRING

LENGTH

String

Returns the number of characters in a string. For BYTES, returns the number of bytes.

Tipe hasil: INT64

LOWER

String

Converts all characters in a string to lowercase. Supports Unicode characters.

Tipe hasil: STRING

LPAD

String

Pads the left side of a string with characters until it reaches a specified length. Left padding.

Tipe hasil: STRING

LTRIM

String

Removes characters from the left side (beginning) of a string. Left trim for leading characters.

Tipe hasil: STRING

MD5

String

Menghitung MD5 hash dari input. Return BYTES.

Tipe hasil: BYTES

NORMALIZE

String

Normalizes a Unicode string to a canonical form. Useful for consistent string comparisons across different Unicode representations.

Tipe hasil: STRING

NORMALIZE_AND_CASEFOLD

String

Normalizes a Unicode string and applies case-folding for correct Unicode-aware case-insensitive comparisons.

Tipe hasil: STRING

REGEXP_CONTAINS

String

Returns TRUE if the value matches the regular expression. Useful for pattern matching and format validation.

Tipe hasil: BOOL

REGEXP_EXTRACT

String

Extracts the first substring that matches the regular expression. If the pattern has a capturing group, returns that group instead.

Tipe hasil: STRING