Sequence
Configuration can be provided to Snowflake Object Lifecycle Engine for the following operation with Sequence:
- Manage Lifecycle of new and existing Sequence
- Manage Grants of a Sequence
Supported Parameters
The engine supports the parameters listed below.
- INCREMENT: The amount the sequence will increase by each time it is used.
- Configuration Key:
increment
- Data Type: Integer
- Configuration Key:
- COMMENT: Specifies a comment for the sequence.
- Configuration Key:
comment
- Data Type: String
- Configuration Key:
- MANAGE_MODE: Configures what properties to manage for the sequence.
- Configuration key:
manage_mode
- Data Type: String
- Possible Values:
none
grants
all
(Default)
- Configuration key:
- GRANTS: List of Privileges and Roles to which privileges are granted on the current sequence.
- Configuration key:
grants
- Data Type: Map
- Configuration key:
Basic syntax
databases:
<database-name>:
schemas:
<schema-name>:
sequences:
<sequence-name>:
<configuration-key>: <value>
grants:
<privilege>:
- <role-name>
- <role-name>
Supported Sequence Grants to Roles
Following is the list of Privilege Grants to Roles that can be specified in the sequence definition
- USAGE
- OWNERSHIP
Examples
databases:
DATABASE_1:
comment: "Database one"
schemas:
SCHEMA_1:
comment: "Schema one"
sequences:
SEQ_1:
grants:
USAGE:
- ACCOUNTADMIN
- ROLE_1
comment: "Sequence 1"