DROP SOURCE

DROP SOURCE removes a source from your Materialize instances.

Conceptual framework 

Materialize maintains your instances’ sources by attaching the source to its internal Differential dataflow engine. If you no longer need the source, you can drop it, which will remove it from Differential.

However, if views depend on the source you must either drop the views explicitly or use the CASCADE option.

Syntax 

DROP SOURCE IF EXISTS source_name RESTRICT CASCADE
Field Use
IF EXISTS Do not return an error if the named source does not exist.
source_name The source you want to drop. You can find available source names through SHOW SOURCES.
RESTRICT Do not drop this source if any views depend on it. (Default)
CASCADE Drop all views that depend on this source.

Details 

Before you can drop a source, you must drop all views which use it.

Examples 

SHOW SOURCES;
...
my_source
DROP SOURCE my_source;
DROP SOURCE