SnowPro Associate: Platform Question 325
Single answer● CLASSIFY_TEXT functionA healthcare analytics team stores patient support emails in a Snowflake table named SUPPORT_MESSAGES with a column called MESSAGE_TEXT. They want to automatically identify whether each email contains specific sensitive categories, such as medical conditions or financial information, before sharing the data with a broader analyst group. The team wants to use a built-in Snowflake SQL function and keep the workflow inside Snowflake without exporting data to an external ML service. Which approach best meets this requirement?
- A
Use the CLASSIFY_TEXT function on MESSAGE_TEXT to detect sensitive categories in the unstructured email content directly in SQL.
- B
Use MASKING POLICY on MESSAGE_TEXT because masking policies automatically classify text into sensitive categories before query execution.
- C
Use SEARCH OPTIMIZATION on MESSAGE_TEXT because it scans text for regulated content types such as PHI and PCI.
- D
Use a MATERIALIZED VIEW with a CASE expression and regular expressions because Snowflake does not provide a built-in function for text classification.
Show answer and explanation
Correct answer: A
Explanation
The best answer is to use CLASSIFY_TEXT, which is intended for classifying unstructured text directly in Snowflake SQL. This aligns with the scenario's goal of identifying sensitive information categories within patient support emails while keeping processing inside Snowflake. Masking policies and search optimization serve different purposes: masking policies enforce data access controls, and search optimization improves query performance. Although manual pattern matching with CASE and regex may help with narrow use cases, it does not replace Snowflake's built-in text classification capability for unstructured text. This reflects Snowflake best practice of using native platform features when available for governance and analysis workflows.
- A. Correct.
Correct. CLASSIFY_TEXT is a built-in Snowflake SQL function designed to classify unstructured text content into categories. In this scenario, it fits the requirement to analyze support email text directly inside Snowflake and identify sensitive content types without sending the data to an external service.
- B. Incorrect.
Incorrect. Masking policies control how data is displayed to different roles, but they do not perform text classification. A masking policy could be applied after sensitive data has been identified, but it is not the mechanism that detects sensitive categories in free-form text.
- C. Incorrect.
Incorrect. Search optimization improves the performance of selective queries, especially for point lookups and certain predicates, but it does not classify text or detect sensitive data categories. This option reflects a common confusion between performance features and data governance or AI functions.
- D. Incorrect.
Incorrect. While CASE expressions and regular expressions can sometimes detect simple patterns, Snowflake does provide a built-in function for text classification: CLASSIFY_TEXT. Regex-based logic is also less practical for broad semantic classification of unstructured email content.