View Full Snowflake SnowPro Core COF-C03 Exam Dumps and Practice Test Dumps.
Question 121
Which Snowflake object is used to reference data stored in external cloud storage as a table-like structure?
- External table
- Temporary table
- Materialized view
- Stream
Correct Answer: 1
Explanation
An external table provides a table-like interface for querying data that remains in an external cloud storage location rather than being loaded into Snowflake-managed table storage. External tables are useful when organizations want to query files in external stages while keeping the data in its original location. Snowflake stores metadata about the external files and exposes columns that can be queried with SQL. This approach can support data lake architectures where some information remains in cloud storage while Snowflake provides SQL-based analytical access without requiring the data to be fully loaded into an internal table.
Question 122
A company stores Parquet files in cloud storage and wants to query them without loading the files into a Snowflake table. What should it use?
- Stream
- External table
- Temporary table
- Materialized view
Correct Answer: 2
Explanation
An external table is appropriate when data files remain in external cloud storage but users need to query them through Snowflake SQL. Snowflake can maintain metadata describing the external files and expose their information through the external table. This avoids requiring the entire dataset to be loaded into a Snowflake-managed table before it can be queried. External tables are particularly useful for data lake scenarios involving formats such as Parquet, JSON, or other supported file types. They can also be combined with external stages that identify the cloud storage location.
Question 123
Which Snowflake feature automatically collects metadata about files in an external stage for external table creation?
- Search Optimization
- Snowpipe
- External table metadata refresh
- Result cache
Correct Answer: 3
Explanation
External tables depend on metadata that identifies and describes files located in an external stage. Snowflake provides mechanisms for refreshing this metadata so newly added or changed files can become available through the external table. Metadata refresh is important because an external table does not automatically represent every future file unless the relevant metadata is updated. Depending on the configuration, refreshes can be performed manually or through supported automated mechanisms. Keeping external table metadata current allows queries to discover newly available files while the actual source data continues to reside in external cloud storage.
Question 124
Which file format is columnar and commonly used for analytical data stored in cloud object storage?
- CSV
- XML
- JSON
- Parquet
Correct Answer: 4
Explanation
Parquet is a columnar file format commonly used for analytical workloads and cloud-based data lakes. Because data is organized by columns, analytical engines can often read only the columns needed by a query rather than processing every field in every record. Parquet also supports efficient compression and encoding techniques, making it suitable for large datasets. Snowflake supports loading and querying Parquet data through appropriate stages, file formats, and external table configurations. CSV, JSON, and XML are different formats with different structural characteristics and are not columnar in the same way as Parquet.
Question 125
Which Snowflake function can be used to extract an element from a VARIANT value using a path expression?
- GET_PATH
- ARRAY_SIZE
- OBJECT_KEYS
- TYPEOF
Correct Answer: 1
Explanation
GET_PATH can be used to retrieve a value from a semi-structured VARIANT object using a path expression. This is useful when JSON or similar data contains nested objects and users need to access a particular element dynamically through SQL. Snowflake also supports direct path notation, which can provide a concise way to access nested values. Functions such as ARRAY_SIZE and OBJECT_KEYS serve different purposes, while TYPEOF identifies the data type of an expression. Understanding these functions helps users work effectively with semi-structured data stored in VARIANT columns.
Question 126
What does the ARRAY_SIZE function return when applied to a Snowflake array?
- The array’s data type
- The number of elements in the array
- The names of object keys
- The size of the underlying table
Correct Answer: 2
Explanation
ARRAY_SIZE returns the number of elements contained in an array. This function is useful when analyzing semi-structured data stored in Snowflake, particularly when a VARIANT value contains an array of items. It can help determine whether an array contains values, support filtering based on array length, or assist with data transformation logic. ARRAY_SIZE operates on array values rather than returning information about the table or object that contains the array. Functions for semi-structured data allow users to inspect and manipulate nested structures directly within Snowflake SQL.
Question 127
Which function can return the names of fields contained in a Snowflake OBJECT value?
- ARRAY_SIZE
- FLATTEN
- OBJECT_KEYS
- GET_PATH
Correct Answer: 3
Explanation
OBJECT_KEYS returns the keys of an OBJECT value as an array. This can be useful when examining semi-structured data where the available attributes are not known in advance. For example, an application may receive JSON objects with varying fields, and OBJECT_KEYS can help identify which attributes are present. FLATTEN is instead used to expand elements into rows, while ARRAY_SIZE determines the number of array elements. GET_PATH retrieves a value from a specified path. Together, these functions provide different ways to inspect and manipulate semi-structured Snowflake data.
Question 128
Which Snowflake command is commonly used to remove a table and its data from the active database?
- REMOVE TABLE
- DELETE TABLE
- DROP TABLE
- CLEAR TABLE
Correct Answer: 3
Explanation
DROP TABLE is the SQL command used to remove a table from Snowflake. Dropping a table removes the table object and makes its current data unavailable through the normal table reference. However, Snowflake’s Time Travel capabilities may allow the table or its historical data to be recovered within the applicable retention period, depending on the table type and configuration. This is different from DELETE, which removes selected rows while leaving the table object in place. DROP TABLE should therefore be used when the table object itself is no longer required.
Question 129
Which SQL statement removes selected rows from a Snowflake table while leaving the table object available?
- DELETE
- DROP
- TRUNCATE DATABASE
- REMOVE
Correct Answer: 1
Explanation
DELETE removes rows from a table while preserving the table itself. A DELETE statement can include a WHERE condition to identify which rows should be removed. For example, a condition can target records belonging to a particular date or business category. Unlike DROP TABLE, DELETE does not remove the table definition. Snowflake’s data protection features may also allow deleted data to be accessed through Time Travel during the applicable retention period. DELETE is therefore appropriate when the table should remain available but specific records need to be removed.
Question 130
Which command removes all rows from a table while retaining the table structure?
- DROP TABLE
- DELETE DATABASE
- TRUNCATE TABLE
- REMOVE ROWS
Correct Answer: 3
Explanation
TRUNCATE TABLE removes all rows from a table while retaining the table’s structure and definition. It is different from DROP TABLE, which removes the table object itself. TRUNCATE is useful when a table needs to be emptied completely and then reused for new data. Because it affects every row, users should use it carefully when preserving existing records is important. Snowflake’s data recovery and Time Travel behavior should also be considered when planning destructive operations. The key distinction is that TRUNCATE removes table contents while keeping the table available.
Question 131
Which Snowflake statement is used to rename an existing table?
- ALTER TABLE … RENAME TO
- CHANGE TABLE NAME
- RENAME OBJECT TABLE
- UPDATE TABLE NAME
Correct Answer: 1
Explanation
Snowflake uses the ALTER TABLE statement with the RENAME TO clause to change a table’s name. Renaming changes the table object’s identifier while retaining the table and its underlying data. Applications and queries that reference the old name may need to be updated accordingly. The operation is different from creating a new table because it does not require copying the table’s data into another object. Understanding object-altering commands is important for Snowflake administrators because table names often form part of SQL dependencies, reporting workflows, and data pipeline configurations.
Question 132
Which command changes the structure of an existing Snowflake table, such as adding a column?
- UPDATE TABLE
- ALTER TABLE
- MODIFY DATABASE
- CHANGE DATA
Correct Answer: 2
Explanation
ALTER TABLE is used to modify the definition of an existing Snowflake table. Depending on the supported operation, it can be used to add, drop, or modify certain table properties and columns. For example, an administrator can use ALTER TABLE to add a new column without recreating the entire table. This command changes the table definition rather than updating individual row values. Row-level changes are generally handled with DML statements such as INSERT, UPDATE, and DELETE. Separating structural changes from data modifications helps users select the appropriate SQL operation.
Question 133
Which SQL command adds new rows to an existing Snowflake table?
- UPDATE
- MERGE
- INSERT
- ALTER
Correct Answer: 3
Explanation
INSERT is the standard SQL command for adding rows to an existing table. It can insert explicitly specified values or populate a table from the results of a SELECT statement. INSERT is useful for adding individual records, batches of records, or data produced by another query. Unlike UPDATE, it does not modify existing rows. MERGE can combine insertion with other actions based on matching conditions, but INSERT is the direct choice when the requirement is simply to add new records. Correctly selecting the appropriate DML command helps maintain predictable data modification workflows.
Question 134
Which command changes values in existing rows of a Snowflake table?
- UPDATE
- INSERT
- CREATE
- ALTER
Correct Answer: 1
Explanation
UPDATE modifies values in existing rows of a Snowflake table. A WHERE clause can be used to identify the rows that should be changed, while the SET clause specifies the new values. For example, an organization might update a customer’s status after a business event. UPDATE does not create a new table or add new rows. Users should carefully define filtering conditions because an UPDATE without an appropriate condition can modify many or all rows. Snowflake’s transactional behavior also helps provide controlled execution of data modification statements.
Question 135
Which Snowflake SQL command returns the current session’s active role?
- CURRENT_DATABASE()
- CURRENT_ROLE()
- CURRENT_SCHEMA()
- CURRENT_WAREHOUSE()
Correct Answer: 2
Explanation
CURRENT_ROLE() returns the role currently active in the Snowflake session. The active role is important because Snowflake uses role-based access control to determine which privileges are available for executing operations. A user may have several roles granted but only one active primary role at a time, along with any relevant secondary roles depending on the session configuration. Checking CURRENT_ROLE() can help troubleshoot authorization problems by showing which role is currently being used. Similar context functions return information about the active database, schema, warehouse, or other session settings.
Question 136
Which function returns the database currently active in the Snowflake session?
- CURRENT_ROLE()
- CURRENT_SCHEMA()
- CURRENT_DATABASE()
- CURRENT_USER()
Correct Answer: 3
Explanation
CURRENT_DATABASE() returns the name of the database currently active in the Snowflake session. The current database provides context for resolving object references that are not fully qualified. For example, a query referencing a schema and table without specifying a database can use the current database as part of object resolution. This function is useful when checking session context or troubleshooting queries that appear to reference unexpected objects. Related context functions can return the current role, schema, warehouse, user, or other session-specific information.
Question 137
What is the purpose of the CURRENT_WAREHOUSE() function?
- It returns the active virtual warehouse name
- It returns the current database owner
- It returns the number of warehouse credits used
- It returns the warehouse’s maximum size
Correct Answer: 1
Explanation
CURRENT_WAREHOUSE() returns the name of the virtual warehouse currently associated with the session. The active warehouse provides the compute resources used to execute eligible SQL operations that require warehouse compute. Checking this value can help users confirm which warehouse their session is using, especially when multiple warehouses exist for different workloads or teams. It does not return the warehouse’s size, credit consumption, or ownership information. Session context functions such as CURRENT_WAREHOUSE() are useful when troubleshooting resource usage and verifying that queries are running against the intended compute environment.
Question 138
Which Snowflake feature allows a user to work with multiple roles simultaneously when secondary roles are enabled?
- Time Travel
- Secondary roles
- Result cache
- External stages
Correct Answer: 2
Explanation
Secondary roles allow users to activate additional granted roles within a session when the appropriate session configuration is enabled. This can make privileges from multiple roles available when accessing Snowflake objects. Without secondary roles, authorization generally relies on the active primary role and its inherited privileges. Using secondary roles can simplify access management for users who legitimately need privileges from several functional roles. Organizations should still follow least-privilege principles and grant only the access necessary for a user’s responsibilities. Role activation and inheritance are important concepts in Snowflake’s access-control model.
Question 139
Which Snowflake feature allows query results to be reused when the same eligible query is executed again?
- Metadata cache
- Warehouse cache
- Result cache
- Stage cache
Correct Answer: 3
Explanation
Snowflake’s result cache can allow an eligible query to reuse a previously generated result instead of executing the full query again. When the relevant conditions are satisfied, this can reduce the compute work required for repeated queries and improve response time. Result caching is different from warehouse caching, which relates to data that may remain available in local SSD cache associated with compute resources. The result cache concerns the output of a query. Understanding the distinction between different caching mechanisms helps users interpret query performance and compute consumption.
Question 140
Which Snowflake capability helps identify whether a query spends significant time scanning or processing data during execution?
- Query Profile
- Resource Monitor
- Object Dependencies
- Access History
Correct Answer: 1
Explanation
Query Profile provides a detailed visual representation of a query’s execution plan and runtime activity. It can help users identify areas where a query spends significant time or resources, such as table scans, joins, aggregations, and data processing steps. This information is useful for troubleshooting slow queries and understanding execution behavior. Resource Monitor serves a different purpose by helping control or monitor credit usage. Query Profile is therefore the appropriate tool when the goal is to investigate how a specific query executes and identify potential performance bottlenecks.