Impala SHOW Statement – Listing the Tables using Hue

Keeping you updated with latest technology trends, Join DataFlair on Telegram

1. Objective

In our last Impala tutorial, we learned to create table statements, drop table statements in Impala. in this tutorial, we will discuss Impala Show Statements, is used to get information about different types of Impala objects. Moreover, we will discuss, how to get information with Impala SHOW Statement. Also, we will cover its syntax, usage as well as an example to understand it well.
So, let’s start Impala Show Statements.

Impala SHOW Statement

Impala SHOW Statement

2. How to use Impala SHOW Statement?

Basically, to get information about different types of Impala objects we use the Impala SHOW statement. In addition, it is a flexible way to do it.
In other words, we can say to get the list of all the existing tables in the current database we use the show tables statement in Impala.
Follow this link to know about Impala Select Statement

a. Syntax of Show Statements in Impala

So, the syntax for using Impala SHOW Statement is-

SHOW SCHEMAS [[LIKE] 'pattern'] - an alias for SHOW DATABASES
SHOW TABLES [IN database_name] [[LIKE] 'pattern']
SHOW [AGGREGATE | ANALYTIC] FUNCTIONS [IN database_name] [[LIKE] 'pattern']
SHOW CREATE TABLE [database_name].table_name
SHOW TABLE STATS [database_name.]table_name
SHOW COLUMN STATS [database_name.]table_name
SHOW PARTITIONS [database_name.]table_name
SHOW FILES IN [database_name.]table_name [PARTITION (key_col=value [, key_col=value]]

Also, to see the appropriate objects in the current database, issue a SHOW object_type statement, or to see objects in a specific database SHOW object_type IN database_name.

Moreover, using Unix-style * wildcards and allowing | for alternation, the optional pattern argument is a quoted string literal. Also, the preceding LIKE keyword is optional. Although, make sure use all lowercase letters in the pattern string because all object names are stored in lowercase.
For example:

show databases 'a*';
show databases like 'a*';
show tables in some_db like '*fact*';
use some_db;
show tables '*dim*|*fact*';

Do you know about Impala ORDER BY clause

b. Cancellation

It is not possible to cancel it. That implies it Cannot be canceled.

If these professionals can make a switch to Big Data, so can you:
Rahul Doddamani Story - DataFlair
Rahul Doddamani
Java → Big Data Consultant, JDA
Follow on
Mritunjay Singh Success Story - DataFlair
Mritunjay Singh
PeopleSoft → Big Data Architect, Hexaware
Follow on
Rahul Doddamani Success Story - DataFlair
Rahul Doddamani
Big Data Consultant, JDA
Follow on
I got placed, scored 100% hike, and transformed my career with DataFlair
Enroll now
Richa Tandon Success Story - DataFlair
Richa Tandon
Support → Big Data Engineer, IBM
Follow on
DataFlair Web Services
You could be next!
Enroll now

3. Example of SHOW Statements in Impala

Let us understand it with an example of the show tables statement. So, begin with changing the context to the required database if we want to get the list of tables in a particular database. Then using show tables statement we will get the list of tables in it.
For Example,

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

Moreover, Impala fetches the list of all the tables in the specified database, on executing the above query.

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

4. Listing the Tables using Hue

There are several steps you have to follow while Listing the Tables using Hue, such as:

  • At first, select the context as my_db. Further, type the show tables statement in Impala Query editor then click on the execute button.
  • Afterward, we can see the list of the tables if we scroll down and select the results tab just after executing the query.

So, this was all in the Impala SHOW Statements. Hope you like our explanation.

5. Conclusion – Impala SHOW Statements

As a result, we have seen the whole concept of Impala SHOW Statement. Still, if any doubt occurs, feel free to ask in the comment section.
Related Topic- Impala TRUNCATE TABLE Statement
For reference

1 Response

  1. vidya says:

    how to show the table names if we know the column_names of the table in hue – impala editor

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.