ExamGecko
Question list
Search
Search

Question 561 - SnowPro Core discussion

Report
Export

What action should be taken if a Snowflake user wants to share a newly created object in a database with consumers?

A.

Use the automatic sharing feature for seamless access.

Answers
A.

Use the automatic sharing feature for seamless access.

B.

Drop the object and then re-add it to the database to trigger sharing.

Answers
B.

Drop the object and then re-add it to the database to trigger sharing.

C.

Recreate the object with a different name in the database before sharing.

Answers
C.

Recreate the object with a different name in the database before sharing.

D.

Use the grant privilege ... TO share command to grant the necessary privileges.

Answers
D.

Use the grant privilege ... TO share command to grant the necessary privileges.

Suggested answer: D

Explanation:

When a Snowflake user wants to share a newly created object in a database with consumers, the correct action to take is to use the GRANT privilege ... TO SHARE command to grant the necessary privileges for the object to be shared. This approach allows the object owner or a user with the appropriate privileges to share database objects such as tables, secure views, and streams with other Snowflake accounts by granting access to a named share.

The GRANT statement specifies which privileges are granted on the object to the share. The object remains in its original location; sharing does not duplicate or move the object. Instead, it allows the specified share to access the object according to the granted privileges.

For example, to share a table, the command would be:

GRANT SELECT ON TABLE new_table TO SHARE consumer_share;

This command grants the SELECT privilege on a table named new_table to a share named consumer_share, enabling the consumers of the share to query the table.

Automatic sharing, dropping and re-adding the object, or recreating the object with a different name are not required or recommended practices for sharing objects in Snowflake. The use of the GRANT statement to a share is the direct and intended method for this purpose.

asked 29/10/2024
Kyaw Lin Thu
25 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first