index.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <h1><a name="ClouderaImpalaQueryUI-IntroducingClouderaImpalaQueryUI"></a>Introducing Cloudera Impala Query UI</h1>
  2. <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 href="https://ccp.cloudera.com/display/IMPALA10BETADOC/Installing+and+Using+Cloudera+Impala">Installing and Using 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>
  3. <h2><a name="ClouderaImpalaQueryUI-Contents"></a>Contents</h2>
  4. <style type='text/css'>/*<![CDATA[*/
  5. div.rbtoc1359395594328 {margin-left: 1.5em;padding: 0px;}
  6. div.rbtoc1359395594328 ul {margin-left: 0px;padding-left: 20px;}
  7. div.rbtoc1359395594328 li {margin-left: 0px;padding-left: 0px;}
  8. /*]]>*/</style><div class='rbtoc1359395594328'>
  9. <ul>
  10. <li><a href='#ClouderaImpalaQueryUI-IntroducingClouderaImpalaQueryUI'>Introducing Cloudera Impala Query UI</a></li>
  11. <li><a href='#ClouderaImpalaQueryUI-ClouderaImpalaQueryUIandInstallationandConfiguration'>Cloudera Impala Query UI and Installation and Configuration</a></li>
  12. <li><a href='#ClouderaImpalaQueryUI-StartingClouderaImpalaQueryUI'>Starting Cloudera Impala Query UI</a></li>
  13. <li><a href='#ClouderaImpalaQueryUI-WorkingwithQueries'>Working with Queries</a></li>
  14. <ul>
  15. <ul>
  16. <li><a href='#ClouderaImpalaQueryUI-CreatingandRunningQueries'>Creating and Running Queries</a></li>
  17. <li><a href='#ClouderaImpalaQueryUI-AdvancedQuerySettings'>Advanced Query Settings</a></li>
  18. <li><a href='#ClouderaImpalaQueryUI-Viewing%2CEditing%2CorDeletingSavedQueries'>Viewing, Editing, or Deleting Saved Queries</a></li>
  19. </ul>
  20. </ul>
  21. </ul></div>
  22. <p><br class="atl-forced-newline" /></p>
  23. <h1><a name="ClouderaImpalaQueryUI-ClouderaImpalaQueryUIandInstallationandConfiguration"></a>Cloudera Impala Query UI and Installation and Configuration</h1>
  24. <p>The Cloudera Impala Query UI application is installed and configured as part of Hue. For information about installing and configuring Hue, see <a href="https://ccp.cloudera.com/display/CDH4DOC/Hue+Installation">Hue Installation</a>.</p>
  25. <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 from the <b>Settings</b> tab.</p>
  26. <h1><a name="ClouderaImpalaQueryUI-StartingClouderaImpalaQueryUI"></a>Starting Cloudera Impala Query UI</h1>
  27. <p>To start the application, click the <b>Cloudera Impala</b> icon (<span class="image-wrap" style=""><img src="/impala/static/help/images/23887903.png" style="border: 0px solid black"/></span>) in the navigation bar at the top of the Hue browser page.</p>
  28. <h1><a name="ClouderaImpalaQueryUI-WorkingwithQueries"></a>Working with Queries</h1>
  29. <p>The Query Editor view lets you create queries in the <a href="https://ccp.cloudera.com/display/IMPALA10BETADOC/Language+Reference">Cloudera Impala Query Language</a>, which is similar to Structured Query Language (SQL). You can name and save your queries to use later. When you submit a query, you can either wait for the query to complete, or return later to find the queries in the <b>History</b> view. You can also request receive an email message after the query is completed.</p>
  30. <h3><a name="ClouderaImpalaQueryUI-CreatingandRunningQueries"></a>Creating and Running Queries</h3>
  31. <div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/static/art/help/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Note</b><br />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.</td></tr></table></div>
  32. <p><b>To create and run a query</b>:</p>
  33. <ol>
  34. <li>In the Query Editor window, type the query. For example, to select all data from the <em>sample_08</em> table, you would type:
  35. <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
  36. <div id="root">
  37. <pre class="theme: Default; brush: plain; gutter: false">SELECT * FROM sample_08</pre>
  38. </div>
  39. </div></div></li>
  40. <li>In the box to the left of the Query field you can enable users to enter parameters at run-time and request email notification when the job is complete. See <a href="#ClouderaImpalaQueryUI-AdvancedSettings">Advanced Query Settings</a> for details on using these settings.</li>
  41. <li>To save your query and advanced settings to use again later, click <b>Save As,</b> enter a name and description, and then click <b>OK</b>. To save changes to an existing query, click <b>Save.</b></li>
  42. <li>To run the query, click <b>Execute</b>.
  43. <br class="atl-forced-newline" />
  44. <a name="ClouderaImpalaQueryUI-QueryResults"></a><br/>
  45. The Query Results window appears with the results of your query.
  46. <ul>
  47. <li>To view a log of the query execution, click <b>Log</b> at the top of the results display. You can use the information in this tab to debug your query.</li>
  48. <li>To view the query that generated these results, click <b>Query</b> at the top of the results display.</li>
  49. <li>To view the columns of the query, click <b>Columns</b>.</li>
  50. <li>To return to the query in the Query Editor, click <b>Unsaved Query</b>.</li>
  51. </ul>
  52. </li>
  53. </ol>
  54. <p><a name="ClouderaImpalaQueryUI-AdvancedSettings"></a></p>
  55. <h3><a name="ClouderaImpalaQueryUI-AdvancedQuerySettings"></a>Advanced Query Settings</h3>
  56. <p>The pane to the left of the Query Editor lets you specify the following options:
  57. <br class="atl-forced-newline" />
  58. <br class="atl-forced-newline" /></p>
  59. <style type="text/css">
  60. td.confluenceTd {
  61. border: #dddddd solid 1px;
  62. height: 36px;
  63. padding: 5px 10px;
  64. vertical-align: top;
  65. }
  66. th.confluenceTh {
  67. border: #dddddd solid 1px;
  68. height: 40px;
  69. padding: 5px 10px;
  70. vertical-align: center;
  71. }
  72. </style>
  73. <div class='table-wrap'>
  74. <table class='confluenceTable'><tbody>
  75. <tr>
  76. <th class='confluenceTh'> Option </th>
  77. <th class='confluenceTh'> Description </th>
  78. </tr>
  79. <tr>
  80. <td class='confluenceTd'> <b>SETTINGS</b> </td>
  81. <td class='confluenceTd'> Override the Cloudera Impala default settings. Click <b>Add</b> to configure a new setting. <br class="atl-forced-newline" />
  82. »&nbsp;&nbsp; For <b>Key</b>, enter an Impala configuration variable name. <br class="atl-forced-newline" />
  83. »&nbsp;&nbsp; For <b>Value</b>, enter the value you want to use for the variable. <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
  84. To view the default settings, click the <b>Settings</b> tab at the top of the page. </td>
  85. </tr>
  86. <tr>
  87. <td class='confluenceTd'> <b>PARAMETERIZATION</b> </td>
  88. <td class='confluenceTd'> Indicate that a dialog box should display to enter parameter values when a query containing the string $&lt;parametername&gt; is executed. Enabled by default.</td>
  89. </tr>
  90. </tbody></table>
  91. </div>
  92. <h3><a name="ClouderaImpalaQueryUI-Viewing%2CEditing%2CorDeletingSavedQueries"></a>Viewing, Editing, or Deleting Saved Queries</h3>
  93. <p>You can view a list of saved queries of all users by clicking <b>Saved Queries</b>. You can copy any user's query, but you can only edit, delete, and view the history of your own queries.</p>
  94. <p><b>To edit a saved query:</b></p>
  95. <ol>
  96. <li>In the Cloudera Impala window, click <b>Saved Queries</b>.
  97. <br class="atl-forced-newline" />
  98. <br class="atl-forced-newline" />
  99. The Queries window displays.
  100. <br class="atl-forced-newline" />
  101. <br class="atl-forced-newline" /></li>
  102. <li>Click the <b>Options</b> button next to the query and choose <b>Edit</b> from the context menu.
  103. <br class="atl-forced-newline" />
  104. <br class="atl-forced-newline" />
  105. The Query Editor window displays.
  106. <br class="atl-forced-newline" />
  107. <br class="atl-forced-newline" /></li>
  108. <li>Change the query and then click <b>Save.</b> You can also click <b>Save As</b>, enter a new name, and click <b>OK</b> to save a copy of the query.
  109. <br class="atl-forced-newline" />
  110. <br class="atl-forced-newline" /></li>
  111. </ol>
  112. <p><b>To delete a saved query:</b></p>
  113. <ol>
  114. <li>Click <b>Saved Queries</b>.
  115. <br class="atl-forced-newline" />
  116. <br class="atl-forced-newline" />
  117. The Queries window displays.
  118. <br class="atl-forced-newline" />
  119. <br class="atl-forced-newline" /></li>
  120. <li>Click the <b>Options</b> button next to the query and choose <b>Delete</b> from the context menu.
  121. <br class="atl-forced-newline" />
  122. <br class="atl-forced-newline" /></li>
  123. <li>Click <b>Yes</b> to confirm the deletion.
  124. <br class="atl-forced-newline" />
  125. <br class="atl-forced-newline" /></li>
  126. </ol>
  127. <p><b>To copy a saved query:</b></p>
  128. <ol>
  129. <li>Click <b>Saved Queries</b>.
  130. <br class="atl-forced-newline" />
  131. <br class="atl-forced-newline" />
  132. The Queries window displays.
  133. <br class="atl-forced-newline" />
  134. <br class="atl-forced-newline" /></li>
  135. <li>Click the <b>Options</b> button next to the query and choose <b>Clone</b> from the context menu.
  136. <br class="atl-forced-newline" />
  137. <br class="atl-forced-newline" />
  138. The Query Editor window displays.
  139. <br class="atl-forced-newline" />
  140. <br class="atl-forced-newline" /></li>
  141. <li>Change the query as necessary and then click <b>Save.</b> You can also click <b>Save As</b>, enter a new name, and click <b>Ok</b> to save a copy of the query.
  142. <br class="atl-forced-newline" />
  143. <br class="atl-forced-newline" /></li>
  144. </ol>
  145. <p><b>To copy a query in the Query History window:</b></p>
  146. <ol>
  147. <li>Click <b>History</b>.
  148. <br class="atl-forced-newline" />
  149. <br class="atl-forced-newline" />
  150. The Query History window displays.
  151. <br class="atl-forced-newline" />
  152. <br class="atl-forced-newline" /></li>
  153. <li>To display the queries for all users, click <b>Show everyone's queries</b>.
  154. <br class="atl-forced-newline" />
  155. <br class="atl-forced-newline" />
  156. The queries for all users displays in the Query History window.
  157. <br class="atl-forced-newline" />
  158. <br class="atl-forced-newline" /></li>
  159. <li>Click the <b>Clone</b> link next to the query you want to copy.
  160. <br class="atl-forced-newline" />
  161. <br class="atl-forced-newline" />
  162. A copy of the query displays in the Query Editor window.
  163. <br class="atl-forced-newline" />
  164. <br class="atl-forced-newline" /></li>
  165. <li>Change the query, if necessary, and then click <b>Save As</b>, enter a new name, and click <b>OK</b> to save the query.</li>
  166. </ol>
  167. <br/>
  168. </td>
  169. </tr>
  170. </table>
  171. </body>
  172. </html>