- Categories:
System functions (System information)
SYSTEM$ENCODE_CKE_PRIMARY_KEY¶
Takes one or more primary key columns from a Cortex Knowledge Extensions (CKE) document and converts them into an encoded representation.
The encoded primary key is used as an input for further hashing, which anonymizes document identifiers in access history tables. This process helps protect customer data by ensuring that Snowflake stores hashed values derived from the encoded primary key instead of plain-text document IDs.
- See also:
Syntax¶
Arguments¶
Required:
pk_column_nameThe primary key column name.
Optional:
additional_pk_column_nameAdditional primary key column names.
You can specify up to four additional primary key column names as separate arguments.
Returns¶
Returns a length-encoded string from the combined primary keys. This serves as the unique document ID.
Examples¶
The following example returns the encoded primary key for the primary key columns pkCol1 and pkCol2: