Troubleshooting sensitive data classification

View classification errors in the Trust Center

You can see which objects failed classification and read the error message for each object in the Snowsight without using SQL. Complete the following steps:

  1. In the navigation menu, select Governance & security » Trust Center.

  2. Select the Data Security tab.

  3. Select the Dashboard tab.

  4. Select the Classification errors tile.

For the full workflow, see Classification errors in Use the Trust Center to set up sensitive data classification.

Why a table might not be classified, and how to find errors

A table might not get classified for several reasons. The simplest check is whether Snowflake can query the table: run a query against it (for example, SELECT * FROM my_table). If a table can’t be queried, it can’t be classified.

Other failures can include tagging or privilege issues, data format problems, or restrictions on secure objects or certain views. When classification fails, you can find details in these places:

In general, there is a delay before Snowflake tries to classify the object again. Every additional failed attempt is logged to the event table. This delay and retry process continues until the object is fixed or removed from automatic classification.

Note

To help avoid unnecessary costs, Snowflake waits additional time to retry classification for some errors, such as timeouts. For these timeout errors, Snowflake doesn’t retry classification until all objects are reclassified; the schedule on which objects are reclassified is controlled by the maximum_classification_validity_days key of the classification profile.

If you want to prevent classification events from being logged, set the ENABLE_AUTOMATIC_SENSITIVE_DATA_CLASSIFICATION_LOG account parameter to FALSE.

Listing general errors

The following query returns general errors related to sensitive data classification from the event table:

SELECT
  record_type,
  record:severity_text::string log_level,
  parse_json(value) error_message
  FROM <event_db>.<event_schema>.<event_table>
  WHERE record_type='LOG' and scope:name ='snow.automatic_sensitive_data_classification'
  ORDER BY log_level;

For a subset of the possible error messages returned by this query, see Tag-related error messages.

Listing object-level classification errors

The following query against the event table returns errors related to the classification of a specific object. For example, it returns errors that occurred when Snowflake tried to classify a specific table.

SELECT
  RECORD_ATTRIBUTES:"object_name"::string AS object_name,
  parse_json(value):"error_message" error_message,
  PARSE_JSON(VALUE):"profile_name" classification_profile_name,
  timestamp,
  FROM <event_db>.<event_schema>.<event_table>
  WHERE record_type='LOG'
    AND scope:name ='snow.automatic_sensitive_data_classification'
    AND RECORD_ATTRIBUTES:"event_type" = 'CLASSIFICATION_ERROR'
  ORDER BY TIMESTAMP DESC;