hash_many()

Applies to: ✅ Azure Data ExplorerAzure MonitorMicrosoft Sentinel

Returns a combined hash value of multiple values.

Syntax

hash_many(s1 , s2 [, s3 ...])

Learn more about syntax conventions.

Parameters

Name Type Required Description
s1, s2, ..., sN scalar ✔️ The values to hash together.

Returns

The hash() function is applied to each of the specified scalars. The resulting hashes are combined into a single hash and returned.

Warning

The function uses the xxhash64 algorithm to calculate the hash for each scalar, but this may change. We therefore only recommend using this function within a single query where all invocations of the function will use the same algorithm.

If you need to persist a combined hash, we recommend using hash_sha256(), hash_sha1(), or hash_md5() and combining the hashes into a single hash with a bitwise operator. Note that these functions are more complex to calculate than hash().

Examples

print value1 = "Hello", value2 = "World"
| extend combined = hash_many(value1, value2)

Output

value1 value2 combined
Hello World -1440138333540407281