ExamGecko
Home Home / Snowflake / SnowPro Core

Snowflake SnowPro Core Practice Test - Questions Answers, Page 44

Question list
Search
Search

Which of the following SQL statements will list the version of the drivers currently being used?

A.

Execute SELECT CURRENT_ODBC_CLlENT(); from the Web Ul

A.

Execute SELECT CURRENT_ODBC_CLlENT(); from the Web Ul

Answers
B.

Execute SELECT CURRENT_JDBC_VERSION() ; from SnowSQL

B.

Execute SELECT CURRENT_JDBC_VERSION() ; from SnowSQL

Answers
C.

Execute SELECT CURRENT_CLIENT(); from an application

C.

Execute SELECT CURRENT_CLIENT(); from an application

Answers
D.

Execute SELECT CURRENT_VERSION (); from the Python Connector

D.

Execute SELECT CURRENT_VERSION (); from the Python Connector

Answers
Suggested answer: B

Explanation:

The correct SQL statement to list the version of the JDBC (Java Database Connectivity) drivers currently being used is to execute SELECT CURRENT_JDBC_VERSION(); from within SnowSQL or any client application that utilizes JDBC for connecting to Snowflake. Snowflake provides specific functions to query the version of the client drivers or connectors being used, such as JDBC, ODBC, and others. The CURRENT_JDBC_VERSION() function is designed specifically to return the version of the JDBC driver in use.

It's important to note that Snowflake supports various types of drivers and connectors for connecting to different client applications, including ODBC, JDBC, Python, and others. Each of these connectors has its own method or function for querying the current version in use. For JDBC, the appropriate function is CURRENT_JDBC_VERSION(), reflecting the specificity required to obtain version information relevant to the JDBC driver specifically.

Snowflake Documentation on Client Functions: This information can typically be found in the Snowflake documentation under the section that covers SQL functions, particularly those functions that provide information about the client or session.

When snaring data in Snowflake. what privileges does a Provider need to grant along with a share? (Select TWO).

A.

USAGE on the specific tables in the database.

A.

USAGE on the specific tables in the database.

Answers
B.

USAGE on the specific tables in the database.

B.

USAGE on the specific tables in the database.

Answers
C.

MODIFY on 1Mb specific tables in the database.

C.

MODIFY on 1Mb specific tables in the database.

Answers
D.

USAGE on the database and the schema containing the tables to share

D.

USAGE on the database and the schema containing the tables to share

Answers
E.

OPEBATE on the database and the schema containing the tables to share.

E.

OPEBATE on the database and the schema containing the tables to share.

Answers
Suggested answer: A, D

Explanation:

When sharing data in Snowflake, the provider needs to grant the following privileges along with a share:

A . USAGE on the specific tables in the database: This privilege allows the consumers of the share to access the specific tables included in the share.

D . USAGE on the database and the schema containing the tables to share: This privilege is necessary for the consumers to access the database and schema levels, enabling them to access the tables within those schemas.

These privileges are crucial for setting up secure and controlled access to the shared data, ensuring that only authorized users can access the specified resources.

Reference to Snowflake documentation on sharing data and managing access:

Data Sharing Overview

Privileges Required for Sharing Data

Which view in SNOWFLAKE.ACCOUNT_USAGE shows from which IP address a user connected to Snowflak?

A.

ACCESS_HOSTORY

A.

ACCESS_HOSTORY

Answers
B.

LOGIN_HISTORY

B.

LOGIN_HISTORY

Answers
C.

SESSIONS

C.

SESSIONS

Answers
D.

QUERY HISTORY

D.

QUERY HISTORY

Answers
Suggested answer: B

Explanation:

The LOGIN_HISTORY view in SNOWFLAKE.ACCOUNT_USAGE shows from which IP address a user connected to Snowflake. This view is particularly useful for auditing and monitoring purposes, as it helps administrators track login attempts, successful logins, and the geographical location of users based on their IP addresses.

Reference to Snowflake documentation on LOGIN_HISTORY:

Monitoring Login Attempts

