QuestionQ102

Data Collaboration

A secure view has been created that references objects from multiple databases within the same account, and this view needs to be shared with data consumers.

Which database-level privilege must be granted to the share to ensure data consumers can query the view and access the necessary underlying data?

Explanation

When a secure view spans multiple databases, Snowflake requires the REFERENCE_USAGE privilege to be granted on each additional database referenced by the view (other than the database being shared) to the share object. This privilege specifically permits objects in one database to be referenced by a secure view or secure UDF that is shared from another database, without directly exposing the referenced database's objects to the consumer account. Without REFERENCE_USAGE on the referenced database, the share and its consumers would not be able to successfully query the view because the underlying cross-database references would be inaccessible.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!