Skip to main content

View

You can provide configuration to Snowflake Object Lifecycle Engine for the following operation with view:

  • Manage the grants of a view

Usage

note

We have introduced SOLE for Data Products as a new framework for SOLE to help you easily build an ecosystem of data products. Learn more about SOLE for Data Products which is currently available as a private preview.

databases:
<database-name>:
schemas:
<schema-name>:
views:
<view-name>:
shares:
<privilege>:
- <share-name>
- <share-name>
grants:
<privilege>:
- <grant-name>
- <grant-name>

Supported parameters

The engine supports the parameters listed below.

Configuration KeyRequired/OptionalData Types and ValuesDescription
grantsOptionalMap: See Supported View Grants to RolesList of Privileges and Roles to which privileges are granted on the current view
manage_modeOptionalString: grants (default), noneConfigures what properties to manage for the view
sharesOptionalMap: See Supported View Grants to sharesList of shares to which privileges are granted

Supported view grants to roles

Following are the privileges you can grant to roles in the view definition:

  • ALL PRIVILEGES
  • SELECT
  • OWNERSHIP

Supported view grants to shares

Following is the privilege you can grant to shares in the view definition:

  • SELECT

Examples

databases:
SALES_RECORD:
schemas:
SALES:
view:
DEV_VIEW:
grants:
SELECT:
- HR_ROLE
- ACCOUNTADMIN
shares:
SELECT:
- DEV_SHARE