EXTRACT_SEMANTIC_CATEGORIES

functiondeferredGovernance (policies, tags, data quality)Enterprise+

docs.snowflake.com ↗

System functions

Note EXTRACT_SEMANTIC_CATEGORIES is a legacy function. Snowflake recommends using other methods of implementing sensitive data classification. Returns a set of categories (semantic and privacy) for each supported column in the specified table or view. To return the categories for a column, the column must use a data type that supports classification and does not contain all NULL values. The categories are derived from the metadata and data contained in the columns, as well as the metadata about the columns and data. The privacy categories rely on the generated semantic categories, if any. This feature requires Enterprise Edition or higher. To inquire about upgrading, please contact Snowflake Support.

Syntax

supportedpartialnot supportednot scored

EXTRACT_SEMANTIC_CATEGORIES( '<object_name>' [ , <max_rows_to_scan> ] )

Parameters

NameRequiredDescription
object_namerequiredThe name of the table, external table, view, or materialized view containing the columns to be classified. If a database and schema is not in use in the current session, the name must be fully-qualified. The name must be specified exactly as it is stored in the database. If the name contains special characters, capitalization, or blank spaces, the name must be enclosed first in double-quotes and then in single quotes.
max_rows_to_scanoptionalThe sample size of rows to use for determining the classification categories in the specified table/view. Valid values: 1 to 10000 Default: 10000

Returns

As a representative example, the JSON object has the following structure: Where:

Usage notes

Known gaps

Parts not fully supported, and recorded divergences from Snowflake.