BigQuery - Convert Bytes to BASE64 or HEX String

visibility 595 access_time 9 months ago languageEnglish
BigQuery - Convert Bytes to BASE64 or HEX String

BigQuery provides built-in functions to convert bytes to BASE64 or HEX string.

Code snippet

SELECT TO_BASE64(MD5('ABC')) AS BASE64, TO_HEX(MD5('ABC')) AS HEX;

Results:

JSON result:

[{"BASE64": "kC+90rHfDE9wtKXSNSXpMg==","HEX": "902fbdd2b1df0c4f70b4a5d23525e932"}]
copyright This page is subject to Site terms.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

timeline Stats
Page index 2.43
More from Kontext
Teradata: FIRST_VALUE and LAST_VALUE Funtions
visibility 425
thumb_up 0
access_time 10 months ago
Create Table Stored as CSV, TSV, JSON Format - Hive SQL
visibility 6,626
thumb_up 1
access_time 2 years ago