BigQuery

Fungsi SQL BigQuery

Data warehouse serverless dari Google Cloud. 220 fungsi tersedia.

Menampilkan 24 dari 220 fungsi

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

ROUND

Math

Rounds a number to the specified decimal precision using the half-away-from-zero rounding method.

Tipe hasil: Same as input type

ROW_NUMBER

Window

Assigns a unique sequential number to each row within a partition, starting at 1. No duplicate values are assigned.

Tipe hasil: INT64

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_ADD

Math

Melakukan penjumlahan aman yang mengembalikan NULL jika overflow.

Tipe hasil: Same as input

SAFE_CAST

Conversion

Mengkonversi expression ke tipe data yang ditentukan, mengembalikan NULL jika gagal.

Tipe hasil: Specified type or NULL

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

SAFE_DIVIDE

Math

Performs safe division that returns NULL instead of an error when the divisor is zero.

Tipe hasil: FLOAT64

SAFE_MULTIPLY

Math

Melakukan perkalian aman yang mengembalikan NULL jika terjadi overflow.

Tipe hasil: Same as input

SAFE_NEGATE

Math

Mengembalikan negasi (nilai negatif) secara aman, NULL jika overflow.

Tipe hasil: Same as input

SAFE_OFFSET

Array

Mengakses elemen array dengan zero-based index, mengembalikan NULL jika out of bounds.

Tipe hasil: Element type or NULL

SAFE_ORDINAL

Array

Mengakses elemen array dengan one-based index, mengembalikan NULL jika out of bounds.

Tipe hasil: Element type or NULL

SAFE_SUBTRACT

Math

Melakukan pengurangan aman yang mengembalikan NULL jika overflow.

Tipe hasil: Same as input

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