nerdexam
SnowflakeSnowflake

COF-C02 · Question #534

COF-C02 Question #534: Real Exam Question with Answer & Explanation

The correct answer is D: Use the grant privilege ... TO share command to grant the necessary privileges.. 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 w

Data Protection and Data Sharing

Question

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

Options

  • AUse the automatic sharing feature for seamless access.
  • BDrop the object and then re-add it to the database to trigger sharing.
  • CRecreate the object with a different name in the database before sharing.
  • DUse the grant privilege ... TO share command to grant the necessary privileges.

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.

Topics

#Data Sharing#Grant Privileges#Object Sharing#Consumer Access

Community Discussion

No community discussion yet for this question.

Full COF-C02 PracticeBrowse All COF-C02 Questions