XXH3
less than a minute
Overview
The XXH3 converter computes a 64-bit xxHash XXH3 hash of a string and returns it as a hexadecimal string. XXH3 is a non-cryptographic hash function designed for speed, suitable for data partitioning, deduplication, and checksum use cases.
Syntax
XXH3(value)
- value: the string to hash
Examples
Input
{
"_type": "log",
"body": {
"short_text": "Hello, World!",
"long_text": "The quick brown fox jumps over the lazy dog"
},
"resource": {...},
"attributes": {}
}
Statement
set(attributes["hash_short"], XXH3(body["short_text"]))
set(attributes["hash_long"], XXH3(body["long_text"]))
Output
{
"_type": "log",
"body": {
"short_text": "Hello, World!",
"long_text": "The quick brown fox jumps over the lazy dog"
},
"resource": {...},
"attributes": {
"hash_short": "60415d5f616602aa",
"hash_long": "ce7d19a5418fb365"
}
}
Each string produced a deterministic 16-character hexadecimal hash. The same input always produces the same hash.