Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Returns a sha1 hash value as a hex string of the column.
For the corresponding Databricks SQL function, see sha function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.sha(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
Target column to compute on. |
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.range(1).select(dbf.sha(dbf.lit("Spark")))
df.show()
+--------------------+
| sha(Spark)|
+--------------------+
|85f5955f4b27a9a4c...|
+--------------------+