ExamGecko
Home Home / Snowflake / SnowPro Core

Snowflake SnowPro Core Practice Test - Questions Answers, Page 45

Question list
Search
Search

Which type of role can be granted to a share?

A.

Account role

A.

Account role

Answers
B.

Custom role

B.

Custom role

Answers
C.

Database role

C.

Database role

Answers
D.

Secondary role

D.

Secondary role

Answers
Suggested answer: B

Explanation:

In Snowflake, shares are used to share data between Snowflake accounts. When creating a share, it is possible to grant access to the share to roles within the Snowflake account that is creating the share. The type of role that can be granted to a share is a Custom role. Custom roles are user-defined roles that account administrators can create to manage access control in a more granular way. Unlike predefined roles such as ACCOUNTADMIN or SYSADMIN, custom roles can be tailored with specific privileges to meet the security and access requirements of different groups within an organization.

Granting a custom role access to a share enables users associated with that role to access the shared data if the share is received by another Snowflake account. It is important to carefully manage the privileges granted to custom roles to ensure that data sharing aligns with organizational policies and data governance standards.

Snowflake Documentation on Shares: Shares

Snowflake Documentation on Roles: Access Control

What information is found within the Statistic output in the Query Profile Overview?

A.

Operator tree

A.

Operator tree

Answers
B.

Table pruning

B.

Table pruning

Answers
C.

Most expensive nodes

C.

Most expensive nodes

Answers
D.

Nodes by execution time

D.

Nodes by execution time

Answers
Suggested answer: C

Explanation:

The Statistic output in the Query Profile Overview of Snowflake provides detailed insights into the performance of different parts of the query. Specifically, it highlights the 'Most expensive nodes,' which are the operations or steps within the query execution that consume the most resources, such as CPU and memory. Identifying these nodes helps in pinpointing performance bottlenecks and optimizing query execution by focusing efforts on the most resource-intensive parts of the query.

Snowflake Documentation on Query Profile Overview: It details the components of the profile overview, emphasizing how to interpret the statistics section to improve query performance by understanding which nodes are most resource-intensive.

Regardless of which notation is used, what are considerations for writing the column name and element names when traversing semi-structured data?

A.

The column name and element names are both case-sensitive.

A.

The column name and element names are both case-sensitive.

Answers
B.

The column name and element names are both case-insensitive.

B.

The column name and element names are both case-insensitive.

Answers
C.

The column name is case-sensitive but element names are case-insensitive.

C.

The column name is case-sensitive but element names are case-insensitive.

Answers
D.

The column name is case-insensitive but element names are case-sensitive.

D.

The column name is case-insensitive but element names are case-sensitive.

Answers
Suggested answer: D

Explanation:

When querying semi-structured data in Snowflake, the behavior towards case sensitivity is distinct between column names and the names of elements within the semi-structured data. Column names follow the general SQL norm of being case-insensitive, meaning you can reference them in any case without affecting the query. However, element names within JSON, XML, or other semi-structured data are case-sensitive. This distinction is crucial for accurate data retrieval and manipulation in Snowflake, especially when working with JSON objects where the case of keys can significantly alter the outcome of queries.

Snowflake Documentation: Querying Semi-structured Data

What criteria does Snowflake use to determine the current role when initiating a session? (Select TWO).

A.

If a role was specified as part of the connection and that role has been granted to the Snowflake user, the specified role becomes the current role.

A.

If a role was specified as part of the connection and that role has been granted to the Snowflake user, the specified role becomes the current role.

Answers
B.

If no role was specified as part of the connection and a default role has been defined for the Snowflake user, that role becomes the current role.

B.

If no role was specified as part of the connection and a default role has been defined for the Snowflake user, that role becomes the current role.

Answers
C.

If no role was specified as part of the connection and a default role has not been set for the Snowflake user, the session will not be initiated and the log in will fail.

C.

If no role was specified as part of the connection and a default role has not been set for the Snowflake user, the session will not be initiated and the log in will fail.

Answers
D.

If a role was specified as part of the connection and that role has not been granted to the Snowflake user, it will be ignored and the default role will become the current role.

D.

If a role was specified as part of the connection and that role has not been granted to the Snowflake user, it will be ignored and the default role will become the current role.

Answers
E.

If a role was specified as part of the connection and that role has not been granted to the Snowflake user, the role is automatically granted and it becomes the current role.

E.

If a role was specified as part of the connection and that role has not been granted to the Snowflake user, the role is automatically granted and it becomes the current role.

Answers
Suggested answer: A, B

Explanation:

When initiating a session in Snowflake, the system determines the current role based on the user's connection details and role assignments. If a user specifies a role during the connection, and that role is already granted to them, Snowflake sets it as the current role for the session. Alternatively, if no role is specified during the connection, but the user has a default role assigned, Snowflake will use this default role as the current session role. These mechanisms ensure that users operate within their permissions, enhancing security and governance within Snowflake environments.

Snowflake Documentation: Understanding Roles

When referring to User-Defined Function (UDF) names in Snowflake, what does the term overloading mean?

A.

There are multiple SOL UDFs with the same names and the same number of arguments.

A.

There are multiple SOL UDFs with the same names and the same number of arguments.

Answers
B.

There are multiple SQL UDFs with the same names and the same number of argument types.

B.

There are multiple SQL UDFs with the same names and the same number of argument types.

Answers
C.

There are multiple SQL UDFs with the same names but with a different number of arguments or argument types.

C.

There are multiple SQL UDFs with the same names but with a different number of arguments or argument types.

Answers
D.

There are multiple SQL UDFs with different names but the same number of arguments or argument types.

D.

There are multiple SQL UDFs with different names but the same number of arguments or argument types.

Answers
Suggested answer: C

Explanation:

