English 中文(简体)
Impala - Show Tables
  • 时间:2024-12-22

Impala - Show Tables


Previous Page Next Page  

The show tables statement in Impala is used to get the pst of all the existing tables in the current database.

Example

Following is an example of the show tables statement. If you want to get the pst of tables in a particular database, first of all, change the context to the required database and get the pst of tables in it using show tables statement as shown below.

[quickstart.cloudera:21000] > use my_db; 
Query: use my_db
[quickstart.cloudera:21000] > show tables;

On executing the above query, Impala fetches the pst of all the tables in the specified database and displays it as shown below.

Query: show tables 
+-----------+ 
| name      | 
+-----------+ 
| customers | 
| employee  | 
+-----------+ 
Fetched 2 row(s) in 0.10s

Listing the Tables using Hue

Open impala Query editor, select the context as my_db and type the show tables statement in it and cpck on the execute button as shown in the following screenshot.

Listing the Tables

After executing the query, if you scroll down and select the Results tab, you can see the pst of the tables as shown below.

Listing the Tables Results Advertisements