Stream
Configuration can be provided to Snowflake Object Lifecycle Engine for the following operation with Stream:
- Manage Lifecycle of new and existing Stream
- Manage Grants of Stream
#
Supported ParametersThe runner supports below parameters.
- APPEND_ONLY: Specifies whether this is an append-only stream. Append-only streams track row inserts only. Update and delete operations (including table truncates) are not recorded.
- Configuration key:
append_only
- Data Type: Boolean
- Configuration key:
- COMMENT: Specifies a comment for the stream.
- Configuration key:
comment
- Data Type: String
- Configuration key:
- ON_TABLE: The table whose changes are tracked by the stream.
- Configuration key:
on_table
- Data Type: String/Object . See here for definition of ON_TABLE
- Configuration key:
- MANAGE_MODE: Configures what properties to manage for the Stream.
- 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 to on the current Stream.
- Configuration key:
grants
- Data Type: Map
- Configuration key:
#
TableIn the on_table
parameter of the stream, users can specify either just the name of the table(if the table belongs to the same schema and database as the external table), or the name of schema and database as well.
See Database-Level Object Reference section for more information
The on_table
parameter supports the following parameters if explicitly provided:
- TABLE: Name of the Table
- REQUIRED
- Configuration key:
table
- Data Type: String
- SCHEMA: Name of the schema, in which the table exists
- REQUIRED if table is present in another Database or another Schema than the current one
- Configuration key:
schema
- Data Type: String
- DATABASE: Name of the database, in which the table exists
- REQUIRED if table is present in another Database than the current one
- Configuration key:
database
- Data Type: String
#
Exampleon_table: table: TABLE_1 schema: SCHEMA_1 database: DATABASE_2
#
Basic syntaxdatabases: <database-name>: schemas: <schema-name>: streams: <stream-name>: <configuration-key>: <value> grants: <privilege>: - <role-name> - <role-name>
#
Supported Stream Grants to RolesFollowing is the list of Privileges Grant to Roles that can be specified in the stream definition
- ALL PRIVILEGES
- SELECT
- OWNERSHIP
#
Examplesdatabases: SALES_RECORD: schemas: SALES: streams: STREAM_1: append_only: false comment: "test stream" on_table: table: TABLE_1 schema: SCHEMA_1 database: DATABASE_2 grants: select: - SYSADMIN - ACCOUNTADMIN