SHOW Statement The SHOW statement is a flexible way to get information about different types of Impala objects.
Syntax:
SHOW DATABASES [[LIKE] 'pattern'] 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 CREATE VIEW [database_name].view_name SHOW TABLE STATS [database_name.]table_name SHOW COLUMN STATS [database_name.]table_name SHOW PARTITIONS [database_name.]table_name SHOW [RANGE] PARTITIONS [database_name.]table_name SHOW FILES IN [database_name.]table_name [PARTITION (key_col_expression [, key_col_expression]] SHOW ROLES SHOW CURRENT ROLES SHOW ROLE GRANT GROUP group_name SHOW GRANT USER user_name ON SERVER SHOW GRANT USER user_name ON DATABASE database_name SHOW GRANT USER user_name ON TABLE database_name.table_name SHOW GRANT USER user_name ON URI uri SHOW GRANT USER user_name ON COLUMN database_name.table_name.column_name
The following statements are supported only when Impala uses Sentry to manage authorization.
SHOW GRANT USER user_name SHOW GRANT ROLE role_name SHOW GRANT ROLE role_name ON SERVER SHOW GRANT ROLE role_name ON DATABASE database_name SHOW GRANT ROLE role_name ON TABLE database_name.table_name SHOW GRANT ROLE role_name ON URI uri SHOW GRANT ROLE role_name ON COLUMN database_name.table_name.column_name
The following statements are supported only when Impala uses Ranger to manage authorization.
SHOW GRANT GROUP group_name ON SERVER SHOW GRANT GROUP group_name ON DATABASE database_name SHOW GRANT GROUP group_name ON TABLE database_name.table_name SHOW GRANT GROUP group_name ON URI uri SHOW GRANT GROUP group_name ON COLUMN database_name.table_name.column_name
Issue a SHOW object_type statement to see the appropriate objects in the current database, or SHOW object_type IN database_name to see objects in a specific database.
The optional pattern argument is a quoted string literal, using Unix-style * wildcards and allowing | for alternation. The preceding LIKE keyword is also optional. All object names are stored in lowercase, so use all lowercase letters in the pattern string. For example:
SHOW DATABASES 'a*'; SHOW DATABASES LIKE 'a*'; SHOW TABLES IN some_db LIKE '*fact*'; USE some_db; SHOW TABLES '*dim*|*fact*';
Cancellation: Cannot be cancelled.
Parent topic: Impala SQL Statements
SHOW FILES Statement
The SHOW FILES statement displays the files that constitute a specified table, or a partition within a partitioned table. This syntax is available in Impala 2.2 and higher only. The output includes the names of the files, the size of each file, and the applicable partition for a partitioned table. The size includes a suffix of B for bytes, MB for megabytes, and GB for gigabytes.
In Impala 2.8 and higher, you can use general expressions with operators such as <, IN, LIKE, and BETWEEN in the PARTITION clause, instead of only equality operators. For example:
show files in sample_table partition (j < 5); show files in sample_table partition (k = 3, l between 1 and 10); show files in sample_table partition (month like 'J%');