EXTRACT_SEMANTIC_CATEGORIES
functiondeferredGovernance (policies, tags, data quality)Enterprise+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
| Name | Required | Description |
|---|---|---|
object_name | required | The 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_scan | optional | The 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
- The function requires a running warehouse. The warehouse can affect performance and cost.
- This function is no longer being updated to coincide with additional enhancements to Data Classification.
Known gaps
- The emulator has no data-classification engine to infer semantic or privacy categories from column contents.