Which of the following describes how clustering keys work in Snowflake?
Correct Answer: B
Clustering keys in Snowflake work by sorting the designated columns over time. This process is done in the background and does not block data manipulation language (DML) operations, allowing for normal database operations to continue without interruption. The purpose of clustering keys is to organize the data within micro-partitions to optimizequery performance1. References: [ COF-C03 ] SnowPro Core Certification Exam Study Guide Snowflake Documentation on Clustering1
Question 192
Which function, when combined with a COPY INTO < location > command, will convert the rows in a relational table to a single VARIANT column while the rows are being unloaded?
Correct Answer: B
The correct answer is B. OBJECT_CONSTRUCT . When unloading relational table data into semi-structured formats such as JSON, OBJECT_CONSTRUCT can be used to convert each relational row into an object. The resulting object can be represented as a single VARIANT value. Why B is correct: OBJECT_CONSTRUCT creates an object from key-value pairs. When used with *, it can construct an object from all columns in a row. Example concept: COPY INTO @my_stage/output/ FROM ( SELECT OBJECT_CONSTRUCT(*) FROM my_table ) FILE_FORMAT = (TYPE = JSON); This transforms each relational row into a JSON-style object during unload. Why the other options are incorrect: A). ARRAY_AGG aggregates multiple values into an array, but it does not convert each relational row into an object. C). TO_VARIANT converts a value to VARIANT, but it does not automatically construct a structured object from all row columns. D). OBJECT_AGG is an aggregate function that creates an object from key-value pairs across rows, not the usual function for converting each relational row into a single object during unload. Official Snowflake documentation reference: Snowflake documentation explains that OBJECT_CONSTRUCT returns an object constructed from key- value pairs and can be used with COPY INTO < location > to unload relational rows as semi-structured data. Reference: Snowflake Documentation - OBJECT_CONSTRUCT; Snowflake Documentation - Unloading relational data to JSON; Snowflake Documentation - COPY INTO < location > ; SnowPro Core Study Guide - Working with Semi-Structured Data.
Question 193
A Snowflake user creates this stored procedure: PROCEDURE SALES_REPORT(MONTH INT, YEAR INT); Which statement will remove the stored procedure?
Correct Answer: B
The correct answer is B. DROP PROCEDURE SALES_REPORT(INT, INT); . In Snowflake, stored procedures can be overloaded. This means multiple procedures can have the same name but different argument signatures. Because of this, when dropping a stored procedure, the procedure name and argument data types are used to identify the exact procedure to remove. Why B is correct: The procedure was created with two arguments: MONTH INT, YEAR INT When dropping the procedure, Snowflake uses the argument data types, not the argument names. Therefore, the correct statement is: DROP PROCEDURE SALES_REPORT(INT, INT); Why the other options are incorrect: A). The argument names are not included in the drop signature. Snowflake expects the argument data types. C). This includes only argument names without data types, which is not the correct procedure signature syntax. D). This does not identify the procedure signature and is not sufficient when dropping a stored procedure. Official Snowflake documentation reference: Snowflake documentation for DROP PROCEDURE explains that the procedure name and argument data types are required to identify the stored procedure to drop. Reference: Snowflake Documentation - DROP PROCEDURE; Snowflake Documentation - Stored procedures; SnowPro Core Study Guide - SQL and Snowflake Objects.
Question 194
How can a user get the MOST detailed information about individual table storage details in Snowflake?
Correct Answer: D
To get the most detailed information about individual table storage details in Snowflake, the TABLE STORAGE METRICS view should be used. This Information Schema view provides granular storage metrics for tables within Snowflake, including data related to the size of the table, the amount of data stored, and storage usage over time. It's an essential tool for administrators and users looking to monitor and optimize storage consumption and costs. References: Snowflake Documentation: Information Schema - TABLE STORAGE METRICS View
Question 195
When would a user use the GET command?
Correct Answer: A
The correct answer is A. A staged file needs to be unloaded to a local machine . The Snowflake GET command is used to download files from an internal Snowflake stage to a local file system. It is commonly used after data has been unloaded from a table into an internal stage and the user wants to retrieve those staged files locally. Why A is correct: The GET command downloads files from a Snowflake internal stage to a local directory. Example: GET @my_stage file:///tmp/data/; This command downloads files from the internal stage @my_stage to the local /tmp/data/ directory. Why the other options are incorrect: B). Loading a local file onto a stage is done with the PUT command, not GET. C). Opening query results in a third-party tool is not the purpose of the GET command. D). Permanently deleting files from a Snowflake stage is done with the REMOVE command, not GET. Official Snowflake documentation reference: Snowflake documentation describes the GET command as the command used to download data files from a Snowflake stage to a local directory or folder. Reference: Snowflake Documentation - GET command; Snowflake Documentation - PUT command; Snowflake Documentation - REMOVE command; SnowPro Core Study Guide - Data Loading and Unloading.