Categories:

Data Pipeline DDL

ALTER STREAM

Modifies the properties, columns, or constraints for an existing stream.

See also:

CREATE STREAM , DROP STREAM , SHOW STREAMS , DESCRIBE STREAM

In this Topic:

Syntax

ALTER STREAM [ IF EXISTS ] <name> SET
  [ TAG <tag_key> = '<tag_value>' [ , <tag_key> = '<tag_value>' ... ] ]
  [ COMMENT = '<string_literal>' ]

ALTER STREAM [ IF EXISTS ] <name> SET TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ]

ALTER STREAM <name> UNSET TAG <tag_name> [ , <tag_name> ... ]

ALTER STREAM [ IF EXISTS ] <name> UNSET COMMENT

Parameters

name

Identifier for the stream to alter. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

SET ...

Specifies the properties to set for the stream:

TAG tag_name = 'tag_value' [ , tag_name = 'tag_value' , ... ]

Specifies the tag name and the tag string value.

The tag value is always a string, and the maximum number of characters for the tag value is 256. The maximum number of unique tags that can be set on an object is 20. For more information, see Tag Quotas for Objects/Columns.

A single ALTER statement can set or unset a maximum of 5 tags on an object.

COMMENT = 'string'

Adds a comment or overwrites an existing comment for the stream.

UNSET ...

Specifies one or more properties/parameters to unset for the stream, which resets them back to their defaults:

  • TAG tag_key [ , tag_key ... ]

  • COMMENT

Usage Notes

Regarding metadata:

Attention

Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see Metadata Fields in Snowflake.

Examples

Add a comment for a stream:

ALTER STREAM mystream SET COMMENT = 'New comment for stream';
Back to top