decode_base64

Description

DecodeBase64 decodes a base64 encoded input

Return type

string

Domain

This is a scalar function (calculates a single output value for a single input row.)

Categories

Usage

decode_base64(str, [ urlSafe ], [ ignorePadding ])

Argument

Type

Optional

Repeatable

Restrictions

str

string

no

no

none

urlSafe

bool

yes

no

constant

ignorePadding

bool

yes

no

constant

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’.

Aliases

decodebase64 (deprecated)