ARA-C01 Question 62
Single answerAggregate policiesA healthcare analytics company stores patient-level claims in a Snowflake table. Analysts across many business units need to query summary statistics such as total cost and average claim amount, but compliance requires preventing users from inferring information about very small groups. The architect decides to use an aggregate policy on sensitive columns so that grouped query results are returned only when enough underlying rows contribute to each aggregate result. Which approach best meets this requirement while minimizing application changes?
- A
Create an aggregate policy that enforces a minimum group size, attach it to the sensitive column, and have analysts query aggregates normally so Snowflake suppresses results for groups that do not meet the threshold.
- B
Create a masking policy on the claim amount column and configure it to return NULL whenever a query contains GROUP BY on fewer than the required number of rows.
- C
Create a row access policy to block access to rows when the total number of rows in a group is below the threshold, so aggregate queries will automatically become compliant.
- D
Create a secure view that pre-aggregates data at a compliant grain and rely on BI users to avoid drilling into smaller groups, because aggregate policies cannot be attached to columns used in analytic queries.
Show answer and explanation
Correct answer: A
Explanation
The best answer is to use an aggregate policy, because Snowflake provides aggregate policies specifically to help prevent sensitive information from being exposed through aggregate query results when too few records contribute to the result. This is well aligned to privacy-preserving analytics use cases such as healthcare, finance, and HR. Compared with masking policies and row access policies, aggregate policies address a different problem: governing whether an aggregate result can be returned based on characteristics of the contributing set, such as minimum group size. In practice, architects should use the policy-based approach when they need centralized enforcement with minimal change to analyst workflows. Snowflake documentation on aggregate policies and policy-based access controls distinguishes aggregate policies from masking and row access policies, and recommends using the policy type that matches the control objective.
- A. Correct.
Correct. Aggregate policies are designed to protect against disclosure from aggregate queries by enforcing constraints such as minimum group size before aggregate results are returned. Applying the policy to a sensitive column allows users to continue running normal aggregate queries while Snowflake evaluates whether the result satisfies the policy. This is the most direct control for the stated requirement and generally minimizes changes in consuming tools and SQL patterns.
- B. Incorrect.
Incorrect. Masking policies govern how individual column values are exposed at query time, not whether an aggregate result is allowed based on the number of contributing rows. A masking policy cannot reliably detect and enforce aggregate-query privacy semantics like minimum group size for grouped results. This option reflects a common misconception that all data protection requirements can be solved with masking.
- C. Incorrect.
Incorrect. Row access policies filter row visibility based on the querying role and row attributes, not on the cardinality of rows contributing to an aggregate result. Blocking rows conditionally by group size is not what row access policies are designed for, and trying to use them for this purpose would be difficult to implement and would not provide the intended aggregate-result privacy guarantees.
- D. Incorrect.
Incorrect. A secure view can be part of a broader design, but it does not by itself enforce dynamic minimum-group-size checks across arbitrary analyst queries. The statement that aggregate policies cannot be attached to columns used in analytic queries is false. This option is plausible because pre-aggregation is a common workaround, but it does not best satisfy the requirement to let analysts query summary statistics flexibly while Snowflake enforces the threshold.