FNV_HASH Computes the 64-bit FNV-1a non-cryptographic hash function for all basic data types.
().
InSnowflake there is no equivalent function that provide the FNV algorithm, but function provides the same non-cryptographic functionality.
Grammar Syntax
FNV_HASH(value [, seed])
Sample Source Patterns
Input Code:
IN -> Redshift_01.sql
SELECT FNV_HASH('John Doe') as FNV_HASH,
FNV_HASH('John Doe', 3) as FNV_HASH_SEED;
FNV_HASH
FNV_HASH_SEED
-1568545727084176168
-5484851035903916490
Output Code:
OUT -> Redshift_01.sql
SELECT
HASH('John Doe') as FNV_HASH,
HASH('John Doe') as FNV_HASH_SEED;
FNV_HASH
FNV_HASH_SEED
3199932455444588441
3199932455444588441
In Redshift's FNV_HASH function, the seed parameter is optional, but it is not used in the Snowflake's Hash function since the seed parameter is only used on FNV algorithm.