ExamGecko
Home Home / Snowflake / COF-C02

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

Question list
Search
Search

What type of function returns one value for each Invocation?

A.
Aggregate
A.
Aggregate
Answers
B.
Scalar
B.
Scalar
Answers
C.
Table
C.
Table
Answers
D.
Window
D.
Window
Answers
Suggested answer: B

Explanation:

Scalar functions in Snowflake (and SQL in general) are designed to return a single value for each invocation. They operate on a single value and return a single result, making them suitable for a wide range of data transformations and calculations within queries.

References:

Snowflake Documentation: Functions

For Directory tables, what stage allows for automatic refreshing of metadata?

A.
User stage
A.
User stage
Answers
B.
Table stage
B.
Table stage
Answers
C.
Named internal stage
C.
Named internal stage
Answers
D.
Named external stage
D.
Named external stage
Answers
Suggested answer: D

Explanation:

For directory tables, a named external stage allows for the automatic refreshing of metadata. This capability is particularly useful when dealing with files stored on external storage services (like Amazon S3, Google Cloud Storage, or Azure Blob Storage) and accessed through Snowflake. The external stage references these files, and the directory table's metadata can be automatically updated to reflect changes in the underlying files.

References:

Snowflake Documentation: External Stages

Which command removes a role from another role or a user in Snowflak?

A.
ALTER ROLE
A.
ALTER ROLE
Answers
B.
REVOKE ROLE
B.
REVOKE ROLE
Answers
C.
USE ROLE
C.
USE ROLE
Answers
D.
USE SECONDARY ROLES
D.
USE SECONDARY ROLES
Answers
Suggested answer: B

Explanation:

The REVOKE ROLE command is used to remove a role from another role or a user in Snowflake. This command is part of Snowflake's role-based access control system, allowing administrators to manage permissions and access to database objects efficiently by adding or removing roles from users or other roles.

References:

Snowflake Documentation: REVOKE ROLE

The VALIDATE table function has which parameter as an input argument for a Snowflake user?

A.
Last_QUERY_ID
A.
Last_QUERY_ID
Answers
B.
CURRENT_STATEMENT
B.
CURRENT_STATEMENT
Answers
C.
UUID_STRING
C.
UUID_STRING
Answers
D.
JOB_ID
D.
JOB_ID
Answers
Suggested answer: C

Explanation:

The VALIDATE table function in Snowflake would typically use a unique identifier, such as a UUID_STRING, as an input argument. This function is designed to validate the data within a table against a set of constraints or conditions, often requiring a specific identifier to reference the particular data or job being validated.

References:

There is no direct reference to a VALIDATE table function with these specific parameters in Snowflake documentation. It seems like a theoretical example for understanding function arguments. Snowflake documentation on UDFs and system functions can provide guidance on how to create and use custom functions for similar purposes.

Which function should be used to insert JSON format string data inot a VARIANT field?

A.
FLATTEN
A.
FLATTEN
Answers
B.
CHECK_JSON
B.
CHECK_JSON
Answers
C.
PARSE_JSON
C.
PARSE_JSON
Answers
D.
TO_VARIANT
D.
TO_VARIANT
Answers
Suggested answer: C

Explanation:

To insert JSON formatted string data into a VARIANT field in Snowflake, the correct function to use is PARSE_JSON. The PARSE_JSON function is specifically designed to interpret a JSON formatted string and convert it into a VARIANT type, which is Snowflake's flexible format for handling semi-structured data like JSON, XML, and Avro. This function is essential for loading and querying JSON data within Snowflake, allowing users to store and manage JSON data efficiently while preserving its structure for querying purposes. This function's usage and capabilities are detailed in the Snowflake documentation, providing users with guidance on how to handle semi-structured data effectively within their Snowflake environments.

References:

Snowflake Documentation: PARSE_JSON

Which file function generates a SnowFlake-hosted URL that must be authenticated when used?

A.
GET_STATE_LOCATION
A.
GET_STATE_LOCATION
Answers
B.
GET_PRESENT_URL
B.
GET_PRESENT_URL
Answers
C.
BUILD_SCOPED_FILE_URL
C.
BUILD_SCOPED_FILE_URL
Answers
D.
BUILD_STAGE_FILE_URL
D.
BUILD_STAGE_FILE_URL
Answers
Suggested answer: D

Explanation:

