COF-C03 Question 117
Single answerSecureA healthcare company shares a Snowflake database with an external analytics partner. The shared table contains patient records, and the company must ensure the partner can query only de-identified data while preventing exposure of the underlying filtering and masking logic. The company also wants to minimize the risk that users can infer protected values from the shared objects' definitions. Which Snowflake object should be used to meet these requirements?
- A
A standard view that selects only approved columns from the base table
- B
A materialized view built on the base table and shared to the partner
- C
A secure view that applies the required filtering and masking logic
- D
A temporary table created from the base table and shared to the partner
Show answer and explanation
Correct answer: C
Explanation
The best answer is to use a secure view. In Snowflake, secure views are intended for cases where data providers need to share filtered or transformed data without exposing the implementation details of the view. This is especially relevant in secure data sharing scenarios and when working with sensitive datasets such as healthcare records. Standard views provide logical abstraction, but secure views add protections around the visibility of view definitions and are recommended when the underlying logic itself could leak sensitive information. Materialized views are for performance, not for protecting logic in a shared interface, and temporary tables cannot be used as a persistent shared object. This aligns with Snowflake guidance on secure views and secure data sharing best practices.
- A. Incorrect.
Incorrect. A standard view can restrict columns and rows, but its definition is not protected in the same way as a secure view. For scenarios involving sensitive data sharing, a standard view does not provide the additional privacy protections Snowflake designed for secure objects. A candidate might choose this because views are commonly used for abstraction, but the requirement explicitly includes protecting the underlying logic and reducing inference risk.
- B. Incorrect.
Incorrect. A materialized view is intended for performance optimization by storing precomputed results. It is not the primary control for concealing business logic or protecting sensitive filtering and masking definitions in a data-sharing scenario. While it can improve query performance, it does not address the stated requirement as directly as a secure view.
- C. Correct.
Correct. A secure view is specifically designed for sensitive use cases, including secure data sharing. It hides the view definition and provides stronger privacy protections than a standard view, helping prevent consumers from seeing or inferring sensitive logic from the object definition. This makes it the appropriate choice when exposing only de-identified data to another party through Snowflake sharing.
- D. Incorrect.
Incorrect. Temporary tables are session-scoped and are not suitable for sharing with external consumers. They are intended for short-lived internal workloads, not durable, shareable interfaces for secure data access. Someone might select this option thinking it reduces persistence risk, but it does not satisfy the sharing requirement.