sha function (Databricks SQL)

Returns a sha1 hash value as a hex string of expr.

Syntax

sha(expr)

Arguments

  • expr: A BINARY or STRING expression.

Returns

A STRING.

This function is a synonym for sha1 function (Databricks SQL).

Examples

> SELECT sha('Spark');
 85f5955f4b27a9a4c2aab6ffe5d7189fc298b92c