DROP STREAM

Synopsis

DROP STREAM stream_name;

Description

Drops an existing Relation. It can only be executed by the Stream owner. A Stream cannot be dropped if there exists any queries that depend on that Stream. Note that deleting the Stream does not delete the Stream's underlying Topic.

DROP STREAM cannot be undone. Use it with care!

A Stream cannot be dropped if there exist any references to that Stream

Arguments

stream_name

The name of the Stream to drop. For case-sensitive names, the name must be wrapped in double quotes, otherwise, the lowercased name will be used.

Example

Drop a Stream using default Database and Schema

The following shows how to drop the Stream named pageviews:

demodb.public/demostore# LIST STREAMS;
    Name    |  Type  |  Owner   |      Created at      |      Updated at
------------+--------+----------+----------------------+-----------------------
  pageviews | Stream | sysadmin | 2023-02-06T16:14:22Z | 2023-02-06T16:14:22Z

demodb.public/demostore# DROP STREAM pageviews;
demodb.public/demostore# LIST STREAMS;
  Name | Type | Owner | Created at | Updated at
-------+------+-------+------------+-------------

Drop a Stream using a fully qualified name

The following shows how to drop the Stream named pageviews in the Database otherdb and Schema s1:

demodb.public/demostore# LIST STREAMS IN SCHEMA otherdb.s1;
    Name    |  Type  |  Owner   |      Created at      |      Updated at
------------+--------+----------+----------------------+-----------------------
  pageviews | Stream | sysadmin | 2023-02-06T16:14:22Z | 2023-02-06T16:14:22Z

demodb.public/demostore# DROP STREAM otherdb.s1.pageviews;
demodb.public/demostore# LIST STREAMS IN SCHEMA otherdb.s1;
  Name | Type | Owner | Created at | Updated at
-------+------+-------+------------+-------------

Last updated