Impala Shell Configuration Options
You can specify the configuration option to control how shell commands are executed. You can specify options on the command line, or in a configuration file
Command-Line Option | Configuration File Setting | Explanation |
---|---|---|
-B or --delimited |
write_delimited=true |
Causes all query results to be printed in plain format as a
delimited text file. Useful for producing data files to be used
with other Hadoop components. Also useful for avoiding the
performance overhead of pretty-printing all output, especially
when running benchmark tests using queries returning large
result sets. Specify the delimiter character with the
|
-b or --kerberos_host_fqdn |
kerberos_host_fqdn= load-balancer-hostname |
If set, the setting overrides the expected hostname of the
Impala daemon's Kerberos service principal.
impala-shell will check that the server's
principal matches this hostname. This may be used when
|
--print_header |
print_header=true |
|
-o filename or --output_file filename |
output_file=filename |
Stores all query results in the specified file. Typically used
to store the results of a single query issued from the command
line with the |
--output_delimiter= character |
output_delimiter=character |
Specifies the character to use as a delimiter between fields
when query results are printed in plain format by the
|
-p or --show_profiles |
show_profiles=true |
Displays the query execution plan (same output as the
|
-h or --help |
N/A |
Displays help information. |
N/A |
history_max=1000 |
Sets the maximum number of queries to store in the history file. |
-i hostname or --impalad=hostname[:portnum] |
impalad=hostname[:portnum] |
Connects to the |
-q query or --query=query |
query=query |
Passes a query or other impala-shell
command from the command line. The
impala-shell interpreter immediately exits
after processing the statement. It is limited to a single
statement, which could be a |
-f query_file or --query_file=query_file |
query_file=path_to_query_file |
Passes a SQL query from a file. Multiple statements must be semicolon (;) delimited. |
-k or --kerberos |
use_kerberos=true |
Kerberos authentication is used when the shell connects to
|
--query_option= "option=value -Q "option=value" |
Header line |
Sets default query options for an invocation of the impala-shell command. To set multiple query options at once, use more than one instance of this command-line option. The query option names are not case-sensitive. |
-s kerberos_service_name or --kerberos_service_name= name |
kerberos_service_name=name |
Instructs |
-V or --verbose |
verbose=true |
Enables verbose output. |
--quiet |
verbose=false |
Disables verbose output. |
-v or --version |
version=true |
Displays version information. |
-c |
ignore_query_failure=true |
Continues on query failure. |
-d default_db or --database=default_db |
default_db=default_db |
Specifies the database to be used on startup. Same as running
the |
--ssl | ssl=true | Enables TLS/SSL for impala-shell. |
path_to_certificate | ca_cert=path_to_certificate | The local pathname pointing to the third-party CA
certificate, or to a copy of the server certificate for
self-signed server certificates. If --ca_cert is
not set, impala-shell enables TLS/SSL, but does
not validate the server certificate. This is useful for connecting
to a known-good Impala that is only running over TLS/SSL, when a
copy of the certificate is not available (such as when debugging
customer installations). |
-l | use_ldap=true | Enables LDAP authentication. |
-u | user=user_name | Supplies the username, when LDAP authentication is enabled
by the -l option. (Specify the short username,
not the full LDAP distinguished name.) The shell then prompts
interactively for the password. |
--ldap_password_cmd= command |
N/A | Specifies a command to run to retrieve the LDAP password,
when LDAP authentication is enabled by the -l
option. If the command includes space-separated arguments, enclose
the command and its arguments in quotation marks. |
--config_file= path_to_config_file |
N/A | Specifies the path of the file containing impala-shell configuration settings. The default is $HOME/.impalarc. This setting can only be specified on the command line. |
--live_progress | N/A | Prints a progress bar showing roughly the percentage complete for each query. The information is updated interactively as the query progresses. |
--live_summary | N/A | Prints a detailed report, similar to the
SUMMARY command, showing progress details for
each phase of query execution. The information is updated
interactively as the query progresses. |
--var= variable_name= value |
N/A | Defines a substitution variable that can be used within the
impala-shell session. The variable can be
substituted into statements processed by the -q
or -f options, or in an interactive shell
session. Within a SQL statement, you substitute the value by using
the notation
${var:variable_name} . |
--auth_creds_ok_in_clear | N/A | Allows LDAP authentication to be used with an insecure connection to the shell. WARNING: This will allow authentication credentials to be sent unencrypted, and hence may be vulnerable to an attack. |
--protocol= protocol |
N/A | Protocol to use for the connection to Impala. Valid
protocol values are:
You cannot connect to the 3.2 or earlier versions of
Impala using the Beeswax support is deprecated and will be removed in the future. |