![Impala Tutorial](/impala/images/impala-mini-logo.jpg)
- Impala Tutorial
- Impala - Home
- Impala - Overview
- Impala - Environment
- Impala - Architecture
- Impala - Shell
- Impala - Query Language Basics
- Database Specific Statements
- Impala - Create a Database
- Impala - Drop a Database
- Impala - Select a Database
- Table Specific Statements
- Impala - Create Table Statement
- Impala - Insert Statement
- Impala - Select Statement
- Impala - Describe Statement
- Impala - Alter Table
- Impala - Drop a Table
- Impala - Truncate a Table
- Impala - Show Tables
- Impala - Create View
- Impala - Alter View
- Impala - Drop a View
- Impala - Clauses
- Impala - Order By Clause
- Impala - Group By Clause
- Impala - Having Clause
- Impala - Limit Clause
- Impala - Offset Clause
- Impala - Union Clause
- Impala - With Clause
- Impala - Distinct Operator
- Impala Useful Resources
- Impala - Quick Guide
- Impala - Useful Resources
- Impala - Discussion
Impala - Describe Statement
The describe statement in Impala is used to give the description of the table. The result of this statement contains the information about a table such as the column names and their data types.
Syntax
Following is the syntax of the Impala describe statement.
Describe table_name;
Example
For example, assume we have a table named customer in Impala, with the following data −
ID NAME AGE ADDRESS SALARY --- --------- ----- ----------- ----------- 1 Ramesh 32 Ahmedabad 20000 2 Khilan 25 Delhi 15000 3 Hardik 27 Bhopal 40000 4 Chaitali 25 Mumbai 35000 5 kaushik 23 Kota 30000 6 Komal 22 Mp 32000
You can get the description of the customer table using the describe statement as shown below −
[quickstart.cloudera:21000] > describe customer;
On executing the above query, Impala fetches the metadata of the specified table and displays it as shown below.
Query: describe customer +---------+--------+---------+ | name | type | comment | +---------+--------+---------+ | id | int | | | name | string | | | age | int | | | address | string | | | salary | bigint | | +---------+--------+---------+ Fetched 5 row(s) in 0.51s
Describing the Records using Hue
Open Impala Query editor and type the describe statement in it and click on the execute button as shown in the following screenshot.
![Describe Records](/impala/images/describe_records.jpg)
After executing the query, if you scroll down and select the Results tab, you can see the metadata of the table as shown below.
![Results Tab](/impala/images/results_tab.jpg)