BigQuery

Fungsi SQL BigQuery

Data warehouse serverless dari Google Cloud. 48 fungsi tersedia.

Menampilkan 24 dari 48 fungsi dalam kategori String

REGEXP_EXTRACT_ALL

String

Extracts all substrings that match the regular expression and returns them as an array.

Tipe hasil: ARRAY<STRING>

REGEXP_INSTR

String

Returns the position (1-based) of the substring that matches the regular expression. Returns 0 if there is no match.

Tipe hasil: INT64

REGEXP_REPLACE

String

Replaces all substrings that match the regular expression with a replacement string. Supports backreferences.

Tipe hasil: STRING

REGEXP_SUBSTR

String

Alias for REGEXP_EXTRACT. Extracts the substring that matches the regular expression.

Tipe hasil: STRING

REPEAT

String

Repeats a string n times. Useful for generating patterns.

Tipe hasil: STRING

REPLACE

String

Replaces all occurrences of a substring with a new string. Replacement is case-sensitive.

Tipe hasil: STRING

REVERSE

String

Reverses the order of characters in a string. The first character becomes the last and vice versa.

Tipe hasil: STRING

RIGHT

String

Extracts a specified number of characters from the right (end) of a string. A more readable shorthand for extracting trailing characters.

Tipe hasil: STRING

RPAD

String

Pads the right side of a string with characters until it reaches a specified length. Right padding.

Tipe hasil: STRING

RTRIM

String

Removes characters from the right side (end) of a string. Right trim for trailing characters.

Tipe hasil: STRING

SAFE_CONVERT_BYTES_TO_STRING

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.

Tipe hasil: STRING

SESSION_USER

String

Mengembalikan email address dari user yang menjalankan query.

Tipe hasil: STRING

SHA1

String

Menghitung SHA-1 hash dari input. Return BYTES.

Tipe hasil: BYTES

SHA256

String

Menghitung SHA-256 hash dari input. Aman untuk kriptografi.

Tipe hasil: BYTES

SHA512

String

Menghitung SHA-512 hash dari input. Hash paling kuat di keluarga SHA-2.

Tipe hasil: BYTES

SPLIT

String

Splits a string into an array based on a delimiter. Very useful for parsing CSV-style data.

Tipe hasil: ARRAY<STRING>

STARTS_WITH

String

Checks whether a string begins with a specified prefix. Returns a boolean.

Tipe hasil: BOOL

STRPOS

String

Finds the first position of a substring within a string. A simplified version of INSTR.

Tipe hasil: INT64

SUBSTR

String

Extracts a portion of characters from a string starting at a specified position. An alias for SUBSTRING, highly useful for data extraction and parsing.

Tipe hasil: STRING

SUBSTRING

String

Extracts a portion of characters from a string. Identical to SUBSTR, available for standard SQL compatibility.

Tipe hasil: STRING

TO_CODE_POINTS

String

Converts a STRING or BYTES value into an array of code points (Unicode code points for STRING, values 0-255 for BYTES).

Tipe hasil: ARRAY<INT64>

TRANSLATE

String

Replaces each character from the source character set with the corresponding character in the target character set. Character-level translation.

Tipe hasil: STRING

TRIM

String

Removes characters from the beginning and end of a string. By default, removes whitespace.

Tipe hasil: STRING

UPPER

String

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

Tipe hasil: STRING