show-subsources.md 1.9 KB


title: "SHOW SUBSOURCES" description: "SHOW SUBSOURCES returns the subsources in the current schema." menu: main:

parent: commands

SHOW SUBSOURCES returns the subsources in the current schema.

Syntax

SHOW SUBSOURCES [ FROM <schema_name> | ON <source_name> ]

Details

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.

Output format for SHOW SUBSOURCES

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

 name  | type
-------+-----
 ...   | ...
Option Description
FROM If specified, only show subsources from the specified schema. Defaults to first resolvable schema in the search path.
ON If specified, only show subsources on the specified source.
Field Meaning
name The name of the subsource.
type The type of the subsource: subsource or progress.

Examples

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

Related pages