COF-R02 Sample Questions & Answers
Platform features and architecture tie with data transformation and protection updates for the top share, next to authentication and network security changes, query and resource performance, continuous loading, and secure sharing through the marketplace and clean rooms.
Launch the full COF-R02 simulator →Showing 10 of 20 free samples.
- Question 1Advanced
Data Sharing and Marketplace · Data Clean Rooms
A marketing analytics company and a retail company want to collaborate on a dataset containing customer purchase history and demographic information. Due to privacy regulations, neither party can move or see the other's raw data. They need a secure environment to run joint queries that analyze the combined data without exposing the underlying PII. Which Snowflake feature is specifically designed for this privacy-preserving collaboration?
Show answer & explanation
Correct answer: B
Snowflake Data Clean Rooms provide a secure environment where multiple parties can collaborate on sensitive data without sharing the raw data itself. Each party maintains control over their data, and they can run joint queries with predefined restrictions to protect privacy. This directly addresses the requirement for privacy-preserving analysis without data movement. While Secure Data Sharing with policies is a component, the 'Clean Room' concept holistically addresses this specific multi-party collaboration use case.
- Question 2Intermediate
Snowflake Cloud Data Platform Features and Architecture · Hybrid Tables (Unistore)
A development team is building an application that requires both transactional and analytical queries on the same dataset. They need low-latency point lookups and fast analytical scans without managing two separate systems or dealing with data movement latency. Which Snowflake table type is engineered to handle this hybrid workload?
Show answer & explanation
Correct answer: C
Hybrid Tables, the core of Snowflake's Unistore workload, are designed for Hybrid Transactional/Analytical Processing (HTAP). They use a row-based storage engine for fast, single-row operations (transactional) while integrating with Snowflake's existing columnar engine for fast analytical scans. This allows a single table to efficiently serve both types of queries.
- Question 3Advanced
Account Access and Security · Dynamic Data Masking with Role Checking
A security administrator needs to create a masking policy that redacts a string value differently based on the user's role. For users with the
ANALYSTrole, it should show the last four characters (e.g., '1234'). For all other roles, it should be fully masked (e.g., '*'). Which SQL function or construct would be used within the masking policy body to determine the current user's role?Show answer & explanation
Correct answer: B
The
IS_ROLE_IN_SESSION()function is specifically designed to be used within masking and row access policies. It checks if the specified role (e.g., 'ANALYST') is in the hierarchy of the current active primary or secondary roles for the user executing the query. This allows for conditional logic within the policy body.CURRENT_ROLE()only returns the primary active role, andCURRENT_USER()returns the user name, not their roles. - Question 4Beginner
Snowflake Cloud Data Platform Features and Architecture · Streamlit in Snowflake
A data analyst needs to build an interactive web application on top of data stored in Snowflake. The goal is to create and share data apps quickly without extensive web development experience. The application must be hosted and run securely within the Snowflake environment. Which Snowflake capability should the analyst use?
Show answer & explanation
Correct answer: C
Streamlit in Snowflake allows users to build, deploy, and share interactive data applications using Python, all within Snowflake's secure environment. It is specifically designed for rapidly creating data-centric web apps without needing front-end web development skills. Snowsight is for dashboards, and the Python Connector is a library for connecting to Snowflake from an external Python application, but it doesn't provide the application framework or hosting.
- Question 5Intermediate
Performance Concepts · Result Cache
An administrator is investigating query history and observes that some queries are being fulfilled by the
RESULT_SCANcommand. What does this indicate about those queries?Show answer & explanation
Correct answer: B
The
RESULT_SCANcommand is used to retrieve results from a previous query. When Snowflake can reuse the results of a previously executed query from the result cache, it does so without engaging a virtual warehouse for computation. This is a key performance and cost-saving feature. The local disk cache is used for data, not query results, and if a warehouse were used, the query profile would show compute activity. - Question 6Advanced
Performance Concepts · Combined Performance Optimization Strategy
Case Study:
A large e-commerce company, ShopSphere, uses Snowflake as its central data platform. They have a critical
ORDERStable that is several terabytes in size and receives millions of new records daily via Snowpipe. The data analytics team frequently runs queries that filter byORDER_DATEandSTATUS. The BI team runs dashboards that aggregate sales byPRODUCT_ID. The fraud detection team runs urgent, low-latency queries filtering byCUSTOMER_IDto check for suspicious activity.Currently, query performance is inconsistent. The analytics team's date-range queries are slow. The fraud team's point lookups on
CUSTOMER_IDoften take several seconds, which is too long for their real-time needs. The company wants to optimize performance for all three use cases while managing costs effectively. They have an Enterprise edition account.The proposed architecture is as follows:
graph TD subgraph Ingestion S3[S3 Bucket] --> Snowpipe end subgraph Snowflake Snowpipe --> Orders[ORDERS Table] Orders -->|Clustering| AnalyticsWH[Analytics WH] Orders -->|Search Opt.| FraudWH[Fraud WH] Orders -->|Materialized View| BI_WH[BI WH] end AnalyticsWH -->|Filter by ORDER_DATE| Analytics[Analytics Team] FraudWH -->|Filter by CUSTOMER_ID| Fraud[Fraud Team] BI_WH -->|Aggregate by PRODUCT_ID| BI[BI Team]
Which combination of Snowflake optimization features represents the most effective solution for meeting all of ShopSphere's requirements?Show answer & explanation
Correct answer: C
This solution correctly applies the best optimization feature for each distinct workload. 1) A clustering key on (ORDER_DATE, STATUS) will improve pruning for the analytics team's range queries. 2) The Search Optimization Service is specifically designed to accelerate low-latency, selective point-lookup queries, perfect for the fraud team's needs on a high-cardinality column like CUSTOMER_ID. 3) A materialized view will pre-compute the sales aggregates, providing the fastest possible performance for the BI team's dashboards. This multi-faceted approach is superior to using a single, less-targeted optimization method.
- Question 7Advanced
Data Sharing and Marketplace · Marketplace Paid Listings
A data provider on the Snowflake Marketplace wants to offer a usage-based pricing model for their data share. They want to charge consumers based on the number of queries they run against the shared data. How can the provider implement this?
Show answer & explanation
Correct answer: D
The Snowflake Marketplace natively supports multiple pricing models for paid listings, including 'Per Month' (subscription) and 'Per Query'. By selecting the 'Per Query' model when creating the listing, Snowflake automatically handles the tracking of queries against the shared objects and the subsequent billing, allowing providers to implement usage-based pricing.
- Question 8Intermediate
Data Loading and Unloading · COPY INTO with Masking
A data engineer is designing a data loading process for a table that will store sensitive PII. They need to ensure that the data is masked as it is being loaded using a
COPY INTOstatement, rather than applying masking policies for queries after the data has landed in plain text. Which feature allows for the application of a masking policy during the data loading process?Show answer & explanation
Correct answer: B
The
COPY INTO FROM (SELECT ...)syntax allows for data transformation during the load. To mask data on ingest, you can apply a function (which could be a standalone UDF or a function used in a masking policy) to the staged data columns within this SELECT statement. This transforms the data before it is written to the target table, ensuring the sensitive data never lands in plain text. - Question 9AdvancedSelect 3
Data Transformation and Protection · Unstructured Data Processing with External Functions
An organization needs to process unstructured data, such as PDFs and images, that are stored in an external stage. They want to use external libraries to perform Optical Character Recognition (OCR) and extract text. The processing logic will be invoked via a SQL call from Snowflake. Which components are required to build this solution? (Select THREE).
Show answer & explanation
Correct answers: A, B, D
To process a file from a stage, a scoped URL is generated to provide temporary, secure access to that specific file for the external service.
The External Function is the Snowflake object that acts as a proxy to the remote HTTP service (e.g., an AWS Lambda function) that performs the OCR.
The API Integration object stores the necessary information, such as the API provider and security credentials, to establish a secure and authenticated connection to the remote endpoint.
- Question 10Intermediate
Performance Concepts · Multi-cluster Warehouse Scaling
A data administrator is reviewing the cost of a multi-cluster warehouse. They notice that the warehouse frequently scales up to its maximum cluster count during peak hours but then remains at that high count for a significant time after the query load decreases, leading to excess credit consumption. Which warehouse parameter should be adjusted to make the warehouse scale down more quickly once the query load subsides?
Show answer & explanation
Correct answer: C
The
SCALING_POLICYparameter controls how quickly a multi-cluster warehouse scales down. The default is 'STANDARD', which prioritizes conserving credits but may be slower to shut down clusters. Changing the policy to 'ECONOMY' will cause clusters to shut down more aggressively after they finish executing queries, which is the desired behavior for reducing costs when query loads decrease.
Ready for the real thing?
The full COF-R02 simulator has every exam-style question, timed mode, and instant scoring.