Materialize Logo

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 COLUMN's output is a table, with this structure:

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

Examples

SHOW SOURCES;
 SOURCES
----------
my_sources
SHOW COLUMNS FROM my_source;
  Field  | Nullable | Type
---------+----------+------
 column1 | NO       | int4
 column2 | YES      | text