Materialize Logo

SHOW SOURCES

SHOW SOURCES returns a list of all sources available to your Materialize instances.

Syntax

SHOW FULL MATERIALIZED SOURCES FROM schema_name
Field Use
schema_name The schema to show sources from. Defaults to public in the current database. For available schemas, see SHOW SCHEMAS.
MATERIALIZED Only return materialized sources, i.e. those with indexes. Without specifying this option, this command returns all sources, including non-materialized sources.
FULL Return details about your sources.

Details

Output format for SHOW FULL SOURCES

SHOW FULL SOURCES's output is a table, with this structure:

 name  | type | materialized
-------+------+--------------
 ...   | ...  | ...
Field Meaning
name The name of the source
type Whether the source was created by the user or the system
materialized Does the source have an in-memory index? For more details, see CREATE INDEX

Changed in v0.5.0: The output column is renamed from SOURCES to name.

Internal statistic sources

Materialize comes with a number of sources that contain internal statistics about the instance’s behavior. These are kept in a “hidden” schema called mz_catalog.

To view the internal statistic sources use:

SHOW SOURCES FROM mz_catalog;

To select from these sources, you must specify that you want to read from the source in the mz_catalog schema.

Examples

Default behavior

SHOW SCHEMAS;
public
SHOW SOURCES FROM public;
my_stream_source
my_file_source
SHOW SOURCES;
my_stream_source
my_file_source

Only show materialized sources

SHOW MATERIALIZED SOURCES;
        name
----------------------
 my_materialized_source

Show details about sources

SHOW FULL SOURCES
            name           | type | materialized
---------------------------+------+--------------
 my_nonmaterialized_source | user | f
 my_materialized_source    | user | t