Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Decodes a BASE64 encoded string column and returns it as a binary column.
For the corresponding Databricks SQL function, see unbase64 function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.unbase64(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
target column to work on. |
Returns
pyspark.sql.Column: encoded string value.
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame(["U3Bhcms=", "UHlTcGFyaw==", "UGFuZGFzIEFQSQ=="], "STRING")
df.select("*", dbf.unbase64("value")).show(truncate=False)