Materialize Documentation
s
Join the Community github/materialize

SHOW COLUMNS

SHOW COLUMNS lists the columns available from an item—either sources, materialized views, or non-materialized views.

Syntax

SHOW COLUMNS FROM item_ref LIKE pattern WHERE expr
Field Use
item_ref The name of the item whose columns you want to view. These can be sources or views (either materialized or non-materialized).

Details

Output format

SHOW COLUMNS’s output is a table, with this structure:

+---------+------------+--------+
| name    | nullable   | type   |
|---------+------------+--------|
| ...     | ...        | ...    |
+---------+------------+--------+
Field Meaning
name The name of the column
nullable Does the column accept null values?
type The column’s type

Changed in v0.4.2: Rows are sorted by the order in which the fields are defined in the targeted source, view, or table. Prior versions did not guarantee any particular ordering.

Changed in v0.5.0: The name, nullable, and type columns are renamed to name, nullable, and type, respectively.

Examples

SHOW SOURCES;
   name
----------
my_sources
SHOW COLUMNS FROM my_source;
  name  | nullable | type
---------+----------+------
 column1 | NO       | int4
 column2 | YES      | text