APPROXIMATE_JACCARD_INDEX

functionsupportedCore SQL functions

docs.snowflake.com ↗

Aggregate functionsWindow functions

Returns an estimation of the similarity (Jaccard index) of inputs based on their MinHash states. For more information about Jaccard indexes and the related function MINHASH, see Estimating Similarity of Two or More Sets. Alias for APPROXIMATE_SIMILARITY

Syntax

supportedpartialnot supportednot scored

APPROXIMATE_JACCARD_INDEX( [ DISTINCT ] <expr> [ , ... ] )

APPROXIMATE_JACCARD_INDEX(*)

Parameters

NameRequiredDescription
exprrequiredThe expression(s) should be one or more MinHash states returned by calls to the MINHASH function. In other words, the expressions must be MinHash state information, not the column or expression for which you want the approximate similarity. (The example below helps make this clear.) For more information about MinHash states, see Estimating Similarity of Two or More Sets.

Returns

A floating point number between 0.0 and 1.0 (inclusive), where 1.0 indicates that the sets are identical, and 0.0 indicates that the sets have no overlap.

Usage notes