Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
Calculates the MD5 digest and returns the value as a 32 character hex string. Supports Spark Connect.
For the corresponding Databricks SQL function, see md5 function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.md5(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
Target column to compute on. |
Returns
pyspark.sql.Column: the column for computed results.
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('ABC',)], ['a'])
df.select('*', dbf.md5('a')).show(truncate=False)
+---+--------------------------------+
|a |md5(a) |
+---+--------------------------------+
|ABC|902fbdd2b1df0c4f70b4a5d23525e932|
+---+--------------------------------+