Given the statement template below, which database objects can be added to a share?(Select TWO).

GRANT ON <object> <object_name> To SHARE <share_name>;

A.

Secure functions

A.

Secure functions

Answers
B.

Stored procedures

B.

Stored procedures

Answers
C.

Streams

C.

Streams

Answers
D.

Tables

D.

Tables

Answers
E.

Tasks

E.

Tasks

Answers
Suggested answer: C, D

Explanation:

In Snowflake, shares are used to share data across different Snowflake accounts securely. When you create a share, you can include various database objects that you want to share with consumers. According to Snowflake's documentation, the types of objects that can be shared include tables, secure views, secure materialized views, and streams. Secure functions and stored procedures are not shareable objects. Tasks also cannot be shared directly. Therefore, the correct answers are streams (C) and tables (D).

To share a stream or a table, you use the GRANT statement to grant privileges on these objects to a share. The syntax for sharing a table or stream involves specifying the type of object, the object name, and the share to which you are granting access. For example:

GRANT SELECT ON TABLE my_table TO SHARE my_share; GRANT SELECT ON STREAM my_stream TO SHARE my_share;

These commands grant the SELECT privilege on a table named my_table and a stream named my_stream to a share named my_share. This enables the consumer of the share to access these objects according to the granted privileges.

How can an administrator check for updates (for example, SCIM API requests) sent to Snowflake by the identity provider?

A.

ACCESS_HISTORY

A.

ACCESS_HISTORY

Answers
B.

LOAD_HISTORY

B.

LOAD_HISTORY

Answers
C.

QUERY_HISTORY

C.

QUERY_HISTORY

Answers
D.

REST EVENT HISTORY

D.

REST EVENT HISTORY

Answers
Suggested answer: D

Explanation:

To monitor updates, such as SCIM API requests sent to Snowflake by the identity provider, an administrator can use the REST EVENT HISTORY feature. This feature allows administrators to query historical data about REST API calls made to Snowflake, including those related to user and role management through SCIM (System for Cross-domain Identity Management).

The REST EVENT HISTORY table function returns information about REST API calls made over a specified period. It is particularly useful for auditing and monitoring purposes, especially when integrating Snowflake with third-party identity providers that use SCIM for automated user provisioning and deprovisioning.

An example query to check for SCIM API requests might look like this:

SELECT * FROM TABLE(information_schema.rest_event_history(date_range_start=>dateadd('hours',-1,current_timestamp()))) WHERE request_type = 'SCIM';

This query returns details on SCIM API requests made in the last hour, including the request type, the identity provider's details, and the outcome of each request.

Which object type is granted permissions for reading a table?

A.

User

A.

User

Answers
B.

Role

B.

Role

Answers
C.

Attribute

C.

Attribute

Answers
D.

Schema

D.

Schema

Answers
Suggested answer: B

Explanation:

In Snowflake, permissions for accessing database objects, including tables, are not granted directly to users but rather to roles. A role encapsulates a collection of privileges on various Snowflake objects. Users are then granted roles, and through those roles, they inherit the permissions necessary to read a table or perform other actions. This approach adheres to the principle of least privilege, allowing for granular control over database access and simplifying the management of user permissions.

When should a stored procedure be created with caller's rights?

A.

When the caller needs to be prevented from viewing the source code of the stored procedure

A.

When the caller needs to be prevented from viewing the source code of the stored procedure

Answers
B.

When the caller needs to run a statement that could not execute outside of the stored procedure

B.

When the caller needs to run a statement that could not execute outside of the stored procedure

Answers
C.

When the stored procedure needs to run with the privileges of the role that called the stored procedure

C.

When the stored procedure needs to run with the privileges of the role that called the stored procedure

Answers
D.

When the stored procedure needs to operate on objects that the caller does not have privileges on

D.

When the stored procedure needs to operate on objects that the caller does not have privileges on

Answers
Suggested answer: C

Explanation:

