DAA-C01 Question 138
Single answerUse Data Metric Functions (DMFs)A retail analytics team stores daily sales transactions in a Snowflake table named SALES_FACT. They recently discovered that some ETL jobs occasionally load duplicate ORDER_ID values and, on certain days, CUSTOMER_ID is missing for a subset of rows. The team wants Snowflake to continuously evaluate these data quality conditions directly on the table and make the results available for monitoring over time, without writing custom validation queries for each run. Which approach should the data analyst use?
- A
Attach built-in Data Metric Functions to SALES_FACT for metrics such as uniqueness on ORDER_ID and null-count or null-percentage on CUSTOMER_ID, and schedule evaluations through a data metric function association.
- B
Create a masking policy on ORDER_ID and CUSTOMER_ID so Snowflake can detect duplicate and null values during query execution and record the results historically.
- C
Define a search optimization service on SALES_FACT so Snowflake automatically scans for duplicates and missing values and stores the quality metrics for trend analysis.
- D
Create a materialized view that filters duplicate ORDER_ID and null CUSTOMER_ID rows; Snowflake will treat the view definition as a persistent data quality rule set with built-in metric history.
Show answer and explanation
Correct answer: A
Explanation
The best answer is to use Data Metric Functions. In Snowflake, DMFs are the native mechanism for measuring and monitoring data quality on supported objects. They can be associated with tables or views to evaluate metrics such as uniqueness, null counts, and related quality indicators on a scheduled basis. This makes them appropriate when a team wants ongoing, repeatable quality checks without maintaining separate ad hoc SQL validations. By contrast, masking policies are for data protection, Search Optimization Service is for query performance, and materialized views are for persisted query results rather than built-in quality metric tracking. Snowflake documentation on Data Metric Functions and associating DMFs with objects describes using system DMFs for common quality checks and reviewing metric results over time.
- A. Correct.
Correct. Data Metric Functions (DMFs) are designed for data quality measurement on Snowflake objects. Built-in DMFs can be associated with a table or view column set to evaluate conditions such as uniqueness and null-related metrics. Their results can be monitored over time, which fits the requirement to avoid repeatedly writing custom validation SQL for each run. This is the intended Snowflake-native approach for tracking table data quality metrics.
- B. Incorrect.
Incorrect. Masking policies are used to protect sensitive data by dynamically obscuring values based on role or context. They do not evaluate data quality dimensions like duplicates or null rates, and they do not provide historical data quality metric tracking.
- C. Incorrect.
Incorrect. Search Optimization Service improves selective query performance by creating metadata structures that help accelerate certain lookups. It is not a data quality framework and does not compute or store duplicate-rate or null-rate metrics.
- D. Incorrect.
Incorrect. A materialized view could expose rows that violate expected conditions, but it does not natively provide DMF-style data quality metric evaluation and historical measurement. It also still requires custom logic and is not the Snowflake feature built specifically for ongoing data quality monitoring.