Tag
You can provide configuration to Snowflake Object Lifecycle Engine for the following operations with tag:
- Manage the lifecycle of new and existing tags
- Manage the grants of tags
Using this configuration defines the tag as a Snowflake object for further use. It does not apply the tag to an object. For details on how to apply tags to objects within SOLE see SOLE Tags Management.
Usage
note
We have introduced SOLE for Data Products as a new framework for SOLE to help you quickly build an ecosystem of data products. Learn more about SOLE for Data Products, which is currently available as a private preview.
- Tag in Current Configuration
- Tag in SOLE for Data Products
databases:
<database-name>:
schemas:
<schema-name>:
tags:
<tag-name>:
<configuration-key>: <value>
- tag:
name: <tag-name>
<configuration-key>: <value>
database: rel(database.<database-name>)
schema: rel(schema.<schema-name>)
Supported parameters
The engine supports the parameters listed below.
Configuration Key | Required/Optional | Data Types and Values | Description |
---|---|---|---|
allowed_values | Optional | List of String | List of allowed values for the tag |
comment | Optional | String | Specifies a comment for the tag |
deleted | Optional | Boolean: True enables deletion prevention, False does nothing | Specifies what objects are allowed to be deleted |
grants | Optional | Map: See Supported Tag Grants to Roles | List of Privileges and Roles to which privileges are granted on the current tag |
manage_mode | Optional | String: all (default), none , grants | Configures what properties to manage for the tag. See Changing Manage Mode before changing the value. |
Supported tag grants to roles
Following is the privilege you can grant to roles in the tag definition:
- APPLY
Examples
- Tag in Current Configuration
- Tag in SOLE for Data Products
databases:
PRODUCTS_RECORD:
schemas:
PRODUCTS:
tags:
PRODUCT:
comment: "PRODUCT Tag"
allowed_values: ["Red", "Yellow", "Blue"]
grants:
APPLY:
- READER
- WRITER
- ADMIN
- tag:
name: PRODUCT
database: rel(database.PRODUCTS_RECORD)
schema: rel(schema.PRODUCTS)
comment: "PRODUCT Tag"
allowed_values: ["Red", "Yellow", "Blue"]
grants:
APPLY:
- rel(role.READER)
- rel(role.WRITER)
- rel(role.ADMIN)