Skip to main content
DESC is used to view table schemas:
  • View the schema of a table stored in your cluster, along with the type of the sort key and materialized view of the table.
  • View the schema of a table stored in the following external data sources, such as Apache Hive™. Note that you can perform this operation only in StarRocks 2.4 and later versions.

Syntax

Parameters

Output

The following table describes the parameters returned by this statement.
Note: For information about how a materialized view is displayed in the output, see Example 2.

Examples

Example 1: View the schema of example_table stored in your cluster.
Or
The output of the preceding statements is as follows.
Example 2: View the schema, type of the sort key, and materialized view of sales_records stored in your cluster. In the following example, one materialized view store_amt is created based on sales_records.
Example 3: View the schema of hive_table stored in your Hive cluster.
Example 4: View the schema of parquet file lineorder stored in AWS S3.
NOTE For files stored in remote storage, DESC only returns three fields: Field, Type, and Null.

References