v.18.16New Feature
Added Base64 Functions: base64Encode, base64Decode, tryBase64Decode
Added functions for working with base64:base64Encode,base64Decode,tryBase64Decode. Alexander Krasheninnikov
Why it matters
These functions provide native support for Base64 encoding and decoding within ClickHouse queries, enabling easier manipulation and transformation of Base64-encoded data without the need for external processing or custom code.How to use it
Use the functions directly in your SQL queries as follows:SELECT base64Encode('your_string') AS encoded;
SELECT base64Decode('base64_string') AS decoded;
SELECT tryBase64Decode('possibly_invalid_base64_string') AS decoded_or_null;The
tryBase64Decode function safely attempts to decode the input and returns NULL if the input is not valid Base64.