index.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE html
  3. PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html lang="en-us" xml:lang="en-us">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  7. <link rel="stylesheet" type="text/css" href="commonltr.css"/>
  8. <title>Cloudera Impala Query UI</title>
  9. </head>
  10. <body id="topic_5"><a name="topic_5"><!-- --></a>
  11. <h1 class="title topictitle1">Cloudera Impala Query UI </h1>
  12. <div class="body conbody">
  13. <p class="p"> The Cloudera Impala Query UI application enables you to perform queries
  14. on Apache Hadoop data stored in HDFS or HBase using Cloudera Impala. For information about
  15. Cloudera Impala, see <a class="xref" href="../../../../content/support/en/documentation/cloudera-impala/cloudera-impala-documentation-v1-latest.html" target="_blank">Installing and
  16. Using Cloudera Impala</a>. You can create, run, and manage queries, and download the
  17. results in a Microsoft Office Excel worksheet file or a comma-separated values file. </p>
  18. </div>
  19. <div class="topic concept nested1" xml:lang="en-US" lang="en-US" id="topic_5_1"><a name="topic_5_1"><!-- --></a>
  20. <h2 class="title topictitle2">Cloudera Impala Query UI and Installation and Configuration
  21. </h2>
  22. <div class="body conbody">
  23. <p class="p"> The Cloudera Impala Query UI application is one of the applications
  24. installed as part of Hue. <span class="ph">For information about installing and configuring Hue,
  25. 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>
  26. <p class="p"> The Cloudera Impala Query UI assumes an existing Cloudera Impala
  27. installation. The Hue installation instructions include the configuration necessary for
  28. Impala. You can view the current configuration from the <strong class="ph b">Settings</strong> tab. </p>
  29. </div>
  30. </div>
  31. <div class="topic concept nested1" xml:lang="en-US" lang="en-US" id="topic_5_2"><a name="topic_5_2"><!-- --></a>
  32. <h2 class="title topictitle2">Starting Cloudera Impala Query UI
  33. </h2>
  34. <div class="body conbody">
  35. <p class="p">Click the <strong class="ph b">Cloudera Impala Query UI</strong>
  36. 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>
  37. </div>
  38. </div>
  39. <div class="topic concept nested1" id="concept_kv5_j13_dk"><a name="concept_kv5_j13_dk"><!-- --></a>
  40. <h2 class="title topictitle2">Managing Databases, Tables, and Partitions</h2>
  41. <div class="body conbody">
  42. <p class="p">You can create databases, tables, partitions, and load data by executing
  43. <a class="xref" href="http://archive.cloudera.com/cdh4/cdh/4/hive/language_manual/data-manipulation-statements.html" target="_blank">Hive data manipulation
  44. statements</a> in the Beeswax application.</p>
  45. <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
  46. databases, tables, and partitions and load data.</p>
  47. <p class="p"> When you change the metastore using one of these applications, you must click the
  48. <span class="ph uicontrol">Refresh</span> button under METASTORE CATALOG in the pane to the left of
  49. the Query Editor to make the metastore update visible to the Cloudera Impala server. </p>
  50. </div>
  51. </div>
  52. <div class="topic concept nested1" xml:lang="en-US" lang="en-US" id="topic_4_2_1"><a name="topic_4_2_1"><!-- --></a>
  53. <h2 class="title topictitle2">Installing Example Queries and
  54. Tables</h2>
  55. <div class="body conbody">
  56. <div class="note note"><span class="notetitle"><img src="/static/art/help/note.jpg"/> 
  57. <b>Note</b>:</span> You must be a superuser to perform this task.</div>
  58. <a name="topic_4_2_1__ol_kss_btp_wj"><!-- --></a><ol class="ol" id="topic_4_2_1__ol_kss_btp_wj">
  59. <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>
  60. <li class="li">Click <strong class="ph b">Step 2:
  61. Examples</strong>.</li>
  62. <li class="li">Click <strong class="ph b">Cloudera Impala Query
  63. UI</strong>.</li>
  64. </ol>
  65. </div>
  66. </div>
  67. <div class="topic concept nested1" xml:lang="en-US" lang="en-US" id="topic_5_3"><a name="topic_5_3"><!-- --></a>
  68. <h2 class="title topictitle2">Queries </h2>
  69. <div class="body conbody">
  70. <p class="p"> The Query Editor view lets you create queries in the Cloudera Impala
  71. Query Language, which is based on the Hive Standard Query Language (HiveQL) and described in
  72. 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
  73. Using Cloudera Impala</a>. </p>
  74. <p class="p">You can name and save your queries to use later. </p>
  75. <p class="p">When you submit a query, you can either wait for the query to complete,
  76. or return later to find the queries in the <strong class="ph b">History</strong> view. </p>
  77. <p class="p">In the box to the left of the Query field, you can select a database,
  78. override the default Cloudera Impala settings, enable users to enter parameters at run-time.
  79. See <a class="xref" href="#topic_5_3_2">Advanced Query Settings</a> for details on using these settings. </p>
  80. </div>
  81. <div class="topic concept nested2" xml:lang="en-US" lang="en-US" id="topic_5_3_1"><a name="topic_5_3_1"><!-- --></a>
  82. <h3 class="title topictitle3">Creating Queries </h3>
  83. <div class="body conbody">
  84. <ol class="ol">
  85. <li class="li">In the Query Editor window, type a query or
  86. multiple queries separated by a semicolon ";". To be presented with a drop-down of
  87. autocomplete options, type <span class="ph uicontrol">CTRL+spacebar</span> when entering a query. </li>
  88. <li class="li">To save your query and advanced settings to use
  89. again later, click <strong class="ph b">Save As</strong>, enter a name and
  90. description, and then click <strong class="ph b">OK</strong>. To save changes to an
  91. existing query, click <strong class="ph b">Save.</strong>
  92. </li>
  93. </ol>
  94. </div>
  95. </div>
  96. <div class="topic concept nested2" id="id_esc_5sb_zj"><a name="id_esc_5sb_zj"><!-- --></a>
  97. <h3 class="title topictitle3">Loading Queries into the Query Editor</h3>
  98. <div class="body conbody">
  99. <a name="id_esc_5sb_zj__d104e186"><!-- --></a><ol class="ol" id="id_esc_5sb_zj__d104e186">
  100. <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">
  101. <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">
  102. <li class="li">Click the <span class="ph uicontrol">Recent Saved Queries</span> or <span class="ph uicontrol">Recent Run
  103. Queries</span> tab to display the respective queries. </li>
  104. </ol>
  105. </li>
  106. <li class="li">Click the <span class="ph uicontrol">Saved Queries</span> tab.</li>
  107. </ul>
  108. </li>
  109. <li class="li">Click a query name. The query is loaded into the Query Editor.</li>
  110. </ol>
  111. </div>
  112. </div>
  113. <div class="topic concept nested2" id="concept_pcv_fpb_zj"><a name="concept_pcv_fpb_zj"><!-- --></a>
  114. <h3 class="title topictitle3">Running Queries</h3>
  115. <div class="body conbody">
  116. <div class="note note"><span class="notetitle"><img src="/static/art/help/note.jpg"/> 
  117. <b>Note</b>:</span> To run a query, you must be logged in to
  118. Hue as a user that also has a Unix user account on the remote server. </div>
  119. <a name="concept_pcv_fpb_zj__ol_ofq_xpb_zj"><!-- --></a><ol class="ol" id="concept_pcv_fpb_zj__ol_ofq_xpb_zj">
  120. <li class="li">To execute a portion of the query, highlight one or more query
  121. statements.</li>
  122. <li class="li">Click <strong class="ph b">Execute</strong>. The Query Results
  123. 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">
  124. <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
  125. the information in this tab to debug your query.</li>
  126. <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>
  127. <li class="li">To view the columns of the query, click <strong class="ph b">Columns</strong>.</li>
  128. <li class="li">To return to the query in the Query Editor, click <strong class="ph b">Unsaved Query</strong>.</li>
  129. </ul>
  130. </li>
  131. <li class="li">If there are multiple statements in the query, click <span class="ph uicontrol">Next</span> in
  132. the Multi-statement query pane to execute the remaining statements.</li>
  133. </ol>
  134. </div>
  135. </div>
  136. <div class="topic concept nested2" xml:lang="en-US" lang="en-US" id="topic_5_3_2"><a name="topic_5_3_2"><!-- --></a>
  137. <h3 class="title topictitle3">Advanced Query Settings
  138. </h3>
  139. <div class="body conbody">
  140. <p class="p">
  141. The pane to the left of the Query Editor lets you specify the following options:
  142. </p>
  143. <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="table" frame="hsides" border="1" rules="all">
  144. <thead class="thead" align="left">
  145. <tr class="row">
  146. <th class="entry" valign="top" width="25%" id="d7221e304">
  147. <p class="p">
  148. <strong class="ph b">Option</strong>
  149. </p>
  150. </th>
  151. <th class="entry" valign="top" width="75%" id="d7221e313">
  152. <p class="p">
  153. <strong class="ph b">Description</strong>
  154. </p>
  155. </th>
  156. </tr>
  157. </thead>
  158. <tbody class="tbody">
  159. <tr class="row">
  160. <td class="entry" valign="top" width="25%" headers="d7221e304 ">
  161. <p class="p"><strong class="ph b">DATABASE</strong>
  162. </p>
  163. </td>
  164. <td class="entry" valign="top" width="75%" headers="d7221e313 ">
  165. <p class="p">The database containing the table definitions. </p>
  166. </td>
  167. </tr>
  168. <tr class="row">
  169. <td class="entry" valign="top" width="25%" headers="d7221e304 ">
  170. <p class="p"><strong class="ph b">SETTINGS</strong>
  171. </p>
  172. </td>
  173. <td class="entry" valign="top" width="75%" headers="d7221e313 ">
  174. <div class="p">Override Cloudera Impala default settings. To configure a
  175. 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">
  176. <li class="li">Click <strong class="ph b">Add</strong>.</li>
  177. <li class="li">For <strong class="ph b">Key</strong>, enter a Cloudera Impala
  178. configuration variable name. </li>
  179. <li class="li">For <strong class="ph b">Value</strong>, enter the value you want to
  180. use for the variable. </li>
  181. </ol>
  182. </div>
  183. <p class="p">To view the default settings, click the <strong class="ph b">Settings</strong> tab at the top of the page. </p>
  184. </td>
  185. </tr>
  186. <tr class="row">
  187. <td class="entry" valign="top" width="25%" headers="d7221e304 ">
  188. <p class="p"><strong class="ph b">PARAMETERIZATION</strong>
  189. </p>
  190. </td>
  191. <td class="entry" valign="top" width="75%" headers="d7221e313 ">
  192. <p class="p">Indicate that a dialog box should display to enter parameter
  193. values when a query containing the string $<var class="keyword varname">parametername</var> is
  194. executed. Enabled by default. </p>
  195. </td>
  196. </tr>
  197. <tr class="row">
  198. <td class="entry" valign="top" width="25%" headers="d7221e304 ">
  199. <p class="p"><strong class="ph b">METASTORE CATALOG</strong>
  200. </p>
  201. </td>
  202. <td class="entry" valign="top" width="75%" headers="d7221e313 ">
  203. <p class="p">Refresh metadata. It is best to  refresh  metadata after making changes to
  204. databases such as adding or dropping a table. </p>
  205. </td>
  206. </tr>
  207. </tbody>
  208. </table>
  209. </div>
  210. </div>
  211. </div>
  212. <div class="topic concept nested2" xml:lang="en-US" lang="en-US" id="id_bqm_lxh_dk"><a name="id_bqm_lxh_dk"><!-- --></a>
  213. <h3 class="title topictitle3">Viewing Query History </h3>
  214. <div class="body conbody">
  215. <p class="p">You can view the history of queries that you have run previously.
  216. Results for these queries are available for one week or until Hue is restarted. </p>
  217. <ol class="ol">
  218. <li class="li">Click <strong class="ph b">History</strong>. A list of your
  219. saved and unsaved queries displays in the Query History window.</li>
  220. <li class="li">To display the queries for all users, click <strong class="ph b">Show everyone's queries</strong>.
  221. To display your queries only, click <strong class="ph b">Show my queries</strong>.</li>
  222. <li class="li">To display the automatically generated actions performed on a
  223. user's behalf, click <strong class="ph b">Show auto actions</strong>. To display
  224. user queries again, click <strong class="ph b">Show user queries</strong>.</li>
  225. </ol>
  226. </div>
  227. </div>
  228. <div class="topic concept nested2" xml:lang="en-US" lang="en-US" id="id_qcp_cxk_xj"><a name="id_qcp_cxk_xj"><!-- --></a>
  229. <h3 class="title topictitle3">Viewing, Editing, Copying, and Deleting
  230. Saved Queries </h3>
  231. <div class="body conbody">
  232. <p class="p">You can view a list of saved queries of all users by clicking <strong class="ph b">My
  233. Queries</strong> and then selecting either <span class="ph uicontrol">Recent Saved Queries</span> or
  234. <span class="ph uicontrol">Recent Run Queries</span> tab to display the respective queries or
  235. clicking <strong class="ph b">Saved Queries</strong>. You can copy any query, but you
  236. can edit, delete, and view the history of only your own queries. </p>
  237. <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">
  238. <thead class="thead" align="left">
  239. <tr class="row">
  240. <th class="entry" valign="top" width="25%" id="d7221e501">Saved Query</th>
  241. <th class="entry" valign="top" width="75%" id="d7221e504">Procedure</th>
  242. </tr>
  243. </thead>
  244. <tbody class="tbody">
  245. <tr class="row">
  246. <td class="entry" valign="top" width="25%" headers="d7221e501 ">
  247. <p class="p">
  248. <strong class="ph b">Edit</strong>
  249. </p>
  250. </td>
  251. <td class="entry" valign="top" width="75%" headers="d7221e504 ">
  252. <div class="p">
  253. <a name="id_qcp_cxk_xj__d104e728"><!-- --></a><ol class="ol" id="id_qcp_cxk_xj__d104e728">
  254. <li class="li">Click <strong class="ph b">Saved Queries</strong>.
  255. The Queries window displays.</li>
  256. <li class="li">Check the checkbox next to the query and click <strong class="ph b">Edit</strong>. The query displays in the Query
  257. Editor window.</li>
  258. <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>
  259. </ol>
  260. </div>
  261. </td>
  262. </tr>
  263. <tr class="row">
  264. <td class="entry" valign="top" width="25%" headers="d7221e501 ">
  265. <p class="p">
  266. <strong class="ph b">Copy</strong>
  267. </p>
  268. </td>
  269. <td class="entry" valign="top" width="75%" headers="d7221e504 ">
  270. <div class="p">
  271. <a name="id_qcp_cxk_xj__d104e773"><!-- --></a><ol class="ol" id="id_qcp_cxk_xj__d104e773">
  272. <li class="li">Click <strong class="ph b">Saved Queries</strong>.
  273. The Queries window displays.</li>
  274. <li class="li">Check the checkbox next to the query and click <strong class="ph b">Copy</strong>. The query displays in the Query
  275. Editor window.</li>
  276. <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>
  277. </ol>
  278. </div>
  279. </td>
  280. </tr>
  281. <tr class="row">
  282. <td class="entry" valign="top" width="25%" headers="d7221e501 ">
  283. <p class="p">
  284. <strong class="ph b">Copy in Query History</strong>
  285. </p>
  286. </td>
  287. <td class="entry" valign="top" width="75%" headers="d7221e504 ">
  288. <div class="p">
  289. <a name="id_qcp_cxk_xj__d104e818"><!-- --></a><ol class="ol" id="id_qcp_cxk_xj__d104e818">
  290. <li class="li">Click <strong class="ph b">History</strong>. The
  291. Query History window displays.</li>
  292. <li class="li">To display the queries for all users, click <strong class="ph b">Show everyone's queries</strong>. The queries for
  293. all users display in the History window.</li>
  294. <li class="li">Click the query you want to copy. A copy of the query
  295. displays in the Query Editor window.</li>
  296. <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>
  297. </ol>
  298. </div>
  299. </td>
  300. </tr>
  301. <tr class="row">
  302. <td class="entry" valign="top" width="25%" headers="d7221e501 ">
  303. <p class="p">
  304. <strong class="ph b">Delete</strong>
  305. </p>
  306. </td>
  307. <td class="entry" valign="top" width="75%" headers="d7221e504 ">
  308. <a name="id_qcp_cxk_xj__d104e861"><!-- --></a><ol class="ol" id="id_qcp_cxk_xj__d104e861">
  309. <li class="li">Click <strong class="ph b">Saved Queries</strong>.
  310. The Queries window displays.</li>
  311. <li class="li">Check the checkbox next to the query and click <strong class="ph b">Delete</strong>.</li>
  312. <li class="li">Click <strong class="ph b">Yes</strong> to confirm
  313. the deletion.</li>
  314. </ol>
  315. </td>
  316. </tr>
  317. </tbody>
  318. </table>
  319. </div>
  320. </div>
  321. </div>
  322. </div>
  323. </body>
  324. </html>