View Full Snowflake SnowPro Core COF-C03 Exam Dumps and Practice Test Dumps.
Question 161
Which Snowflake feature allows users to recover a dropped table within the applicable retention period?
- Time Travel
- Fail-safe
- Resource Monitor
- Search Optimization
Correct Answer: 1
Explanation
Time Travel allows Snowflake users to access or recover historical data and objects within the applicable retention period. If a table is accidentally dropped, an authorized user can use the appropriate recovery command while the dropped object remains within its Time Travel window. This capability is useful for accidental deletion, data investigation, and restoring previous states. Time Travel is controlled through retention settings and differs from Fail-safe, which is intended for disaster recovery after the Time Travel period. Understanding the distinction helps administrators choose the appropriate recovery mechanism for different situations.
Question 162
Which command can restore a dropped schema during its available Time Travel period?
- RECOVER SCHEMA
- UNDROP SCHEMA
- RESTORE SCHEMA
- ALTER SCHEMA RECOVER
Correct Answer: 2
Explanation
The UNDROP SCHEMA command is used to restore a dropped schema when the schema remains within the applicable Time Travel retention period. This recovery capability can be valuable after accidental deletion because the schema and its supported objects can potentially be restored without rebuilding everything manually. The availability of recovery depends on the object type and its retention configuration. UNDROP is distinct from commands that create new schemas because it restores a previously dropped object. Administrators should act within the retention window when recovery is required.
Question 163
What happens when a Snowflake query references an unqualified table name while a current schema is set?
- Snowflake uses the current schema for object resolution
- Snowflake always searches every database
- Snowflake ignores the current schema
- Snowflake converts the name into a stage
Correct Answer: 1
Explanation
When a query uses an unqualified table name, Snowflake uses the session’s current database and schema context to help resolve the object. For example, if the current database and schema are set appropriately, a reference such as SELECT * FROM CUSTOMERS can resolve without specifying the complete database and schema path. This makes SQL shorter and easier to write. However, fully qualified names can be preferable when queries need to clearly identify objects across multiple schemas or databases. Session context therefore plays an important role in object name resolution.
Question 164
Which identifier format explicitly specifies database, schema, and table in Snowflake?
- schema.table
- table.column
- database.schema.table
- warehouse.database.table
Correct Answer: 3
Explanation
A fully qualified table identifier in Snowflake can specify the database, schema, and table using the format database.schema.table. This removes ambiguity when multiple databases or schemas contain objects with similar names. For example, a query can explicitly reference a table in a particular database and schema without relying on the session’s current database or schema. The warehouse is not part of a table’s object identifier. Fully qualified identifiers are particularly useful in shared SQL code, data pipelines, and administrative operations where predictable object resolution is important.
Question 165
Which Snowflake command changes the current schema for a session?
- USE SCHEMA
- SET SCHEMA
- ALTER SESSION SCHEMA
- CHANGE SCHEMA
Correct Answer: 1
Explanation
The USE SCHEMA command changes the current schema context for the active Snowflake session. Once a schema is selected, unqualified object references can resolve against that schema within the current database context. For example, a user can execute USE SCHEMA ANALYTICS.PUBLIC; and then reference tables without repeatedly specifying the schema. This command changes session context rather than modifying the schema itself. Similar USE commands can establish the current database and warehouse, helping users control which objects and compute resources subsequent SQL statements reference.
Question 166
Which Snowflake command changes the active virtual warehouse for a session?
- SET WAREHOUSE
- USE WAREHOUSE
- ALTER SESSION WAREHOUSE
- CHANGE COMPUTE
Correct Answer: 2
Explanation
USE WAREHOUSE changes the active virtual warehouse for the current Snowflake session. The selected warehouse provides the compute resources for operations that require warehouse processing. Users who work with multiple warehouses can switch between them depending on workload requirements, resource allocation, or organizational policies. The command changes session context rather than modifying the warehouse configuration itself. ALTER WAREHOUSE is used for changing warehouse properties such as size or auto-suspend settings. Separating session selection from object configuration helps users understand how Snowflake compute resources are managed.
Question 167
Which Snowflake statement can create a table directly from the result of a query?
- CREATE TABLE AS SELECT
- CREATE TABLE FROM QUERY
- TABLE CREATE SELECT
- INSERT TABLE AS QUERY
Correct Answer: 1
Explanation
CREATE TABLE AS SELECT, commonly abbreviated as CTAS, creates a new table using the results returned by a SELECT statement. This is useful when users need to materialize query results as a separate table for subsequent analysis or processing. The new table contains the data produced by the query rather than simply referencing the original table as a view would. CTAS therefore differs from creating a view, which stores a query definition rather than a separate copy of the query result. It is also different from zero-copy cloning, which initially shares underlying storage.
Question 168
Which Snowflake object stores a query definition and presents its results as a virtual table?
- Stage
- Stream
- View
- Pipe
Correct Answer: 3
Explanation
A view is a database object that stores a query definition and presents the query results as a virtual table. A standard view does not independently store a complete physical copy of the underlying table data. When users query the view, Snowflake evaluates its underlying query according to the current data and applicable permissions. Views can simplify complex queries, provide controlled access to selected columns or rows, and create reusable logical representations of data. They differ from materialized views, which maintain stored results to support specific performance optimization scenarios.
Question 169
Which type of view is specifically designed to prevent unauthorized users from seeing the view’s definition?
- Temporary view
- Secure view
- External view
- Transient view
Correct Answer: 2
Explanation
A secure view is designed to protect sensitive information associated with the view definition. This can help prevent users who have access to the view from obtaining details of its underlying query definition through normal metadata inspection. Secure views are particularly useful when organizations need to expose selected data while protecting implementation details or sensitive logic. They are also relevant in controlled data-sharing scenarios. A secure view is still a view, so it presents query results rather than creating a separate full physical copy of the underlying source data.
Question 170
Which Snowflake object physically maintains query results to improve performance for suitable repeated queries?
- Standard view
- Materialized view
- Stream
- Stage
Correct Answer: 2
Explanation
A materialized view stores maintained results based on its defining query, allowing Snowflake to use the materialized data for eligible queries rather than recomputing the complete underlying query each time. This can improve performance for certain workloads, especially when complex transformations or aggregations are repeatedly queried. A standard view only stores the query definition and does not maintain a separate copy of its results in the same manner. Materialized views therefore provide a performance-oriented option when the workload and maintenance requirements justify their use.
Question 171
Which Snowflake function can identify the data type of an expression?
- TYPEOF
- DATATYPE
- CHECKTYPE
- VALUE_TYPE
Correct Answer: 1
Explanation
TYPEOF returns information about the data type of an expression. This is especially useful when working with semi-structured data stored in VARIANT values because a single VARIANT column can contain values of different underlying types. Users can use TYPEOF to determine whether a particular value is an object, array, string, number, Boolean, or another supported type. This can assist with data transformation and conditional logic. TYPEOF is therefore different from conversion functions, which change a value’s type rather than simply identifying its existing type.
Question 172
Which Snowflake function can determine whether a VARIANT value represents an array?
- IS_OBJECT
- IS_ARRAY
- IS_VARIANT
- IS_LIST
Correct Answer: 2
Explanation
IS_ARRAY checks whether a value is an array. This can be useful when working with semi-structured data stored in VARIANT because the same column can contain objects, arrays, strings, numbers, and other types. Before applying array-specific operations, users can use type-checking functions to determine the structure of the value. IS_OBJECT serves a similar purpose for object values, while IS_VARIANT does not provide the same structural test. These functions help make semi-structured data processing more reliable when incoming records may have varying structures.
Question 173
What does the FLATTEN table function primarily do with semi-structured data?
- Encrypts nested values
- Converts every value to VARCHAR
- Expands nested elements into separate rows
- Removes duplicate objects
Correct Answer: 3
Explanation
FLATTEN is a table function that expands elements from semi-structured data into individual rows. It is particularly useful when a VARIANT value contains an array or object and users need to process its elements relationally. FLATTEN can expose information such as the sequence, key, path, index, and value associated with nested elements. This makes it useful for transforming JSON-like structures into row-oriented query results. It does not encrypt values, automatically convert every value to text, or simply remove duplicates. Its primary purpose is expanding nested structures for SQL processing.
Question 174
Which Snowflake data type is most appropriate for storing binary data such as encoded byte sequences?
- BINARY
- VARCHAR
- NUMBER
- BOOLEAN
Correct Answer: 1
Explanation
BINARY is Snowflake’s data type for storing binary data. It is appropriate when information consists of byte sequences rather than ordinary character text. Binary values can represent encoded or raw binary information depending on the application requirements. VARCHAR is intended for character strings, NUMBER handles numeric values, and BOOLEAN represents logical values. Selecting the correct data type helps preserve the intended representation and allows Snowflake to apply appropriate functions and conversion behavior. Users should distinguish binary information from text that merely contains characters representing encoded data.
Question 175
Which Snowflake data type is designed to store true or false logical values?
- NUMBER
- VARCHAR
- BOOLEAN
- BINARY
Correct Answer: 3
Explanation
BOOLEAN is the Snowflake data type used for logical values representing TRUE or FALSE conditions. Boolean expressions are commonly used in filtering, conditional logic, and comparisons. For example, a WHERE clause can evaluate a Boolean condition to determine which rows should be returned. NUMBER is intended for numeric information, VARCHAR stores character strings, and BINARY stores binary values. Understanding the distinction between these basic data types helps users design appropriate table structures and avoid unnecessary conversions when writing SQL queries and data transformation logic.
Question 176
Which Snowflake function returns the current user associated with the active session?
- CURRENT_ROLE()
- CURRENT_DATABASE()
- CURRENT_USER()
- CURRENT_SCHEMA()
Correct Answer: 3
Explanation
CURRENT_USER() returns the username associated with the current Snowflake session. This function can be useful when queries, policies, or administrative troubleshooting need to identify the user executing an operation. It differs from CURRENT_ROLE(), which identifies the active role used for authorization. Current-session context functions provide information about the environment in which SQL is executing, including the user, role, database, schema, and warehouse. Understanding these functions is useful for security troubleshooting and for implementing logic that depends on session identity.
Question 177
Which Snowflake capability helps administrators monitor and control credit consumption for virtual warehouses?
- Resource Monitor
- Query Profile
- Search Optimization
- Time Travel
Correct Answer: 1
Explanation
A Resource Monitor helps administrators monitor credit usage and establish controls related to Snowflake consumption. It can be configured with credit quotas and actions or notifications associated with specified usage thresholds. This makes Resource Monitor useful for managing warehouse-related spending and identifying workloads approaching defined limits. It does not analyze the execution plan of an individual query like Query Profile, nor does it improve selective searches like Search Optimization Service. Resource monitors are therefore an important administrative feature for organizations that need visibility and control over compute consumption.
Question 178
Which warehouse property determines how long an inactive warehouse remains running before automatically suspending?
- AUTO_RESUME
- AUTO_SUSPEND
- MAX_CLUSTER_COUNT
- MIN_CLUSTER_COUNT
Correct Answer: 2
Explanation
AUTO_SUSPEND determines the period of inactivity after which a virtual warehouse automatically suspends. Suspending an inactive warehouse stops its compute resources and helps prevent unnecessary credit consumption. When workloads return, AUTO_RESUME can allow the warehouse to start automatically if that property is enabled. These settings are commonly configured together to balance availability and cost control. AUTO_SUSPEND does not determine warehouse size or the number of clusters. Instead, it specifically controls how quickly Snowflake should suspend a warehouse after it has remained inactive.
Question 179
Which warehouse property controls whether a suspended warehouse can automatically start when a query requires it?
- AUTO_RESUME
- AUTO_SUSPEND
- SCALING_POLICY
- STATEMENT_TIMEOUT_IN_SECONDS
Correct Answer: 1
Explanation
AUTO_RESUME controls whether Snowflake automatically resumes a suspended virtual warehouse when a query or operation requires warehouse compute. When enabled, users generally do not need to manually resume the warehouse before submitting work. AUTO_SUSPEND serves the opposite lifecycle purpose by controlling automatic suspension after inactivity. These properties are commonly used together to manage warehouse availability and credit consumption. AUTO_RESUME does not control warehouse size, cluster count, or query execution timeout. Its purpose is specifically related to automatically restarting suspended compute resources when needed.
Question 180
Which Snowflake warehouse setting defines the maximum number of clusters available to a multi-cluster warehouse?
- MIN_CLUSTER_COUNT
- MAX_CLUSTER_COUNT
- WAREHOUSE_SIZE
- AUTO_RESUME
Correct Answer: 2
Explanation
MAX_CLUSTER_COUNT defines the maximum number of compute clusters that a multi-cluster virtual warehouse can use. Snowflake can add clusters within the configured range when additional compute capacity is required for concurrency, subject to the warehouse’s scaling behavior and other settings. MIN_CLUSTER_COUNT establishes the lower boundary rather than the maximum. WAREHOUSE_SIZE controls the size of each cluster, while AUTO_RESUME controls whether a suspended warehouse starts automatically. Understanding these settings helps administrators distinguish between scaling the capacity of each cluster and scaling the number of clusters available.