unbase64 function (Databricks SQL)

Returns a decoded base64 string as binary.

Syntax

unbase64(expr)

Arguments

  • expr: A STRING expression in a base64 format.

Returns

A BINARY.

Examples

> SELECT cast(unbase64('U3BhcmsgU1FM') AS STRING);
 Spark SQL