Cloud

DESCRIBE

The DESCRIBE statement displays columns of a table, lists tables in a database, or shows the configuration of a storage connection.

Syntax

DESCRIBE DATABASE;
DESCRIBE TABLE table_name;
DESCRIBE TABLE catalog_name=>table_name;
DESCRIBE REDPANDA CATALOG catalog_name;
DESCRIBE ICEBERG CATALOG catalog_name;
DESCRIBE STORAGE storage_name;
  • table_name: Name of the table to describe.

  • catalog_name⇒table_name: Describes a table that is mapped to a Redpanda topic through a catalog.

  • catalog_name (after REDPANDA CATALOG): Name of a Redpanda catalog. Displays the catalog’s connection options and any linked Iceberg catalog. To list the tables in a catalog, use SHOW TABLES.

  • catalog_name (after ICEBERG CATALOG): Name of an Iceberg catalog. Lists the catalog’s connection details, including its REST endpoint and warehouse.

  • storage_name (after STORAGE): Name of a storage connection. Displays its configuration.

This statement is available to all users with the USAGE privilege on the schema where the table is located.

Examples

Describe a table

To show the columns of the part table, run the query:

DESCRIBE TABLE part;

The query returns:

+----------------+------------+-------------+-------+----------+
| database_name  | table_name |    name     | type  | nullable |
+----------------+------------+-------------+-------+----------+
| public         | part       | p_partkey   | INT   | f        |
| public         | part       | p_name      | TEXT  | f        |
| public         | part       | p_mfgr      | TEXT  | f        |
| public         | part       | p_category  | TEXT  | f        |
| public         | part       | p_brand     | TEXT  | f        |
| public         | part       | p_color     | TEXT  | f        |
| public         | part       | p_type      | TEXT  | f        |
| public         | part       | p_size      | INT   | f        |
| public         | part       | p_container | TEXT  | f        |
+----------------+------------+-------------+-------+----------+

Tables in this example use the public schema, the default in Redpanda SQL. For information on displaying tables from other schemas, see Schema.

Describe a database

To list all tables in the database, run:

DESCRIBE DATABASE;

The query returns:

+-----------------------------+
| name                        |
+-----------------------------+
| supplier_scale_1_no_index   |
| features                    |
| orders                      |
| features2                   |
| featurestable               |
| featurestable1              |
| featurestable10             |
+-----------------------------+

Describe a catalog table

To view column details for a table mapped through a Redpanda catalog, run:

DESCRIBE TABLE default_redpanda_catalog=>transactions;

The query returns:

+---------------------------+--------------+-------------+-------+----------+
| database_name             | table_name   |    name     | type  | nullable |
+---------------------------+--------------+-------------+-------+----------+
| default_redpanda_catalog  | transactions | tx_id       | INT   | f        |
| default_redpanda_catalog  | transactions | amount      | REAL  | f        |
| default_redpanda_catalog  | transactions | created_at  | TEXT  | f        |
+---------------------------+--------------+-------------+-------+----------+

Describe a Redpanda catalog

To view the connection details of a Redpanda catalog, run:

DESCRIBE REDPANDA CATALOG default_redpanda_catalog;

The query returns one row from the system.kafka_connections table:

+---------------+----------------+--------------------------+-----------------------------------------------------------+-----------------+
| database_name | namespace_name | name                     | options                                                   | iceberg_catalog |
+---------------+----------------+--------------------------+-----------------------------------------------------------+-----------------+
| oxla          | public         | default_redpanda_catalog | bootstrap_brokers: broker-0:9092, kafka_timeout_ms: 0,... | NULL            |
+---------------+----------------+--------------------------+-----------------------------------------------------------+-----------------+

The options column lists the connection options as key: value pairs, such as broker addresses and the Schema Registry endpoint. The iceberg_catalog column shows the linked Iceberg catalog, or NULL if the catalog has no link.

Describe an Iceberg catalog

To list connection details for an Iceberg catalog, run:

DESCRIBE ICEBERG CATALOG lakehouse_catalog;

The query returns the catalog’s REST endpoint, warehouse, and authentication type. If flat_namespaces or allowed_namespaces are set on the catalog, those values are also shown.

Describe a storage connection

To view the type and configuration of a storage connection, run:

DESCRIBE STORAGE archive_storage;

The query returns:

+------------------+------+-------------+---------------------------+
| name             | type | schema_name | parameters                |
+------------------+------+-------------+---------------------------+
| archive_storage  | s3   | public      | {"region": "us-west-2"}   |
+------------------+------+-------------+---------------------------+