In Snowflake, overloading refers to the creation of multiple User-Defined Functions (UDFs) with the same name but differing in the number or types of their arguments. This feature allows for more flexible function usage, as Snowflake can differentiate between functions based on the context of their invocation, such as the types or the number of arguments passed. Overloading helps to create more adaptable and readable code, as the same function name can be used for similar operations on different types of data.

Snowflake Documentation: User-Defined Functions

Which data types optimally store semi-structured data? (Select TWO).

A.

ARRAY

A.

ARRAY

Answers
B.

CHARACTER

B.

CHARACTER

Answers
C.

STRING

C.

STRING

Answers
D.

VARCHAR

D.

VARCHAR

Answers
E.

VARIANT

E.

VARIANT

Answers
Suggested answer: A, E

Explanation:

In Snowflake, semi-structured data is optimally stored using specific data types that are designed to handle the flexibility and complexity of such data. The VARIANT data type can store structured and semi-structured data types, including JSON, Avro, ORC, Parquet, or XML, in a single column. The ARRAY data type, on the other hand, is suitable for storing ordered sequences of elements, which can be particularly useful for semi-structured data types like JSON arrays. These data types provide the necessary flexibility to store and query semi-structured data efficiently in Snowflake.

Snowflake Documentation: Semi-structured Data Types

Which SQL command can be used to verify the privileges that are granted to a role?

A.

SHOW GRANTS ON ROLE <Role Name>

A.

SHOW GRANTS ON ROLE <Role Name>

Answers
B.

SHOW ROLES <Role Name>

B.

SHOW ROLES <Role Name>

Answers
C.

SHOW GRANTS TO ROLE <Role Name>

C.

SHOW GRANTS TO ROLE <Role Name>

Answers
D.

SHOW GRANTS FOR ROLE <Role Name>

D.

SHOW GRANTS FOR ROLE <Role Name>

Answers
Suggested answer: C

Explanation:

To verify the privileges that have been granted to a specific role in Snowflake, the correct SQL command is SHOW GRANTS TO ROLE <Role Name>. This command lists all the privileges granted to the specified role, including access to schemas, tables, and other database objects. This is a useful command for administrators and users with sufficient privileges to audit and manage role permissions within the Snowflake environment.

Snowflake Documentation: SHOW GRANTS

Which service or feature in Snowflake is used to improve the performance of certain types of lookup and analytical queries that use an extensive set of WHERE conditions?

A.

Data classification

A.

Data classification

Answers
B.

Query acceleration service

B.

Query acceleration service

Answers
C.

Search optimization service

C.

Search optimization service

Answers
D.

Tagging

D.

Tagging

Answers
Suggested answer: C

Explanation:

The Search Optimization Service in Snowflake is designed to improve the performance of specific types of queries, particularly those involving extensive sets of WHERE conditions. By maintaining a search index on tables, this service can accelerate lookup and analytical queries, making it a valuable feature for optimizing query performance and reducing execution times for complex searches.

Snowflake Documentation: Search Optimization Service

There are two Snowflake accounts in the same cloud provider region: one is production and the other is non-production. How can data be easily transferred from the production account to the non-production account?

A.

Clone the data from the production account to the non-production account.

A.

Clone the data from the production account to the non-production account.

Answers
B.

Create a data share from the production account to the non-production account.

B.

Create a data share from the production account to the non-production account.

Answers
C.

Create a subscription in the production account and have it publish to the non-production account.

C.

Create a subscription in the production account and have it publish to the non-production account.

Answers
D.

Create a reader account using the production account and link the reader account to the non-production account.

D.

Create a reader account using the production account and link the reader account to the non-production account.

Answers
Suggested answer: B

Explanation:

To easily transfer data from a production account to a non-production account in Snowflake within the same cloud provider region, creating a data share is the most efficient approach. Data sharing allows for live, read-only access to selected data objects from the production account to the non-production account without the need to duplicate or move the actual data. This method facilitates seamless access to the data for development, testing, or analytics purposes in the non-production environment.

Snowflake Documentation: Data Sharing

Which privilege is required to use the search optimization service in Snowflake?

A.

GRANT SEARCH OPTIMIZATION ON SCHEMA <schema_name> TO ROLE <role>

A.

GRANT SEARCH OPTIMIZATION ON SCHEMA <schema_name> TO ROLE <role>

Answers
B.

GRANT SEARCH OPTIMIZATION ON DATABASE <database_name> TO ROLE <role>

B.

GRANT SEARCH OPTIMIZATION ON DATABASE <database_name> TO ROLE <role>

Answers
C.

GRANT ADD SEARCH OPTIMIZATION ON SCHEMA <schema_name> TO ROLE <role>

C.

GRANT ADD SEARCH OPTIMIZATION ON SCHEMA <schema_name> TO ROLE <role>

Answers
D.

GRANT ADD SEARCH OPTIMIZATION ON DATABASE <database name> TO ROLE <role>

D.

GRANT ADD SEARCH OPTIMIZATION ON DATABASE <database name> TO ROLE <role>

Answers
Suggested answer: C

Explanation:

To utilize the search optimization service in Snowflake, the correct syntax for granting privileges to a role involves specific commands that include adding search optimization capabilities:

Option C: GRANT ADD SEARCH OPTIMIZATION ON SCHEMA <schema_name> TO ROLE <role>. This command grants the specified role the ability to implement search optimization at the schema level, which is essential for enhancing search capabilities within that schema.

Options A and B do not include the correct verb 'ADD,' which is necessary for this specific type of grant command in Snowflake. Option D incorrectly mentions the database level, as search optimization privileges are typically configured at the schema level, not the database level.

Reference: Snowflake documentation on the use of GRANT statements for configuring search optimization.

Total 627 questions
Go to page: of 63