Stored procedures in Snowflake can be created with either 'owner's rights' or 'caller's rights'. A stored procedure created with caller's rights executes with the privileges of the role that calls the procedure, not the privileges of the role that owns the procedure. This is particularly useful in scenarios where the procedure needs to perform operations that depend on the caller's access permissions, ensuring that the procedure can only access objects that the caller is authorized to access.

Which function can be used with the copy into <location> statement to convent rows from a relational table to a single variant column, and to unload rows into a JSON file?

A.

FLATTEN

A.

FLATTEN

Answers
B.

OBJECT_AS

B.

OBJECT_AS

Answers
C.

OBJECT_CONSTRUCT

C.

OBJECT_CONSTRUCT

Answers
D.

TO VARIANT

D.

TO VARIANT

Answers
Suggested answer: D

Explanation:

The correct function to use with the COPY INTO <location> statement to convert rows from a relational table into a single variant column and to unload rows into a JSON file is TO VARIANT. The TO VARIANT function is used to explicitly convert a value of any supported data type into a VARIANT data type. This is particularly useful when needing to aggregate multiple columns or complex data structures into a single JSON-formatted string, which can then be unloaded into a file.

In the context of unloading data, the COPY INTO <location> statement combined with TO VARIANT enables the conversion of structured data from Snowflake tables into a semi-structured VARIANT format, typically JSON, which can then be efficiently exported and stored. This approach is often utilized for data integration scenarios, backups, or when data needs to be shared in a format that is easily consumed by various applications or services that support JSON.

Snowflake Documentation on Data Unloading: Unloading Data

Snowflake Documentation on VARIANT Data Type: Working with JSON

By default, which role can create resource monitors?

A.

ACCOUNTADMIN

A.

ACCOUNTADMIN

Answers
B.

SECURITYADMIN

B.

SECURITYADMIN

Answers
C.

SYSADMIN

C.

SYSADMIN

Answers
D.

USERADMIN

D.

USERADMIN

Answers
Suggested answer: A

Explanation:

The role that can by default create resource monitors in Snowflake is the ACCOUNTADMIN role. Resource monitors are a crucial feature in Snowflake that allows administrators to track and control the consumption of compute resources, ensuring that usage stays within specified limits. The creation and management of resource monitors involve defining thresholds for credits usage, setting up notifications, and specifying actions to be taken when certain thresholds are exceeded.

Given the significant impact that resource monitors can have on the operational aspects and billing of a Snowflake account, the capability to create and manage them is restricted to the ACCOUNTADMIN role. This role has the broadest set of privileges in Snowflake, including the ability to manage all aspects of the account, such as users, roles, warehouses, databases, and resource monitors, among others.

Snowflake Documentation on Resource Monitors: Managing Resource Monitors

What happens to the privileges granted to Snowflake system-defined roles?

A.

The privileges cannot be revoked.

A.

The privileges cannot be revoked.

Answers
B.

The privileges can be revoked by an ACCOUNTADMIN.

B.

The privileges can be revoked by an ACCOUNTADMIN.

Answers
C.

The privileges can be revoked by an orgadmin.

C.

The privileges can be revoked by an orgadmin.

Answers
D.

The privileges can be revoked by any user-defined role with appropriate privileges.

D.

The privileges can be revoked by any user-defined role with appropriate privileges.

Answers
Suggested answer: A

Explanation:

The privileges granted to Snowflake's system-defined roles cannot be revoked. System-defined roles, such as SYSADMIN, ACCOUNTADMIN, SECURITYADMIN, and others, come with a set of predefined privileges that are essential for the roles to function correctly within the Snowflake environment. These privileges are intrinsic to the roles and ensure that users assigned these roles can perform the necessary tasks and operations relevant to their responsibilities.

The design of Snowflake's role-based access control (RBAC) model ensures that system-defined roles have a specific set of non-revocable privileges to maintain the security, integrity, and operational efficiency of the Snowflake environment. This approach prevents accidental or intentional modification of privileges that could disrupt the essential functions or compromise the security of the Snowflake account.

Snowflake Documentation on Access Control: Understanding Role-Based Access Control (RBAC)

Total 627 questions
Go to page: of 63