- Categories:
System functions (System information)
SYSTEM$CKE_HASH_FUNCTION¶
Analyzes Cortex Knowledge Extensions (CKE) usage by mapping hashedDocumentIds back to your original document primary keys in the Cortex Search Service. This is required because Snowflake shares only hashed IDs for privacy.
This function returns the hashed document identifier, which maps to the HASHED_DOC_ID in the LISTING_ACCESS_HISTORY view.
- See also:
Syntax¶
Arguments¶
hash_versionThe version of the hash function used, provided in the LISTING_ACCESS_HISTORY view view.
encoded_primary_keyThe encoded primary keys returned when you call the SYSTEM$ENCODE_CKE_PRIMARY_KEY function.
Returns¶
Returns the hashed encoded primary keys specified by the hash version.
Examples¶
The following example retrieves the hash version and uses the SYSTEM$CKE_HASH_FUNCTION to compute a hashed document ID for every primary
key. In the following example, cke_document_daily_access is a view created from the LISTING_ACCESS_HISTORY view: