COF-C03 Question 116
Single answerSecureA financial services company stores customer transaction data in a shared Snowflake database. Analysts need access to a view that masks the underlying business logic and prevents exposure of sensitive base-table details through query optimization or metadata inspection. The security team also wants to reduce the risk that users can infer information about the underlying tables from the view definition. Which Snowflake object should be created to meet this requirement?
- A
A materialized view on the transaction table
- B
A secure view on the transaction table
- C
A temporary view in the analysts' schema
- D
An external table over the transaction files
Show answer and explanation
Correct answer: B
Explanation
The best answer is to create a secure view. In Snowflake, secure views are designed for scenarios where data providers want to expose only the results of a query while offering stronger protections around the underlying query logic and metadata. This is especially relevant in secure data sharing and other regulated environments. Standard views do not provide the same level of protection because certain optimizations and metadata behaviors can reveal more than intended. Materialized views focus on performance, temporary views focus on session lifecycle, and external tables are for querying externally stored data. Snowflake documentation and best practices for secure data sharing and data governance consistently identify secure views as the appropriate object for protecting sensitive logic and limiting information leakage.
- A. Incorrect.
Incorrect. A materialized view improves query performance by storing precomputed results, but it is not designed to hide view definitions or prevent certain metadata exposure in the way required here. Materialized views address performance optimization, not the specific security requirement of protecting underlying logic and limiting exposure through metadata.
- B. Correct.
Correct. A secure view is specifically intended for cases where the view definition and underlying table details should be better protected. Secure views disable some internal optimizations that could otherwise expose sensitive information indirectly, and they are commonly used for data sharing and other scenarios where the provider wants tighter control over what consumers can infer from the underlying objects.
- C. Incorrect.
Incorrect. A temporary view is session-scoped and mainly used for short-lived development or session-specific work. It does not provide the additional security guarantees of a secure view and does not address the requirement to better protect the underlying logic from exposure.
- D. Incorrect.
Incorrect. An external table is used to query data stored outside Snowflake, such as in cloud object storage. It is unrelated to the requirement of securely exposing a derived dataset from existing Snowflake tables while protecting the underlying implementation details.