FNV_HASH

Hash function

Description

FNV_HASH Computes the 64-bit FNV-1a non-cryptographic hash function for all basic data types. (Redshift SQL Language Reference FNV_HASH function).

In Snowflake there is no equivalent function that provide the FNV algorithm, but HASH 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;

Output Code:

OUT -> Redshift_01.sql
SELECT
       HASH('John Doe') as FNV_HASH,
       HASH('John Doe') as FNV_HASH_SEED;

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.

Known Issues

There are no known issues.

There are no known issues.

Last updated