Impala-shell can be launched with other optional parameters to either perform a specific action or to provide more information about the action. These command line options are used along with the impala-shell
command as a parameter. Some of these options are created to provide assistance with impala-shell usage, while others are designed to perform a specific action. For example, the –q
or –query
option can run a query directly outside the shell and show the output directly on console windows, as shown in the following screenshot:
Another example is to use the –d
option with a specific database name, as shown in the following screenshot. Once impala-shell starts, it connects to impalad at localhost through the default port 21000
and uses the selected database. In the shell we can call any command specific to the database used, which is also shown in the following screenshot:
The syntax to use the command-line option is shown in the following two examples:
$ impala-shell –q 'select * from mytable;' $ impala-shell –d students
In the next few sections, we will learn more about these command-line options within their specific category.
In this section, we will learn about a few command options, which can be used to get help about Impala-shell or to get the version along with other general details. A list of general commands are listed in the following table:
These command options can be use to connect specific impalad located remotely or to connect a specific database after starting impala-shell. A list of connection-specific command options is in the following table:
These commands are specific to passing queries with the impala-shell
command. Once you use such a command option, the query result can be saved to a file outside impala-shell or can be printed on the console, depending on your choice. A list of query-specific command options is shown in the following table:
If configured correctly, you can pass the appropriate command-line options shown in the following table, to use these security options while connecting impalad from impala-shell.
18.221.249.198