ExamGecko
Home Home / Snowflake / COF-C02

Snowflake COF-C02 Practice Test - Questions Answers, Page 4

Question list
Search
Search

Which of the following indicates that it may be appropriate to use a clustering key for a table? (Select TWO).

A.
The table contains a column that has very low cardinality
A.
The table contains a column that has very low cardinality
Answers
B.
DML statements that are being issued against the table are blocked
B.
DML statements that are being issued against the table are blocked
Answers
C.
The table has a small number of micro-partitions
C.
The table has a small number of micro-partitions
Answers
D.
Queries on the table are running slower than expected
D.
Queries on the table are running slower than expected
Answers
E.
The clustering depth for the table is large
E.
The clustering depth for the table is large
Answers
Suggested answer: D, E

Explanation:

A clustering key in Snowflake is used to co-locate similar data within the same micro-partitions to improve query performance, especially for large tables where data is not naturally ordered or has become fragmented due to extensive DML operations. The appropriate use of a clustering key can lead to improved scan efficiency and better column compression, resulting in faster query execution times.

The indicators that it may be appropriate to use a clustering key for a table include:

D . Queries on the table are running slower than expected: This can happen when the data in the table is not well-clustered, leading to inefficient scans during query execution.

E . The clustering depth for the table is large: A large clustering depth indicates that the table's data is spread across many micro-partitions, which can degrade query performance as more data needs to be scanned.

References:

Snowflake Documentation on Clustering Keys & Clustered Tables

Snowflake Documentation on SYSTEM$CLUSTERING_INFORMATION

Stack Overflow discussion on cluster key selection in Snowflake

Which Snowflake object enables loading data from files as soon as they are available in a cloud storage location?

A.
Pipe
A.
Pipe
Answers
B.
External stage
B.
External stage
Answers
C.
Task
C.
Task
Answers
D.
Stream
D.
Stream
Answers
Suggested answer: A

Explanation:

In Snowflake, aPipeis the object designed to enable the continuous, near-real-time loading of data from files as soon as they are available in a cloud storage location. Pipes use Snowflake'sCOPYcommand to load data and can be associated with aStageobject to monitor for new files. When new data files appear in the stage, the pipe automatically loads the data into the target table.

References:

Snowflake Documentation on Pipes

SnowPro Core Certification Study Guide

https://docs.snowflake.com/en/user-guide/data-load-snowpipe-intro.html

A user needs to create a materialized view in the schema MYDB.MYSCHEMA.

Which statements will provide this access?

A.
GRANT ROLE MYROLE TO USER USER1; CREATE MATERIALIZED VIEW ON SCHEMA MYDB.MYSCHEMA TO ROLE MYROLE;
A.
GRANT ROLE MYROLE TO USER USER1; CREATE MATERIALIZED VIEW ON SCHEMA MYDB.MYSCHEMA TO ROLE MYROLE;
Answers
B.
GRANT ROLE MYROLE TO USER USER1; CREATE MATERIALIZED VIEW ON SCHEMA MYDB.MYSCHEMA TO USER USER1;
B.
GRANT ROLE MYROLE TO USER USER1; CREATE MATERIALIZED VIEW ON SCHEMA MYDB.MYSCHEMA TO USER USER1;
Answers
C.
GRANT ROLE MYROLE TO USER USER1; CREATE MATERIALIZED VIEW ON SCHEMA MYDB.MYSCHEMA TO USER1;
C.
GRANT ROLE MYROLE TO USER USER1; CREATE MATERIALIZED VIEW ON SCHEMA MYDB.MYSCHEMA TO USER1;
Answers
D.
GRANT ROLE MYROLE TO USER USER1; CREATE MATERIALIZED VIEW ON SCHEMA MYDB.MYSCHEMA TO MYROLE;
D.
GRANT ROLE MYROLE TO USER USER1; CREATE MATERIALIZED VIEW ON SCHEMA MYDB.MYSCHEMA TO MYROLE;
Answers
Suggested answer: D

Explanation:

