DESC

Describes the columns properties for a given table/view.

Syntax

DESC [schema_name.]table_name

Description

Presents the data type of each column, and whether it is defined as a primary key or not.

For tables, it'll also present the partition key if exist.

For views it'll show the view's query.

Example

> desc store_sales;

COLUMN                       | TYPE                 | PK
-----------------------------------------------------------------------------
ss_sold_date_sk              | INTEGER              |
ss_sold_time_sk              | INTEGER              |
ss_item_sk                   | INTEGER              |
ss_customer_sk               | INTEGER              |
ss_cdemo_sk                  | INTEGER              |
ss_hdemo_sk                  | INTEGER              |
ss_addr_sk                   | INTEGER              |
ss_store_sk                  | INTEGER              |
ss_promo_sk                  | INTEGER              |
ss_ticket_number             | BIGINT               |
ss_quantity                  | BIGINT               |
ss_wholesale_cost            | FLOAT                |
ss_list_price                | FLOAT                |
ss_sales_price               | FLOAT                |
ss_ext_discount_amt          | FLOAT                |
ss_ext_sales_price           | FLOAT                |
ss_ext_wholesale_cost        | FLOAT                |
ss_ext_list_price            | FLOAT                |
ss_ext_tax                   | FLOAT                |
ss_coupon_amt                | FLOAT                |
ss_net_paid                  | FLOAT                |
ss_net_paid_inc_tax          | FLOAT                |
ss_net_profit                | FLOAT                |
                             |                      |
Partition by ss_sold_date_sk |                      | every 365
-----------------------------------------------------------------------------

See Also

SHOW