doc/user/content/sql/show-subsources.md
SHOW SUBSOURCES returns the subsources in the current schema.
SHOW SUBSOURCES [ FROM <schema_name> | ON <source_name> ];
| Syntax element | Description |
|---|---|
| FROM <schema_name> | If specified, only show subsources from the specified schema. Defaults to first resolvable schema in the search path. |
| ON <source_name> | If specified, only show subsources on the specified source. |
A subsource is a relation associated with a source. There are two types of subsources:
Subsources of type progress describe Materialize's ingestion progress for
the parent source. Every source has exactly one subsource of type
progress.
Subsources of type subsource are used by sources that need to ingest data
into multiple tables, like PostgreSQL sources. For each upstream table that
is selected for ingestion, Materialize creates a subsource of type
subsource.
SHOW SUBSOURCESSHOW SUBSOURCES's output is a table, with this structure:
name | type
-------+-----
... | ...
| Field | Meaning |
|---|---|
| name | The name of the subsource. |
| type | The type of the subsource: subsource or progress. |
SHOW SOURCES;
name
----------
postgres
kafka
SHOW SUBSOURCES ON pg;
name | type
--------------------+-----------
postgres_progress | progress
table1_in_postgres | subsource
table2_in_postgres | subsource
SHOW SUBSOURCES ON kafka;
name | typef
--------------------+----------
kafka_progress | progress