In Snowflake, to create a materialized view, the user must have the necessary privileges on the schema where the view will be created. These privileges are granted through roles, not directly to individual users. Therefore, the correct process is to grant the role to the user and then grant the privilege to create the materialized view to the role itself.

The statementGRANT ROLE MYROLE TO USER USER1;grants the specified role to the user, allowing them to assume that role and exercise its privileges. The subsequent statementCREATE MATERIALIZED VIEW ON SCHEMA MYDB.MYSCHEMA TO MYROLE;grants the privilege to create a materialized view within the specified schema to the roleMYROLE. Any user who has been grantedMYROLEcan then create materialized views inMYDB.MYSCHEMA.

References:

Snowflake Documentation on Roles

Snowflake Documentation on Materialized Views

What is the default character set used when loading CSV files into Snowflake?

A.
UTF-8
A.
UTF-8
Answers
B.
UTF-16
B.
UTF-16
Answers
C.
ISO S859-1
C.
ISO S859-1
Answers
D.
ANSI_X3.A
D.
ANSI_X3.A
Answers
Suggested answer: A

Explanation:

https://docs.snowflake.com/en/user-guide/intro-summary-loading.html#:~:text=For%20delimited%20files%20(CSV%2C%20TSV,encoding%20to%20use%20for%20loading.

For delimited files (CSV, TSV, etc.), the default character set is UTF-8. To use any other characters sets, you must explicitly specify the encoding to use for loading. For the list of supported character sets, seeSupported Character Sets for Delimited Files(in this topic).

A sales table FCT_SALES has 100 million records.

The following Query was executed

SELECT COUNT (1) FROM FCT__SALES;

How did Snowflake fulfill this query?

A.
Query against the result set cache
A.
Query against the result set cache
Answers
B.
Query against a virtual warehouse cache
B.
Query against a virtual warehouse cache
Answers
C.
Query against the most-recently created micro-partition
C.
Query against the most-recently created micro-partition
Answers
D.
Query against the metadata excite
D.
Query against the metadata excite
Answers
Suggested answer: D

Explanation:

Snowflake is designed to optimize query performance by utilizing metadata for certain types of queries. When executing aCOUNTquery, Snowflake can often fulfill the request by accessing metadata about the table's row count, rather than scanning the entire table or micro-partitions. This is particularly efficient for large tables likeFCT_SALESwith a significant number of records. The metadata layer maintains statistics about the table, including the row count, which enables Snowflake to quickly return the result of aCOUNTquery without the need to perform a full scan.

References:

Snowflake Documentation on Metadata Management

SnowPro Core Certification Study Guide

Which cache type is used to cache data output from SQL queries?

A.
Metadata cache
A.
Metadata cache
Answers
B.
Result cache
B.
Result cache
Answers
C.
Remote cache
C.
Remote cache
Answers
D.
Local file cache
D.
Local file cache
Answers
Suggested answer: B

Explanation:

TheResult cacheis used in Snowflake to cache the data output from SQL queries. This feature is designed to improve performance by storing the results of queries for a period of time. When the same or similar query is executed again, Snowflake can retrieve the result from this cache instead of re-computing the result, which saves time and computational resources.

References:

Snowflake Documentation on Query Results Cache

SnowPro Core Certification Study Guide

What is a key feature of Snowflake architecture?

A.
Zero-copy cloning creates a mirror copy of a database that updates with the original
A.
Zero-copy cloning creates a mirror copy of a database that updates with the original
Answers
B.
Software updates are automatically applied on a quarterly basis
B.
Software updates are automatically applied on a quarterly basis
Answers
C.
Snowflake eliminates resource contention with its virtual warehouse implementation
C.
Snowflake eliminates resource contention with its virtual warehouse implementation
Answers
D.
Multi-cluster warehouses allow users to run a query that spans across multiple clusters
D.
Multi-cluster warehouses allow users to run a query that spans across multiple clusters
Answers
E.
Snowflake automatically sorts DATE columns during ingest for fast retrieval by date
E.
Snowflake automatically sorts DATE columns during ingest for fast retrieval by date
Answers
Suggested answer: C

