decode_base64
Aliases: decodebase64 (deprecated).
decode_base64(str: string, [urlSafe: const bool]?, [ignorePadding: const bool]?) -> string
DecodeBase64 decodes a base64 encoded input
Domain
This is a scalar function (calculates a single output value for a single input row).
Categories
Examples
make_col decoded: decode_base64(data)
Decodes the value of the base64 encoded field data
make_col decoded: decode_base64(log, true)
Decodes the value of the URL safe base64 encoded field data
make_col decoded: decode_base64(log, false, true)
Decodes the value of the base64 encoded field data, ignoring any padding requirement.
Consider the following column: +--------+ | log | +--------+ | YQ=== | | YQ== | | YQ= | | YQ | +--------+
The above statement adds the decoded column as follows:
+-------+---------+
| log | decoded |
+-------+---------+
| YQ=== | a |
| YQ== | a |
| YQ= | a |
| YQ | a |
+-------+---------+
Regardless of the padding, the log column decodes to 'a'.
Updated 8 days ago