impala-shell Command Reference
Use the following commands within impala-shell
to pass requests to the
impalad
daemon that the shell is connected to. You can enter a command interactively at the
prompt, or pass it as the argument to the -q
option of impala-shell
. Most
of these commands are passed to the Impala daemon as SQL statements; refer to the corresponding
SQL language reference sections for full syntax
details.
Command | Explanation |
---|---|
|
Changes the underlying structure or settings of an Impala table, or a table shared between Impala and Hive. See ALTER TABLE Statement and ALTER VIEW Statement for details. |
|
Gathers important performance-related information for a table, used by Impala to optimize queries. See COMPUTE STATS Statement for details. |
|
Connects to the specified instance of
The |
|
Shows the columns, column data types, and any column comments for a specified table.
|
|
Removes a schema object, and in some cases its associated data files. See DROP TABLE Statement, DROP VIEW Statement, DROP DATABASE Statement, and DROP FUNCTION Statement for details. |
|
Provides the execution plan for a query. |
|
Help provides a list of all available commands and options. |
|
Maintains an enumerated cross-session command history. This history is stored in the ~/.impalahistory file. |
|
Writes the results of a query to a specified table. This either overwrites table data or appends data to the existing table content. See INSERT Statement for details. |
|
Updates impalad metadata for table existence and structure. Use this command after creating, dropping, or altering databases, tables, or partitions in Hive. See INVALIDATE METADATA Statement for details. |
|
Displays low-level information about the most recent query. Used for performance diagnosis and
tuning. The report starts with the same information as produced by the
|
|
Exits the shell. Remember to include the final semicolon so that the shell recognizes the end of the command. |
|
Refreshes impalad metadata for the locations of HDFS blocks corresponding to Impala data files. Use this command after loading new data files into an Impala table through Hive or through HDFS commands. See REFRESH Statement for details. |
|
Executes a previous impala-shell command again,
from the list of commands displayed by the
Specify an integer argument. A positive integer
|
|
Specifies the data set on which to complete some action. All information returned from
|
|
Manages query options for an impala-shell
session. The available options are the ones listed in SET Statement. These options
are used for query tuning and troubleshooting. Issue
The
In Impala 2.0 and later, |
|
Executes the specified command in the operating system shell without exiting
Note:
Quote any instances of the
-- or /* tokens to avoid them being
interpreted as the start of a comment. To embed comments within source or
! commands, use the shell comment character # before the comment
portion of the line.
|
|
Displays metastore data for schema objects created and accessed through Impala, Hive, or both.
|
|
Executes one or more statements residing in a specified file from the local filesystem.
Allows you to perform the same kinds of batch operations as with the |
|
Summarizes the work performed in various stages of a query. It provides a higher-level view of the
information displayed by the In Impala 2.3 and higher, you can see a continuously updated report of the summary information while a query is in progress. See LIVE_SUMMARY Query Option (Impala 2.3 or higher only) for details. |
|
Removes any user-specified value for a query option and returns the option to its default value. See SET Statement for the available query options.
In Impala 2.5 and higher, it can also remove user-specified substitution variables
using the notation |
|
Indicates the database against which to execute subsequent commands. Lets you avoid using fully
qualified names when referring to tables in databases other than |
|
Returns Impala version information. |