Explanation:

One of the key features of Snowflake's architecture is its unique approach to eliminating resource contention through the use of virtual warehouses. This is achieved by separating storage and compute resources, allowing multiple virtual warehouses to operate independently on the same data without affecting each other. This means that different workloads, such as loading data, running queries, or performing complex analytics, can be processed simultaneously without any performance degradation due to resource contention.

References:

Snowflake Documentation on Virtual Warehouses

SnowPro Core Certification Study Guide

What is a limitation of a Materialized View?

A.
A Materialized View cannot support any aggregate functions
A.
A Materialized View cannot support any aggregate functions
Answers
B.
A Materialized View can only reference up to two tables
B.
A Materialized View can only reference up to two tables
Answers
C.
A Materialized View cannot be joined with other tables
C.
A Materialized View cannot be joined with other tables
Answers
D.
A Materialized View cannot be defined with a JOIN
D.
A Materialized View cannot be defined with a JOIN
Answers
Suggested answer: D

Explanation:

Materialized Views in Snowflake are designed to store the result of a query and can be refreshed to maintain up-to-date data. However, they have certain limitations, one of which is that they cannot be defined using a JOIN clause. This means that a Materialized View can only be created based on a single source table and cannot combine data from multiple tables using JOIN operations.

References:

Snowflake Documentation on Materialized Views

SnowPro Core Certification Study Guide

What features does Snowflake Time Travel enable?

A.
Querying data-related objects that were created within the past 365 days
A.
Querying data-related objects that were created within the past 365 days
Answers
B.
Restoring data-related objects that have been deleted within the past 90 days
B.
Restoring data-related objects that have been deleted within the past 90 days
Answers
C.
Conducting point-in-time analysis for Bl reporting
C.
Conducting point-in-time analysis for Bl reporting
Answers
D.
Analyzing data usage/manipulation over all periods of time
D.
Analyzing data usage/manipulation over all periods of time
Answers
Suggested answer: B, C

Explanation:

Snowflake Time Travel is a powerful feature that allows users to access historical data within a defined period. It enables two key capabilities:

B . Restoring data-related objects that have been deleted within the past 90 days: Time Travel can be used to restore tables, schemas, and databases that have been accidentally or intentionally deleted within the Time Travel retention period.

C . Conducting point-in-time analysis for BI reporting: It allows users to query historical data as it appeared at a specific point in time within the Time Travel retention period, which is crucial for business intelligence and reporting purposes.

While Time Travel does allow querying of past data, it is limited to the retention period set for the Snowflake account, which is typically 1 day for standard accounts and can be extended up to 90 days for enterprise accounts. It does not enable querying or restoring objects created or deleted beyond the retention period, nor does it provide analysis over all periods of time.

References:

Snowflake Documentation on Time Travel

SnowPro Core Certification Study Guide

Which statement about billing applies to Snowflake credits?

A.
Credits are billed per-minute with a 60-minute minimum
A.
Credits are billed per-minute with a 60-minute minimum
Answers
B.
Credits are used to pay for cloud data storage usage
B.
Credits are used to pay for cloud data storage usage
Answers
C.
Credits are consumed based on the number of credits billed for each hour that a warehouse runs
C.
Credits are consumed based on the number of credits billed for each hour that a warehouse runs
Answers
D.
Credits are consumed based on the warehouse size and the time the warehouse is running
D.
Credits are consumed based on the warehouse size and the time the warehouse is running
Answers
Suggested answer: D

Explanation:

Snowflake credits are the unit of measure for the compute resources used in Snowflake. The number of credits consumed depends on the size of the virtual warehouse and the time it is running. Larger warehouses consume more credits per hour than smaller ones, and credits are billed for the time the warehouse is active, regardless of the actual usage within that time.

References: [COF-C02] SnowPro Core Certification Exam Study Guide

Total 716 questions
Go to page: of 72