Purpose: The BUILD_STAGE_FILE_URL function generates a temporary, pre-signed URL that allows you to access a file within a Snowflake stage (internal or external). This URL requires authentication to use.

Key Points:

Security:The URL has a limited lifespan, enhancing security.

Use Cases:Sharing staged data with external tools or applications, or downloading it directly.

Snowflake Documentation (BUILD_STAGE_FILE_URL):https://docs.snowflake.com/en/sql-reference/functions/build_stage_file_url.html

What is used to denote a pre-computed data set derived from a SELECT query specification and stored for later use?

A.
View
A.
View
Answers
B.
Secure view
B.
Secure view
Answers
C.
Materialized view
C.
Materialized view
Answers
D.
External table
D.
External table
Answers
Suggested answer: C

Explanation:

A materialized view in Snowflake denotes a pre-computed data set derived from a SELECT query specification and stored for later use. Unlike standard views, which dynamically compute the data each time the view is accessed, materialized views store the result of the query at the time it is executed, thereby speeding up access to the data, especially for expensive aggregations on large datasets.

References:

Snowflake Documentation: Materialized Views

What are characteristic of Snowsight worksheet? (Select TWO.)

A.
Worksheets can be grouped under folder, and a folder of folders.
A.
Worksheets can be grouped under folder, and a folder of folders.
Answers
B.
Each worksheet is a unique Snowflake session.
B.
Each worksheet is a unique Snowflake session.
Answers
C.
Users are limited to running only one on a worksheet.
C.
Users are limited to running only one on a worksheet.
Answers
D.
The Snowflake session ends when a user switches worksheets.
D.
The Snowflake session ends when a user switches worksheets.
Answers
E.
Users can import worksheets and share them with other users.
E.
Users can import worksheets and share them with other users.
Answers
Suggested answer: A, E

Explanation:

Characteristics of Snowsight worksheets in Snowflake include:

A . Worksheets can be grouped under folders, and a folder of folders: This organizational feature allows users to efficiently manage and categorize their worksheets within Snowsight, Snowflake's web-based UI, enhancing the user experience by keeping related worksheets together.

E . Users can import worksheets and share them with other users: Snowsight supports the sharing of worksheets among users, fostering collaboration by allowing users to share queries, analyses, and findings. This feature is crucial for collaborative data exploration and analysis workflows.

References:

Snowflake Documentation: Snowsight (UI for Snowflake)

A Snowflake user is writing a User-Defined Function (UDF) that includes some unqualified object names.

How will those object names be resolved during execution?

A.
Snowflake will resolve them according to the SEARCH_PATH parameter.
A.
Snowflake will resolve them according to the SEARCH_PATH parameter.
Answers
B.
Snowflake will only check the schema the UDF belongs to.
B.
Snowflake will only check the schema the UDF belongs to.
Answers
C.
Snowflake will first check the current schema, and then the schema the previous query used
C.
Snowflake will first check the current schema, and then the schema the previous query used
Answers
D.
Snowflake will first check the current schema, and them the PUBLIC schema of the current database.
D.
Snowflake will first check the current schema, and them the PUBLIC schema of the current database.
Answers
Suggested answer: D

Explanation:

Object Name Resolution: When unqualified object names (e.g., table name without schema) are used in a UDF, Snowflake follows a specific hierarchy to resolve them. Here's the order:

Current Schema:Snowflake first checks if an object with the given name exists in the schema currently in use for the session.

PUBLIC Schema:If the object isn't found in the current schema, Snowflake looks in the PUBLIC schema of the current database.

Note: The SEARCH_PATH parameter influences object resolution for queries, not within UDFs.

References:

Snowflake Documentation (Object Naming Resolution):https://docs.snowflake.com/en/sql-reference/name-resolution.html

What SnowFlake database object is derived from a query specification, stored for later use, and can speed up expensive aggregation on large data sets?

A.
Temporary table
A.
Temporary table
Answers
B.
External table
B.
External table
Answers
C.
Secure view
C.
Secure view
Answers
D.
Materialized view
D.
Materialized view
Answers
Suggested answer: D

Explanation:

A materialized view in Snowflake is a database object derived from a query specification, stored for later use, and can significantly speed up expensive aggregations on large data sets. Materialized views store the result of their underlying query, reducing the need to recompute the result each time the view is accessed. This makes them ideal for improving the performance of read-heavy, aggregate-intensive queries.

References:

Snowflake Documentation: Using Materialized Views

Total 716 questions
Go to page: of 72