Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Impala displays the table


May 26, 2021 impala


Table of contents


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

Cases

The following is an example of a show tables statement. I f you want to get a list of tables in a particular database, first change the context to the desired database and use the show tables statement to get the list of tables in it, as shown below.

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

When executing the query above, Impala gets a list of all the tables in the specified database and displays it as follows.

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

Use Hue to list tables

Open the impala query editor, select the context my_db and type the show tables statement in it, and then click the execute button, as shown in the screenshot below.

Impala displays the table

After you execute the query, if you scroll down and select the Results tab, you can see a list of tables like the one below.

Impala displays the table