| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535 |
- <?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 lang="en-us" xml:lang="en-us">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <link rel="stylesheet" type="text/css" href="commonltr.css"/>
- <title>Cloudera Impala Query UI</title>
- </head>
- <body id="topic_5"><a name="topic_5"><!-- --></a>
- <h1 class="title topictitle1">Cloudera Impala Query UI </h1>
- <div class="body conbody">
- <p class="p"> The Cloudera Impala Query UI application enables you to perform queries
- on Apache Hadoop data stored in HDFS or HBase using Cloudera Impala. For information about
- Cloudera Impala, see <a class="xref" href="../../../../content/support/en/documentation/cloudera-impala/cloudera-impala-documentation-v1-latest.html" target="_blank">Installing and
- Using Cloudera Impala</a>. You can create, run, and manage queries, and download the
- results in a Microsoft Office Excel worksheet file or a comma-separated values file. </p>
- </div>
- <div class="topic concept nested1" xml:lang="en-US" lang="en-US" id="topic_5_1"><a name="topic_5_1"><!-- --></a>
- <h2 class="title topictitle2">Cloudera Impala Query UI and Installation and Configuration
- </h2>
- <div class="body conbody">
- <p class="p"> The Cloudera Impala Query UI application is one of the applications
- installed as part of Hue. <span class="ph">For information about installing and configuring Hue,
- see Hue Installation in <a class="xref" href="http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/latest/CDH4-Installation-Guide/CDH4-Installation-Guide.html" target="_blank">http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/latest/CDH4-Installation-Guide/CDH4-Installation-Guide.html</a>.</span></p>
- <p class="p"> The Cloudera Impala Query UI assumes an existing Cloudera Impala
- installation. The Hue installation instructions include the configuration necessary for
- Impala. You can view the current configuration from the <strong class="ph b">Settings</strong> tab. </p>
- </div>
- </div>
- <div class="topic concept nested1" xml:lang="en-US" lang="en-US" id="topic_5_2"><a name="topic_5_2"><!-- --></a>
- <h2 class="title topictitle2">Starting Cloudera Impala Query UI
- </h2>
- <div class="body conbody">
- <p class="p">Click the <strong class="ph b">Cloudera Impala Query UI</strong>
- icon (<img class="image" src="/impala/static/art/icon_impala_24.png"/>) in the navigation bar at the top of the Hue browser page. </p>
- </div>
- </div>
- <div class="topic concept nested1" id="concept_kv5_j13_dk"><a name="concept_kv5_j13_dk"><!-- --></a>
- <h2 class="title topictitle2">Managing Databases, Tables, and Partitions</h2>
- <div class="body conbody">
- <p class="p">You can create databases, tables, partitions, and load data by executing
- <a class="xref" href="http://archive.cloudera.com/cdh4/cdh/4/hive/language_manual/data-manipulation-statements.html" target="_blank">Hive data manipulation
- statements</a> in the Beeswax application.</p>
- <p class="p">You can also use the <a class="xref" href="metastoremanager.html#xd_583c10bfdbd326ba-3ca24a24-13d80143249--7f9b">Metastore Manager</a> application to manage the
- databases, tables, and partitions and load data.</p>
- <p class="p"> When you change the metastore using one of these applications, you must click the
- <span class="ph uicontrol">Refresh</span> button under METASTORE CATALOG in the pane to the left of
- the Query Editor to make the metastore update visible to the Cloudera Impala server. </p>
- </div>
- </div>
- <div class="topic concept nested1" xml:lang="en-US" lang="en-US" id="topic_4_2_1"><a name="topic_4_2_1"><!-- --></a>
- <h2 class="title topictitle2">Installing Example Queries and
- Tables</h2>
- <div class="body conbody">
- <div class="note note"><span class="notetitle"><img src="/static/art/help/note.jpg"/>
- <b>Note</b>:</span> You must be a superuser to perform this task.</div>
- <a name="topic_4_2_1__ol_kss_btp_wj"><!-- --></a><ol class="ol" id="topic_4_2_1__ol_kss_btp_wj">
- <li class="li">Click <a name="topic_4_2_1__d104e102"><!-- --></a><img class="image" id="topic_4_2_1__d104e102" src="/static/art/hue-logo-mini.png"/>. The Quick Start Wizard opens.</li>
- <li class="li">Click <strong class="ph b">Step 2:
- Examples</strong>.</li>
- <li class="li">Click <strong class="ph b">Cloudera Impala Query
- UI</strong>.</li>
- </ol>
- </div>
- </div>
- <div class="topic concept nested1" xml:lang="en-US" lang="en-US" id="topic_5_3"><a name="topic_5_3"><!-- --></a>
- <h2 class="title topictitle2">Queries </h2>
- <div class="body conbody">
- <p class="p"> The Query Editor view lets you create queries in the Cloudera Impala
- Query Language, which is based on the Hive Standard Query Language (HiveQL) and described in
- the Cloudera Impala Language Reference topic in <a class="xref" href="http://www.cloudera.com/content/cloudera-content/cloudera-docs/Impala/latest/Installing-and-Using-Impala/Installing-and-Using-Impala.html" target="_blank">Installing and
- Using Cloudera Impala</a>. </p>
- <p class="p">You can name and save your queries to use later. </p>
- <p class="p">When you submit a query, you can either wait for the query to complete,
- or return later to find the queries in the <strong class="ph b">History</strong> view. </p>
- <p class="p">In the box to the left of the Query field, you can select a database,
- override the default Cloudera Impala settings, enable users to enter parameters at run-time.
- See <a class="xref" href="#topic_5_3_2">Advanced Query Settings</a> for details on using these settings. </p>
- </div>
- <div class="topic concept nested2" xml:lang="en-US" lang="en-US" id="topic_5_3_1"><a name="topic_5_3_1"><!-- --></a>
- <h3 class="title topictitle3">Creating Queries </h3>
- <div class="body conbody">
- <ol class="ol">
- <li class="li">In the Query Editor window, type a query or
- multiple queries separated by a semicolon ";". To be presented with a drop-down of
- autocomplete options, type <span class="ph uicontrol">CTRL+spacebar</span> when entering a query. </li>
- <li class="li">To save your query and advanced settings to use
- again later, click <strong class="ph b">Save As</strong>, enter a name and
- description, and then click <strong class="ph b">OK</strong>. To save changes to an
- existing query, click <strong class="ph b">Save.</strong>
- </li>
- </ol>
- </div>
- </div>
- <div class="topic concept nested2" id="id_esc_5sb_zj"><a name="id_esc_5sb_zj"><!-- --></a>
- <h3 class="title topictitle3">Loading Queries into the Query Editor</h3>
- <div class="body conbody">
- <a name="id_esc_5sb_zj__d104e186"><!-- --></a><ol class="ol" id="id_esc_5sb_zj__d104e186">
- <li class="li">Do one of the following:<a name="id_esc_5sb_zj__d104e190"><!-- --></a><ul class="ul" id="id_esc_5sb_zj__d104e190">
- <li class="li">Click the <span class="ph uicontrol">My Queries</span> tab.<a name="id_esc_5sb_zj__d104e197"><!-- --></a><ol class="ol" type="a" id="id_esc_5sb_zj__d104e197">
- <li class="li">Click the <span class="ph uicontrol">Recent Saved Queries</span> or <span class="ph uicontrol">Recent Run
- Queries</span> tab to display the respective queries. </li>
- </ol>
- </li>
- <li class="li">Click the <span class="ph uicontrol">Saved Queries</span> tab.</li>
- </ul>
- </li>
- <li class="li">Click a query name. The query is loaded into the Query Editor.</li>
- </ol>
- </div>
- </div>
- <div class="topic concept nested2" id="concept_pcv_fpb_zj"><a name="concept_pcv_fpb_zj"><!-- --></a>
- <h3 class="title topictitle3">Running Queries</h3>
- <div class="body conbody">
- <div class="note note"><span class="notetitle"><img src="/static/art/help/note.jpg"/>
- <b>Note</b>:</span> To run a query, you must be logged in to
- Hue as a user that also has a Unix user account on the remote server. </div>
- <a name="concept_pcv_fpb_zj__ol_ofq_xpb_zj"><!-- --></a><ol class="ol" id="concept_pcv_fpb_zj__ol_ofq_xpb_zj">
- <li class="li">To execute a portion of the query, highlight one or more query
- statements.</li>
- <li class="li">Click <strong class="ph b">Execute</strong>. The Query Results
- window appears with the results of your query. <a name="concept_pcv_fpb_zj__d104e242"><!-- --></a><ul class="ul" id="concept_pcv_fpb_zj__d104e242">
- <li class="li">To view a log of the query execution, click <strong class="ph b">Log</strong> at the top of the results display. You can use
- the information in this tab to debug your query.</li>
- <li class="li">To view the query that generated these results, click <strong class="ph b">Query</strong> at the top of the results display.</li>
- <li class="li">To view the columns of the query, click <strong class="ph b">Columns</strong>.</li>
- <li class="li">To return to the query in the Query Editor, click <strong class="ph b">Unsaved Query</strong>.</li>
- </ul>
- </li>
- <li class="li">If there are multiple statements in the query, click <span class="ph uicontrol">Next</span> in
- the Multi-statement query pane to execute the remaining statements.</li>
- </ol>
- </div>
- </div>
- <div class="topic concept nested2" xml:lang="en-US" lang="en-US" id="topic_5_3_2"><a name="topic_5_3_2"><!-- --></a>
- <h3 class="title topictitle3">Advanced Query Settings
- </h3>
- <div class="body conbody">
- <p class="p">
- The pane to the left of the Query Editor lets you specify the following options:
- </p>
-
- <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="hsides" border="1" rules="all">
-
-
- <thead class="thead" align="left">
- <tr class="row">
- <th class="entry" valign="top" width="25%" id="d7221e304">
- <p class="p">
- <strong class="ph b">Option</strong>
- </p>
- </th>
- <th class="entry" valign="top" width="75%" id="d7221e313">
- <p class="p">
- <strong class="ph b">Description</strong>
- </p>
- </th>
- </tr>
- </thead>
- <tbody class="tbody">
- <tr class="row">
- <td class="entry" valign="top" width="25%" headers="d7221e304 ">
- <p class="p"><strong class="ph b">DATABASE</strong>
- </p>
- </td>
- <td class="entry" valign="top" width="75%" headers="d7221e313 ">
- <p class="p">The database containing the table definitions. </p>
- </td>
- </tr>
- <tr class="row">
- <td class="entry" valign="top" width="25%" headers="d7221e304 ">
- <p class="p"><strong class="ph b">SETTINGS</strong>
- </p>
- </td>
- <td class="entry" valign="top" width="75%" headers="d7221e313 ">
- <div class="p">Override Cloudera Impala default settings. To configure a
- new setting: <a name="topic_5_3_2__ol_k5v_hcc_zj"><!-- --></a><ol class="ol" id="topic_5_3_2__ol_k5v_hcc_zj">
- <li class="li">Click <strong class="ph b">Add</strong>.</li>
- <li class="li">For <strong class="ph b">Key</strong>, enter a Cloudera Impala
- configuration variable name. </li>
- <li class="li">For <strong class="ph b">Value</strong>, enter the value you want to
- use for the variable. </li>
- </ol>
- </div>
- <p class="p">To view the default settings, click the <strong class="ph b">Settings</strong> tab at the top of the page. </p>
- </td>
- </tr>
- <tr class="row">
- <td class="entry" valign="top" width="25%" headers="d7221e304 ">
- <p class="p"><strong class="ph b">PARAMETERIZATION</strong>
- </p>
- </td>
- <td class="entry" valign="top" width="75%" headers="d7221e313 ">
- <p class="p">Indicate that a dialog box should display to enter parameter
- values when a query containing the string $<var class="keyword varname">parametername</var> is
- executed. Enabled by default. </p>
- </td>
- </tr>
- <tr class="row">
- <td class="entry" valign="top" width="25%" headers="d7221e304 ">
- <p class="p"><strong class="ph b">METASTORE CATALOG</strong>
- </p>
- </td>
- <td class="entry" valign="top" width="75%" headers="d7221e313 ">
- <p class="p">Refresh metadata. It is best to refresh metadata after making changes to
- databases such as adding or dropping a table. </p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <div class="topic concept nested2" xml:lang="en-US" lang="en-US" id="id_bqm_lxh_dk"><a name="id_bqm_lxh_dk"><!-- --></a>
- <h3 class="title topictitle3">Viewing Query History </h3>
- <div class="body conbody">
- <p class="p">You can view the history of queries that you have run previously.
- Results for these queries are available for one week or until Hue is restarted. </p>
- <ol class="ol">
- <li class="li">Click <strong class="ph b">History</strong>. A list of your
- saved and unsaved queries displays in the Query History window.</li>
- <li class="li">To display the queries for all users, click <strong class="ph b">Show everyone's queries</strong>.
- To display your queries only, click <strong class="ph b">Show my queries</strong>.</li>
- <li class="li">To display the automatically generated actions performed on a
- user's behalf, click <strong class="ph b">Show auto actions</strong>. To display
- user queries again, click <strong class="ph b">Show user queries</strong>.</li>
- </ol>
- </div>
- </div>
- <div class="topic concept nested2" xml:lang="en-US" lang="en-US" id="id_qcp_cxk_xj"><a name="id_qcp_cxk_xj"><!-- --></a>
- <h3 class="title topictitle3">Viewing, Editing, Copying, and Deleting
- Saved Queries </h3>
- <div class="body conbody">
- <p class="p">You can view a list of saved queries of all users by clicking <strong class="ph b">My
- Queries</strong> and then selecting either <span class="ph uicontrol">Recent Saved Queries</span> or
- <span class="ph uicontrol">Recent Run Queries</span> tab to display the respective queries or
- clicking <strong class="ph b">Saved Queries</strong>. You can copy any query, but you
- can edit, delete, and view the history of only your own queries. </p>
-
- <div class="tablenoborder"><a name="id_qcp_cxk_xj__d104e691"><!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="id_qcp_cxk_xj__d104e691" class="table" frame="hsides" border="1" rules="all">
-
-
- <thead class="thead" align="left">
- <tr class="row">
- <th class="entry" valign="top" width="25%" id="d7221e501">Saved Query</th>
- <th class="entry" valign="top" width="75%" id="d7221e504">Procedure</th>
- </tr>
- </thead>
- <tbody class="tbody">
- <tr class="row">
- <td class="entry" valign="top" width="25%" headers="d7221e501 ">
- <p class="p">
- <strong class="ph b">Edit</strong>
- </p>
- </td>
- <td class="entry" valign="top" width="75%" headers="d7221e504 ">
- <div class="p">
- <a name="id_qcp_cxk_xj__d104e728"><!-- --></a><ol class="ol" id="id_qcp_cxk_xj__d104e728">
- <li class="li">Click <strong class="ph b">Saved Queries</strong>.
- The Queries window displays.</li>
- <li class="li">Check the checkbox next to the query and click <strong class="ph b">Edit</strong>. The query displays in the Query
- Editor window.</li>
- <li class="li">Change the query and then click <strong class="ph b">Save.</strong> You can also click <strong class="ph b">Save As</strong>, enter a new name, and click <strong class="ph b">OK</strong> to save a copy of the query.</li>
- </ol>
- </div>
- </td>
- </tr>
- <tr class="row">
- <td class="entry" valign="top" width="25%" headers="d7221e501 ">
- <p class="p">
- <strong class="ph b">Copy</strong>
- </p>
- </td>
- <td class="entry" valign="top" width="75%" headers="d7221e504 ">
- <div class="p">
- <a name="id_qcp_cxk_xj__d104e773"><!-- --></a><ol class="ol" id="id_qcp_cxk_xj__d104e773">
- <li class="li">Click <strong class="ph b">Saved Queries</strong>.
- The Queries window displays.</li>
- <li class="li">Check the checkbox next to the query and click <strong class="ph b">Copy</strong>. The query displays in the Query
- Editor window.</li>
- <li class="li">Change the query as necessary and then click <strong class="ph b">Save.</strong> You can also click <strong class="ph b">Save As</strong>, enter a new name, and click <strong class="ph b">OK</strong> to save a copy of the query.</li>
- </ol>
- </div>
- </td>
- </tr>
- <tr class="row">
- <td class="entry" valign="top" width="25%" headers="d7221e501 ">
- <p class="p">
- <strong class="ph b">Copy in Query History</strong>
- </p>
- </td>
- <td class="entry" valign="top" width="75%" headers="d7221e504 ">
- <div class="p">
- <a name="id_qcp_cxk_xj__d104e818"><!-- --></a><ol class="ol" id="id_qcp_cxk_xj__d104e818">
- <li class="li">Click <strong class="ph b">History</strong>. The
- Query History window displays.</li>
- <li class="li">To display the queries for all users, click <strong class="ph b">Show everyone's queries</strong>. The queries for
- all users display in the History window.</li>
- <li class="li">Click the query you want to copy. A copy of the query
- displays in the Query Editor window.</li>
- <li class="li">Change the query, if necessary, and then click <strong class="ph b">Save As</strong>, enter a new name, and click <strong class="ph b">OK</strong> to save the query.</li>
- </ol>
- </div>
- </td>
- </tr>
- <tr class="row">
- <td class="entry" valign="top" width="25%" headers="d7221e501 ">
- <p class="p">
- <strong class="ph b">Delete</strong>
- </p>
- </td>
- <td class="entry" valign="top" width="75%" headers="d7221e504 ">
- <a name="id_qcp_cxk_xj__d104e861"><!-- --></a><ol class="ol" id="id_qcp_cxk_xj__d104e861">
- <li class="li">Click <strong class="ph b">Saved Queries</strong>.
- The Queries window displays.</li>
- <li class="li">Check the checkbox next to the query and click <strong class="ph b">Delete</strong>.</li>
- <li class="li">Click <strong class="ph b">Yes</strong> to confirm
- the deletion.</li>
- </ol>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
|