blob: cb732a88392c4e419538986f0c89261afac5ad52 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="copyright" content="(C) Copyright 2023" />
<meta name="DC.rights.owner" content="(C) Copyright 2023" />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="impala-shell Configuration Options" />
<meta name="DC.Relation" scheme="URI" content="../topics/impala_impala_shell.html" />
<meta name="prodname" content="Impala" />
<meta name="prodname" content="Impala" />
<meta name="prodname" content="Impala" />
<meta name="prodname" content="Impala" />
<meta name="version" content="Impala 3.4.x" />
<meta name="version" content="Impala 3.4.x" />
<meta name="version" content="Impala 3.4.x" />
<meta name="version" content="Impala 3.4.x" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="shell_options" />
<link rel="stylesheet" type="text/css" href="../commonltr.css" />
<title>impala-shell Configuration Options</title>
</head>
<body id="shell_options">
<h1 class="title topictitle1" id="ariaid-title1">impala-shell Configuration Options</h1>
<div class="body conbody">
<p class="p"> You can specify the following options when starting the
<code class="ph codeph">impala-shell</code> command to change how shell commands are
executed. The table shows the format to use when specifying each option on
the command line, or through the <code class="ph codeph">impala-shell</code>
configuration file. </p>
<div class="note note"><span class="notetitle">Note:</span>
<p class="p">
These options are different than the configuration options for the <code class="ph codeph">impalad</code> daemon itself.
For the <code class="ph codeph">impalad</code> options, see <a class="xref" href="impala_config_options.html#config_options">Modifying Impala Startup Options</a>.
</p>
</div>
<p class="p toc inpage"></p>
</div>
<div class="related-links">
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/impala_impala_shell.html">Using the Impala Shell (impala-shell Command)</a></div>
</div>
</div><div class="topic concept nested1" aria-labelledby="ariaid-title2" id="shell_option_summary">
<h2 class="title topictitle2" id="ariaid-title2">Summary of impala-shell Configuration Options</h2>
<div class="body conbody">
<p class="p">
The following table shows the names and allowed arguments for the <span class="keyword cmdname">impala-shell</span>
configuration options. You can specify options on the command line, or in a configuration file as described
in <a class="xref" href="impala_shell_options.html#shell_config_file">impala-shell Configuration File</a>.
</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="border" border="1" rules="all"><colgroup><col style="width:25%" /><col style="width:25%" /><col style="width:50%" /></colgroup><thead class="thead" style="text-align:left;">
<tr class="row">
<th class="entry nocellnorowborder" style="vertical-align:top;" id="d201228e141">
Command-Line Option
</th>
<th class="entry nocellnorowborder" style="vertical-align:top;" id="d201228e144">
Configuration File Setting
</th>
<th class="entry cell-norowborder" style="vertical-align:top;" id="d201228e147">
Explanation
</th>
</tr>
</thead>
<tbody class="tbody">
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p"> -B or </p>
<p class="p">--delimited </p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
write_delimited=true
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
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
<code class="ph codeph">--output_delimiter</code> option. Store all query results in a file rather than
printing to the screen with the <code class="ph codeph">-B</code> option. Added in Impala 1.0.1.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p">
-b or
</p>
<p class="p">
--kerberos_host_fqdn
</p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
kerberos_host_fqdn=
</p>
<p class="p">
<var class="keyword varname">load-balancer-hostname</var>
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
If set, the setting overrides the expected hostname of the
Impala daemon's Kerberos service principal.
<span class="keyword cmdname">impala-shell</span> will check that the server's
principal matches this hostname. This may be used when
<code class="ph codeph">impalad</code> is configured to be accessed via a
load-balancer, but it is desired for impala-shell to talk to a
specific <code class="ph codeph">impalad</code> directly.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p">
--print_header
</p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
print_header=true
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p"></p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p"> -o <var class="keyword varname">filename</var> or </p>
<p class="p">--output_file <var class="keyword varname">filename</var>
</p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
output_file=<var class="keyword varname">filename</var>
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
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 <code class="ph codeph">-q</code> option. Also works for
interactive sessions; you see the messages such as number of rows fetched, but not the actual
result set. To suppress these incidental messages when combining the <code class="ph codeph">-q</code> and
<code class="ph codeph">-o</code> options, redirect <code class="ph codeph">stderr</code> to <code class="ph codeph">/dev/null</code>.
Added in Impala 1.0.1.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p">
--output_delimiter=<var class="keyword varname">character</var>
</p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
output_delimiter=<var class="keyword varname">character</var>
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Specifies the character to use as a delimiter between fields when query results are printed in
plain format by the <code class="ph codeph">-B</code> option. Defaults to tab (<code class="ph codeph">'\t'</code>). If an
output value contains the delimiter character, that field is quoted, escaped by doubling quotation marks, or both. Added in
Impala 1.0.1.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p"> -E or </p>
<p class="p">--vertical </p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
vertical=true
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Print the output of a query (rows) vertically, no effects if <code class="ph codeph">-B</code> is specified. Added in Impala 4.2.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p"> -p or </p>
<p class="p">--show_profiles </p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
show_profiles=true
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Displays the query execution plan (same output as the <code class="ph codeph">EXPLAIN</code> statement) and a
more detailed low-level breakdown of execution steps, for every query executed by the shell.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p"> -h or </p>
<p class="p">--help </p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
N/A
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Displays help information.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p">
N/A
</p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
history_max=1000
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Sets the maximum number of queries to store in the history file.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p"> -i <var class="keyword varname">hostname</var> or </p>
<p class="p">--impalad=<var class="keyword varname">hostname</var>[:<var class="keyword varname">portnum</var>] </p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
impalad=<var class="keyword varname">hostname</var>[:<var class="keyword varname">portnum</var>]
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Connects to the <code class="ph codeph">impalad</code> daemon on the specified host. The default port of 21050
is assumed unless you provide another value. You can connect to any host in your cluster that is
running <code class="ph codeph">impalad</code>. If you connect to an instance of <code class="ph codeph">impalad</code> that
was started with an alternate port specified by the <code class="ph codeph">--fe_port</code> flag, provide that
alternative port.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p"> -q <var class="keyword varname">query</var> or </p>
<p class="p">--query=<var class="keyword varname">query</var>
</p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
query=<var class="keyword varname">query</var>
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Passes a query or other <span class="keyword cmdname">impala-shell</span> command from the command line. The
<span class="keyword cmdname">impala-shell</span> interpreter immediately exits after processing the statement. It
is limited to a single statement, which could be a <code class="ph codeph">SELECT</code>, <code class="ph codeph">CREATE
TABLE</code>, <code class="ph codeph">SHOW TABLES</code>, or any other statement recognized in
<code class="ph codeph">impala-shell</code>. Because you cannot pass a <code class="ph codeph">USE</code> statement and
another query, fully qualify the names for any tables outside the <code class="ph codeph">default</code>
database. (Or use the <code class="ph codeph">-f</code> option to pass a file with a <code class="ph codeph">USE</code>
statement followed by other queries.)
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p"> -f <var class="keyword varname">query_file</var> or</p>
<p class="p"> --query_file=<var class="keyword varname">query_file</var>
</p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
query_file=<var class="keyword varname">path_to_query_file</var>
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Passes a SQL query from a file. Multiple statements must be semicolon (;) delimited.
<span class="ph">In <span class="keyword">Impala 2.3</span> and higher, you can specify a filename of <code class="ph codeph">-</code>
to represent standard input. This feature makes it convenient to use <span class="keyword cmdname">impala-shell</span>
as part of a Unix pipeline where SQL statements are generated dynamically by other tools.</span>
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p"> --query_option=</p>
<p class="p">"<var class="keyword varname">option</var>=</p>
<p class="p"><var class="keyword varname">value</var>" </p>
<p class="p">-Q "<var class="keyword varname">option</var>=</p>
<p class="p"><var class="keyword varname">value</var>" </p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
Header line <code class="ph codeph">[impala.query_options]</code>,
followed on subsequent lines by <var class="keyword varname">option</var>=<var class="keyword varname">value</var>, one option per line.
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Sets default query options for an invocation of the <span class="keyword cmdname">impala-shell</span> 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.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p"> -k or </p>
<p class="p">--kerberos </p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
use_kerberos=true
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Kerberos authentication is used when the shell connects to <code class="ph codeph">impalad</code>. If Kerberos
is not enabled on the instance of <code class="ph codeph">impalad</code> to which you are connecting, errors
are displayed.
</p>
<p class="p">
See <a href="impala_kerberos.html"><span class="keyword">Enabling Kerberos Authentication for Impala</span></a> for the steps to set up and
use Kerberos authentication in Impala.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p"> -s <var class="keyword varname">kerberos_service_name</var> or </p>
<p class="p">--kerberos_service_name=<var class="keyword varname">name</var>
</p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
kerberos_service_name=<var class="keyword varname">name</var>
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Instructs <code class="ph codeph">impala-shell</code> to authenticate to a particular <code class="ph codeph">impalad</code>
service principal. If a <var class="keyword varname">kerberos_service_name</var> is not specified,
<code class="ph codeph">impala</code> is used by default. If this option is used in conjunction with a
connection in which Kerberos is not supported, errors are returned.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p"> -V or </p>
<p class="p">--verbose </p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
verbose=true
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Enables verbose output.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p">
--quiet
</p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
verbose=false
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Disables verbose output.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p"> -v or </p>
<p class="p">--version </p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
version=true
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Displays version information.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p">
-c
</p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
ignore_query_failure=true
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Continues on query failure.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
<p class="p"> -d <var class="keyword varname">default_db</var> or </p>
<p class="p">--database=<var class="keyword varname">default_db</var>
</p>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
<p class="p">
default_db=<var class="keyword varname">default_db</var>
</p>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
<p class="p">
Specifies the database to be used on startup. Same as running the
<code class="ph codeph"><a class="xref" href="impala_use.html#use">USE</a></code> statement after connecting. If not
specified, a database named <code class="ph codeph">DEFAULT</code> is used.
</p>
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
-ssl
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
ssl=true
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
Enables TLS/SSL for <span class="keyword cmdname">impala-shell</span>.
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
--ca_cert=<var class="keyword varname">path_to_certificate</var>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
ca_cert=<var class="keyword varname">path_to_certificate</var>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
The local pathname pointing to the third-party CA certificate, or to a copy of the server
certificate for self-signed server certificates. If <code class="ph codeph">--ca_cert</code> is not set,
<span class="keyword cmdname">impala-shell</span> 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).
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
-l
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
use_ldap=true
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
Enables LDAP authentication.
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
-u
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
user=<var class="keyword varname">user_name</var>
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
Supplies the username, when LDAP authentication is enabled by the <code class="ph codeph">-l</code> option.
(Specify the short username, not the full LDAP distinguished name.) The shell then prompts
interactively for the password.
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
--ldap_password_cmd=<var class="keyword varname">command</var>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
N/A
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
Specifies a command to run to retrieve the LDAP password,
when LDAP authentication is enabled by the <code class="ph codeph">-l</code> option.
If the command includes space-separated arguments, enclose the command and
its arguments in quotation marks.
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">
--config_file=<var class="keyword varname">path_to_config_file</var>
</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">
N/A
</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 "> Specifies the path of the file containing
<span class="keyword cmdname">impala-shell</span> configuration settings. The
default is <span class="ph filepath">/etc/impalarc</span>. This setting can
only be specified on the command line. </td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">--live_progress</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">live_progress=true</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">Prints a progress bar showing roughly the percentage complete for each query.
The information is updated interactively as the query progresses.
See <a class="xref" href="impala_live_progress.html#live_progress">LIVE_PROGRESS Query Option (Impala 2.3 or higher only)</a>.</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">--disable_live_progress</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">live_progress=false</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">A command line flag allows users to disable live_progress in the interactive mode.</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">--live_summary</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">N/A</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">Prints a detailed report, similar to the <code class="ph codeph">SUMMARY</code> command, showing progress details for each phase of query execution.
The information is updated interactively as the query progresses.
See <a class="xref" href="impala_live_summary.html#live_summary">LIVE_SUMMARY Query Option (Impala 2.3 or higher only)</a>.</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">--var=<var class="keyword varname">variable_name</var>=<var class="keyword varname">value</var></td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">N/A</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
Defines a substitution variable that can be used within the <span class="keyword cmdname">impala-shell</span> session.
The variable can be substituted into statements processed by the <code class="ph codeph">-q</code> or <code class="ph codeph">-f</code> options,
or in an interactive shell session.
Within a SQL statement, you substitute the value by using the notation <code class="ph codeph">${var:<var class="keyword varname">variable_name</var>}</code>.
This feature is available in <span class="keyword">Impala 2.5</span> and higher.
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">--auth_creds_ok_in_clear</td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">N/A</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">
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.
</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e141 ">--protocol=<var class="keyword varname">protocol</var></td>
<td class="entry nocellnorowborder" style="vertical-align:top;" headers="d201228e144 ">N/A</td>
<td class="entry cell-norowborder" style="vertical-align:top;" headers="d201228e147 ">Protocol to use for the connection to Impala. <div class="p">Valid
<var class="keyword varname">protocol</var> values are:<ul class="ul">
<li class="li"><code class="ph codeph">'hs2'</code>: Impala-shell uses the binary TCP
based transport to speak to the Impala Daemon via the
HiveServer2 protocol. This is the current default setting.</li>
<li class="li"><code class="ph codeph">'hs2-http'</code>: Impala-shell uses HTTP
transport to speak to the Impala Daemon via the
HiveServer2 protocol.</li>
<li class="li"><code class="ph codeph">'beeswax'</code>: Impala-shell uses the binary
TCP based transport to speak to the Impala Daemon via
Beeswax.</li>
</ul>
</div>
<p class="p">You cannot connect to the 3.2 or earlier versions
of Impala using the <code class="ph codeph">'hs2'</code> or
<code class="ph codeph">'hs2-http'</code> option.</p>
<p class="p">Beeswax support is
deprecated and will be removed in the future.</p>
</td>
</tr>
<tr class="row">
<td class="entry row-nocellborder" style="vertical-align:top;" headers="d201228e141 ">--hs2_fp_format=<var class="keyword varname">HS2_FP_FORMAT</var></td>
<td class="entry row-nocellborder" style="vertical-align:top;" headers="d201228e144 ">hs2_fp_format=<var class="keyword varname">HS2_FP_FORMAT</var></td>
<td class="entry cellrowborder" style="vertical-align:top;" headers="d201228e147 ">
Sets the printing format specification for floating point values when using HS2
protocol. The default behaviour makes the values handled by Python's str() built-in
method. Use '16G' to match Beeswax protocol's floating-point output format
This feature is available in <span class="keyword">Impala 4.2</span> and higher.
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="topic concept nested1" aria-labelledby="ariaid-title3" id="shell_config_file">
<h2 class="title topictitle2" id="ariaid-title3">impala-shell Configuration File</h2>
<div class="body conbody">
<p class="p">You can store a set of default settings for
<span class="keyword cmdname">impala-shell</span> in the <code class="ph codeph">impala-shell</code>
configuration file.</p>
<p class="p">The global <code class="ph codeph">impala-shell</code> configuration file is located
in <code class="ph codeph">/etc/impalarc</code>.</p>
<p class="p">The user-level <code class="ph codeph">impala-shell</code> configuration file is
located in <code class="ph codeph">~/.impalarc</code>.</p>
<p class="p">Note that the global-level file name is different from the user-level
file name. The global-level file name does not include a dot
(<span class="ph filepath">.</span>) in the file name.</p>
<p class="p">The default path of the global configuration file can be changed by
setting the <code class="ph codeph">$IMPALA_SHELL_GLOBAL_CONFIG_FILE</code>
environment variable.</p>
<p class="p">To specify a different file name or path for the user-level
configuration file, start <span class="keyword cmdname">impala-shell</span> with the
<code class="ph codeph">--config_file</code>
<span class="keyword cmdname">impala-shell</span> option set to the path of the
configuration file. </p>
<p class="p">Typically, an administrator creates the global configuration file for
the <span class="keyword cmdname">impala-shell</span>, and if the user-level configuration
file exists, the options set in the user configuration file take
precedence over those in the global configuration file.</p>
<p class="p">In turn, any options you specify on the <span class="keyword cmdname">impala-shell</span>
command line override any corresponding options within the configuration
file. </p>
<p class="p"> The <code class="ph codeph">impala-shell</code> configuration file (global or user)
configuration file must contain a header label
<code class="ph codeph">[impala]</code>, followed by the options specific to
<span class="keyword cmdname">impala-shell</span>.</p>
<p class="p">The <code class="ph codeph">impala-shell</code> configuration file consists of
key-value pairs, one option per line. Everything after the
<code class="ph codeph">#</code> character on a line is treated as a comment and
ignored. </p>
<p class="p"> The names of the options in the configuration file are similar
(although not necessarily identical) to the long-form command-line
arguments to the <span class="keyword cmdname">impala-shell</span> command. For the names
to use, see <a class="xref" href="impala_shell_options.html#shell_option_summary">Summary of impala-shell Configuration Options</a>. </p>
<p class="p">You can specify key-value pair options using <code class="ph codeph">keyval</code>,
similar to the <code class="ph codeph">--var</code> command-line option. For example,
<code class="ph codeph">keyval=</code><var class="keyword varname">variable1</var>=<var class="keyword varname">value1</var>.</p>
<p class="p">The query options specified in the <code class="ph codeph">[impala]</code> section
override the options specified in the
<code class="ph codeph">[impala.query_options]</code> section.</p>
<p class="p"> The following example shows a configuration file that you might use
during benchmarking tests. It sets verbose mode, so that the output from
each SQL query is followed by timing information.
<span class="keyword cmdname">impala-shell</span> starts inside the database containing
the tables with the benchmark data, avoiding the need to issue a
<code class="ph codeph">USE</code> statement or use fully qualified table names. </p>
<p class="p"> In this example, the query output is formatted as delimited text
rather than enclosed in ASCII art boxes, and is stored in a file rather
than printed to the screen. Those options are appropriate for benchmark
situations, so that the overhead of <span class="keyword cmdname">impala-shell</span>
formatting and printing the result set does not factor into the timing
measurements. It also enables the <code class="ph codeph">show_profiles</code> option.
That option prints detailed performance information after each query,
which might be valuable in understanding the performance of benchmark
queries. </p>
<pre class="pre codeblock"><code>[impala]
verbose=true
default_db=tpc_benchmarking
write_delimited=true
output_delimiter=,
output_file=/home/tester1/benchmark_results.csv
show_profiles=true
keyval=msg1=hello,keyval=msg2=world</code></pre>
<p class="p"> The following example shows a configuration
file that connects to a specific remote Impala node, runs a single query
within a particular database, then exits. Any query options predefined
under the <code class="ph codeph">[impala.query_options]</code> section in the
configuration file take effect during the session. </p>
<p class="p"> You would typically use this kind of single-purpose configuration
setting with the <span class="keyword cmdname">impala-shell</span> command-line option
<code class="ph codeph">--config_file=<var class="keyword varname">path_to_config_file</var></code>,
to easily select between many predefined queries that could be run
against different databases, hosts, or even different clusters. To run a
sequence of statements instead of a single query, specify the
configuration option
<code class="ph codeph">query_file=<var class="keyword varname">path_to_query_file</var></code>
instead. </p>
<pre class="pre codeblock"><code>[impala]
impalad=impala-test-node1.example.com
default_db=site_stats
# Issue a predefined query and immediately exit.
query=select count(*) from web_traffic where event_date = trunc(now(),'dd')
<span class="ph">[impala.query_options]
mem_limit=32g</span>
</code></pre>
</div>
</div>
</body>
</html>