|
|
@@ -6,11 +6,11 @@
|
|
|
<h2><a name="Beeswax-Contents"></a>Contents</h2>
|
|
|
|
|
|
<style type='text/css'>/*<![CDATA[*/
|
|
|
-div.rbtoc1343860614247 {margin-left: 1.5em;padding: 0px;}
|
|
|
-div.rbtoc1343860614247 ul {margin-left: 0px;padding-left: 20px;}
|
|
|
-div.rbtoc1343860614247 li {margin-left: 0px;padding-left: 0px;}
|
|
|
+div.rbtoc1348176344574 {margin-left: 1.5em;padding: 0px;}
|
|
|
+div.rbtoc1348176344574 ul {margin-left: 0px;padding-left: 20px;}
|
|
|
+div.rbtoc1348176344574 li {margin-left: 0px;padding-left: 0px;}
|
|
|
|
|
|
-/*]]>*/</style><div class='rbtoc1343860614247'>
|
|
|
+/*]]>*/</style><div class='rbtoc1348176344574'>
|
|
|
<ul>
|
|
|
<li><a href='#Beeswax-IntroducingBeeswax'>Introducing Beeswax</a></li>
|
|
|
<li><a href='#Beeswax-BeeswaxandHiveInstallationandConfiguration'>Beeswax and Hive Installation and Configuration</a></li>
|
|
|
@@ -47,28 +47,29 @@ div.rbtoc1343860614247 li {margin-left: 0px;padding-left: 0px;}
|
|
|
|
|
|
<p>Beeswax is installed and configured as part of Hue. For more information about installing Hue, see <a href="https://ccp.cloudera.com/display/CDH4DOC/Hue+Installation">Hue Installation</a>.</p>
|
|
|
|
|
|
-<p>Beeswax assumes an existing Hive installation. The Hue installation instructions include the configuration necessary for Beeswax to access Hive. You can view the current Hive configuration from from the <b>Settings</b> tab in the Beeswax application. </p>
|
|
|
+<p>Beeswax assumes an existing Hive installation. The Hue installation instructions include the configuration necessary for Beeswax to access Hive. You can view the current Hive configuration from from the <b>Settings</b> tab in the Beeswax application.</p>
|
|
|
|
|
|
-<p>By default, a Beeswax user can see the saved queries for all users – both his/her own queries and those of other Beeswax users. If this behavior is not desirable, there is a configuration option you can change in the <tt>/etc/hue/hue.ini</tt> file under the <tt>[beeswax]</tt> section to restrict viewing saved queries to only the query owner and Hue administrators. To change this setting, find and uncomment the <tt>share_saved_queries</tt> property and set it to <tt>false</tt>. </p>
|
|
|
+<p>By default, a Beeswax user can see the saved queries for all users – both his/her own queries and those of other Beeswax users. If this behavior is not desirable, there is a configuration option you can change in the <tt>/etc/hue/hue.ini</tt> file under the <tt>[beeswax]</tt> section to restrict viewing saved queries to only the query owner and Hue administrators. To change this setting, find and uncomment the <tt>share_saved_queries</tt> property and set it to <tt>false</tt>.</p>
|
|
|
|
|
|
|
|
|
<h1><a name="Beeswax-StartingBeeswax"></a>Starting Beeswax</h1>
|
|
|
|
|
|
-<p>To start the Beeswax application, click the <b>Beeswax</b> icon (<span class="image-wrap" style=""><img src="/beeswax/static/help/images/21103320.png" width="30" style="border: 0px solid black"/></span>) in the navigation bar at the top of the Hue browser page. </p>
|
|
|
+<p>To start the Beeswax application, click the <b>Beeswax</b> icon ( <span class="image-wrap" style=""><img src="/beeswax/static/art/beeswax-logo.png" width="30" style="border: 0px solid black"/></span>) in the navigation bar at the top of the Hue browser page.</p>
|
|
|
|
|
|
-<p>The first time you run Beeswax, the "Welcome to Beeswax for Hive" page appears, and prompts you to install the sample tables or import your own tables. </p>
|
|
|
+<p>The first time you run Beeswax, the "Welcome to Beeswax for Hive" page appears, and prompts you to install the sample tables or import your own tables.</p>
|
|
|
|
|
|
-<p>Once some tables have been created — either from installing the samples or importing your own data — clicking the Beeswax tab will bring you directly into the Query Editor. </p>
|
|
|
+<p>Once some tables have been created — either from installing the samples or importing your own data — clicking the Beeswax tab will bring you directly into the Query Editor.</p>
|
|
|
|
|
|
-<p>The tabs in the Beeswax navigation bar allow you to navigate to the main functional areas of Beeswax. </p>
|
|
|
+<p>The tabs in the Beeswax navigation bar allow you to navigate to the main functional areas of Beeswax.</p>
|
|
|
|
|
|
-<h3><a name="Beeswax-InstallingtheBeeswaxSamples"></a>Installing the Beeswax Samples </h3>
|
|
|
+<h3><a name="Beeswax-InstallingtheBeeswaxSamples"></a>Installing the Beeswax Samples</h3>
|
|
|
|
|
|
<p>You can install two sample Beeswax tables to use as examples.</p>
|
|
|
|
|
|
<ol>
|
|
|
<li>In the <b>Welcome to Beeswax</b> window, click <b>Install Samples</b>
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Confirm that you want to install these samples.
|
|
|
<br class="atl-forced-newline" /></li>
|
|
|
</ol>
|
|
|
@@ -82,10 +83,11 @@ div.rbtoc1343860614247 li {margin-left: 0px;padding-left: 0px;}
|
|
|
|
|
|
<ol>
|
|
|
<li>In the <b>Welcome to Beeswax</b> window, click the <b>Import Data</b> button.<br/>
|
|
|
-This takes you to the <b>Create a new table manually</b> page.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+This takes you to the <b>Create a new table manually</b> page.
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Follow the prompts in this wizard to specify your table. For more details see <a href="#Beeswax-CreatingTables">Creating Tables</a>.
|
|
|
-<br class="atl-forced-newline" /> </li>
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
@@ -106,38 +108,53 @@ This takes you to the <b>Create a new table manually</b> page.
|
|
|
|
|
|
<ol>
|
|
|
<li>In the Beeswax <b>Hive Query</b> window, type the query.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
For example, to select all data from the <em>sample_08</em> table, you would type:
|
|
|
<br class="atl-forced-newline" />
|
|
|
<tt>SELECT * FROM sample_08 WHERE salary > 100000</tt>
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>In the box to the left of the Query field, you can override the default Hive and Hadoop settings, specify file resources and user-defined functions, and enable users to enter parameters at run-time, and request email notification when the job is complete. See <a href="#Beeswax-AdvancedSettings">Advanced Query Settings</a> below for details on using these settings.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<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>
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>If you want to view the execution plan for the query, click <b>Explain</b>. For more information, see <a href="http://wiki.apache.org/hadoop/Hive/LanguageManual/Explain">http://wiki.apache.org/hadoop/Hive/LanguageManual/Explain</a>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>To run the query, click <b>Execute</b>.
|
|
|
<br class="atl-forced-newline" />
|
|
|
<a name="Beeswax-QueryResults"></a><br/>
|
|
|
The Beeswax <b>Query Results</b> window appears with the results of your query.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Do any of the following to download or save the query results:
|
|
|
<br class="atl-forced-newline" />
|
|
|
<ul>
|
|
|
<li>Click <b>Download as CSV</b> to download the results in a comma-separated values file suitable for use in other applications.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
- <li>Click <b>Download as XLS</b> to download the results in a Microsoft Office Excel worksheet file.<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
- <li>Click <b>Save</b> to save the results in a table or HDFS file. <br class="atl-forced-newline" />
|
|
|
-To save the results in a new table, select <b>to a new table</b>, enter a name, and then click <b>Save</b>. <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
+ <li>Click <b>Download as XLS</b> to download the results in a Microsoft Office Excel worksheet file.
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
+ <li>Click <b>Save</b> to save the results in a table or HDFS file.
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+To save the results in a new table, select <b>to a new table</b>, enter a name, and then click <b>Save</b>.
|
|
|
+<br class="atl-forced-newline" />
|
|
|
To save the results in an HDFS file, select <b>to HDFS directory</b>, enter a path in <b>Results Location</b> and then click <b>Save</b>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Under <b>MR Jobs</b>, you can view any Map/Reduce jobs that the query started.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<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.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>To view the query that generated these results, click <b>Query</b> at the top of the results display.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>To return to the query in the <b>Query Editor,</b> click <b>Unsaved Query</b>.</li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
@@ -146,21 +163,23 @@ To save the results in an HDFS file, select <b>to HDFS directory</b>, enter a pa
|
|
|
|
|
|
|
|
|
<p><a name="Beeswax-AdvancedSettings"></a></p>
|
|
|
+
|
|
|
<h3><a name="Beeswax-AdvancedQuerySettings"></a>Advanced Query Settings</h3>
|
|
|
|
|
|
<p>The section to the left of the Query field lets you specify the following options:
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></p>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></p>
|
|
|
|
|
|
<style type="text/css">
|
|
|
-td {
|
|
|
+td.confluenceTd {
|
|
|
border: #dddddd solid 1px;
|
|
|
-height: 45px;
|
|
|
+height: 36px;
|
|
|
padding: 5px 10px;
|
|
|
vertical-align: top;
|
|
|
}
|
|
|
-th {
|
|
|
+th.confluenceTh {
|
|
|
border: #dddddd solid 1px;
|
|
|
-height: 50px;
|
|
|
+height: 40px;
|
|
|
padding: 5px 10px;
|
|
|
vertical-align: center;
|
|
|
}
|
|
|
@@ -175,20 +194,18 @@ vertical-align: center;
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class='confluenceTd'> <b>Hive Settings</b> </td>
|
|
|
-<td class='confluenceTd'> Use <b>Hive Settings</b> to override the Hive and Hadoop default settings. Click <b>Add</b> to configure a new setting. <br/>
|
|
|
-» For <b>Key</b>, enter a Hive or Hadoop configuration variable name. <br/>
|
|
|
-» For <b>Value</b>, enter the value you want to use for the variable.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
-For example, to override the directory where structured hive query logs are created, you would enter <tt>hive.querylog.location</tt> for <b>Key</b>, and a path for <b>Value.</b> <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
-Click <b>Add</b> again to add another new setting. <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
-To view the default settings, click the <b>Settings</b> tab at the top of the page. <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<td class='confluenceTd'> Use <b>Hive Settings</b> to override the Hive and Hadoop default settings. Click <b>Add</b> to configure a new setting. <br class="atl-forced-newline" />
|
|
|
+» For <b>Key</b>, enter a Hive or Hadoop configuration variable name. <br class="atl-forced-newline" />
|
|
|
+» For <b>Value</b>, enter the value you want to use for the variable. <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+For example, to override the directory where structured hive query logs are created, you would enter <tt>hive.querylog.location</tt> for <b>Key</b>, and a path for <b>Value.</b> <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+Click <b>Add</b> again to add another new setting. <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+To view the default settings, click the <b>Settings</b> tab at the top of the page. <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
For information about Hive configuration variables, see: <a href="http://wiki.apache.org/hadoop/Hive/AdminManual/Configuration">http://wiki.apache.org/hadoop/Hive/AdminManual/Configuration</a>. For information about Hadoop configuration variables, see: <a href="http://hadoop.apache.org/common/docs/current/mapred-default.html">http://hadoop.apache.org/common/docs/current/mapred-default.html</a> </td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class='confluenceTd'> <b>File Resources</b> </td>
|
|
|
-<td class='confluenceTd'> Use <b>File Resources</b> to make locally accessible files available at query execution time on the entire Hadoop cluster. Hive uses Hadoop's Distributed Cache to distribute the added files to all machines in the cluster at query execution time. <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
-Click <b>Add</b> to configure a new setting.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<td class='confluenceTd'> Use <b>File Resources</b> to make locally accessible files available at query execution time on the entire Hadoop cluster. Hive uses Hadoop's Distributed Cache to distribute the added files to all machines in the cluster at query execution time. <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+Click <b>Add</b> to configure a new setting. <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
From the <b>Type</b> drop-down menu, choose one of the following: <br class="atl-forced-newline" />
|
|
|
<br class="atl-forced-newline" />
|
|
|
<b>jar</b> — Adds the resources to the Java classpath. This is required in order to reference objects such as user defined functions. <br class="atl-forced-newline" />
|
|
|
@@ -203,8 +220,8 @@ For <b>Path</b>, enter the path to the file. You can also click <b>Choose a File
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class='confluenceTd'> <b>User-defined Functions</b> </td>
|
|
|
-<td class='confluenceTd'> You can use user-defined functions in a query. Specify the function name for <b>Name</b>, and specify the class name for <b>Class</b> <b>name</b>. <br/>
|
|
|
-Click <b>Add</b> to configure a new setting.<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<td class='confluenceTd'> You can use user-defined functions in a query. Specify the function name for <b>Name</b>, and specify the class name for <b>Class</b> <b>name</b>. <br class="atl-forced-newline" />
|
|
|
+Click <b>Add</b> to configure a new setting. <br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
You must specify a JAR file for the user-defined functions in <b>File Resources</b>. To include a user-defined function in a query, add a $ (dollar sign) before the function name in the query. For example, if <em>MyTable</em> is a user-defined function name in the query, you would type: <tt>SELECT * $MyTable</tt> </td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
@@ -223,17 +240,21 @@ You must specify a JAR file for the user-defined functions in <b>File Resources<
|
|
|
<h3><a name="Beeswax-ViewingQueryHistory"></a>Viewing Query History</h3>
|
|
|
|
|
|
<p>Beeswax enables you to view the history of queries that you have previously run. Results for these queries are available for one week or until Hue is restarted.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></p>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></p>
|
|
|
|
|
|
<p><b>To view query history:</b></p>
|
|
|
|
|
|
<ol>
|
|
|
<li>In the <b>Beeswax</b> window, click <b>History</b>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
Beeswax displays a list of your saved and unsaved queries in the Beeswax <b>Query History</b> window.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>To display the queries for all users, click <b>Show everyone's queries</b>. To display your queries only, click <b>Show my queries</b>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>To display the automatically generated actions that Beeswax performed on a user's behalf, click <b>Show auto actions</b>. To display user queries again, click <b>Show user queries</b>.</li>
|
|
|
</ol>
|
|
|
|
|
|
@@ -241,21 +262,27 @@ Beeswax displays a list of your saved and unsaved queries in the Beeswax <b>Quer
|
|
|
<h3><a name="Beeswax-Viewing%2CEditing%2CorDeletingSavedQueries"></a>Viewing, Editing, or Deleting Saved Queries</h3>
|
|
|
|
|
|
<p>You can view a list of saved queries of all users by clicking <b>Saved Queries</b> in the <b>Beeswax</b> window. You can copy any user's query, but you can only edit, delete, and view the history of your own queries.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></p>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></p>
|
|
|
|
|
|
<p><b>To edit a saved query:</b></p>
|
|
|
|
|
|
<ol>
|
|
|
<li>In the <b>Beeswax</b> window, click <b>Saved Queries</b>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
Beeswax displays the Beeswax <b>Queries</b> window.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Click the <b>Options</b> button next to the query and choose <b>Edit</b> from the context menu.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
Beeswax displays the query in the Beeswax <b>Query Editor</b> window.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<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.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
@@ -263,13 +290,17 @@ Beeswax displays the query in the Beeswax <b>Query Editor</b> window.
|
|
|
|
|
|
<ol>
|
|
|
<li>In the <b>Beeswax</b> window, click <b>Saved Queries</b>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
Beeswax displays the Beeswax <b>Queries</b> window.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Click the <b>Options</b> button next to the query and choose <b>Delete</b> from the context menu.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Click <b>Yes</b> to confirm the deletion.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
@@ -277,15 +308,20 @@ Beeswax displays the Beeswax <b>Queries</b> window.
|
|
|
|
|
|
<ol>
|
|
|
<li>In the <b>Beeswax</b> window, click <b>Saved Queries</b>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
Beeswax displays the Beeswax <b>Queries</b> window.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Click the <b>Options</b> button next to the query and choose <b>Clone</b> from the context menu.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
Beeswax displays the query in the Beeswax <b>Query Editor</b> window.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<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.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
@@ -293,19 +329,26 @@ Beeswax displays the query in the Beeswax <b>Query Editor</b> window.
|
|
|
|
|
|
<ol>
|
|
|
<li>In the <b>Beeswax</b> window, click <b>History</b>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
Beeswax displays the Beeswax <b>Query History</b> window.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>To display the queries for all users, click <b>everyone's</b>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
Beeswax displays the queries for all users in the Beeswax <b>Query History</b> window.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Click the <b>Clone</b> link next to the query you want to copy.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
Beeswax displays a copy of the query in the Beeswax <b>Query Editor</b> window.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<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.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
@@ -323,6 +366,7 @@ Beeswax displays a copy of the query in the Beeswax <b>Query Editor</b> window.
|
|
|
|
|
|
|
|
|
<p><a name="Beeswax-CreatingTables"></a></p>
|
|
|
+
|
|
|
<h3><a name="Beeswax-CreatingTables"></a>Creating Tables</h3>
|
|
|
|
|
|
<p>Although you can create tables by executing the appropriate HQL DDL query commands, it is easier to create a table using the Beeswax table creation wizard.</p>
|
|
|
@@ -331,34 +375,41 @@ Beeswax displays a copy of the query in the Beeswax <b>Query Editor</b> window.
|
|
|
|
|
|
<p>If you create a table from a file, the format of the data in the file will determine some of the properties of the table, such as the record and file formats. The data from the file you specify is imported automatically upon table creation.</p>
|
|
|
|
|
|
-<p>When you create a file manually, you specify all the properties of the table, and then execute the resulting query to actually create the table. You then import data into the table as an additional step.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></p>
|
|
|
+<p>When you create a file manually, you specify all the properties of the table, and then execute the resulting query to actually create the table. You then import data into the table as an additional step.
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></p>
|
|
|
|
|
|
-<p><b>To create a table from a file:</b></p>
|
|
|
+<p>*To create a table from a <a href="file:*">file:*</a></p>
|
|
|
|
|
|
<ol>
|
|
|
<li>In the <b>Beeswax</b> window, click <b>Tables</b>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>In the Beeswax <b>Action</b> pane, click <b>Create a new table from file</b>.<br/>
|
|
|
The table creation wizard starts.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Follow the instructions in the wizard to create the table.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
The basic steps are:
|
|
|
<ul>
|
|
|
<li>Choose your input file. The input file you specify must exist.<br/>
|
|
|
-Note that you can choose to have Beeswax create the table definition only based on the import file you select, without actually importing data from that file. </li>
|
|
|
+Note that you can choose to have Beeswax create the table definition only based on the import file you select, without actually importing data from that file.</li>
|
|
|
<li>Specify the column delimiter.</li>
|
|
|
<li>Define your columns, providing a name and selecting the type.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li>Click <b>Create Table</b> to create the table.<br/>
|
|
|
Beeswax displays the new table's metadata on the right side of the Beeswax <b>Table Metadata</b> window.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
-At this point, you can view the metadata or a Sample of the data in the table. <br/>
|
|
|
-From the Actions pane you can import new data into the table, browse the table, drop it, or go to the FileBrowser to see the location of the data.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+At this point, you can view the metadata or a Sample of the data in the table.<br/>
|
|
|
+From the Actions pane you can import new data into the table, browse the table, drop it, or go to the FileBrowser to see the location of the data.
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
@@ -366,13 +417,17 @@ From the Actions pane you can import new data into the table, browse the table,
|
|
|
|
|
|
<ol>
|
|
|
<li>In the <b>Beeswax</b> window, click <b>Tables</b>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>In the Beeswax <b>Action</b> pane, click <b>Create a new table manually</b>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
The table creation wizard starts.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Follow the instructions in the wizard to create the table.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
The basic steps are:
|
|
|
<ul>
|
|
|
<li>Name your table.</li>
|
|
|
@@ -382,26 +437,31 @@ The basic steps are:
|
|
|
<li>Specify the location for your table's data.</li>
|
|
|
<li>Define your columns, providing a name and selecting the type.</li>
|
|
|
<li>Add partitions, if appropriate.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li>Click <b>Create Table</b> to construct a query to create the table.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
The new query is displayed in the Hive Query window.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Click <b>Execute</b> to run the query and create the table.
|
|
|
<br class="atl-forced-newline" /></li>
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
<p><a name="Beeswax-BrowsingTables"></a></p>
|
|
|
+
|
|
|
<h3><a name="Beeswax-BrowsingTables"></a>Browsing Tables</h3>
|
|
|
|
|
|
<p><b>To browse the data in a table:</b></p>
|
|
|
|
|
|
<ol>
|
|
|
<li>In the Beeswax <b>Table List</b> window, click the <b>Browse Data</b> button next to the table you want to browse.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
Beeswax displays the table's data in the <b>Query Results</b> window.</li>
|
|
|
</ol>
|
|
|
|
|
|
@@ -410,14 +470,17 @@ Beeswax displays the table's data in the <b>Query Results</b> window.</li>
|
|
|
|
|
|
<ol>
|
|
|
<li>In the Beeswax <b>Table List</b> window, click the table name.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
Beeswax displays the table's metadata under a <b>Columns</b> tab.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
-You can view the actual data in the table by selecting the <b>Sample</b> tab. </li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+You can view the actual data in the table by selecting the <b>Sample</b> tab.</li>
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
<p><a name="Beeswax-ImportingDataintoTables"></a></p>
|
|
|
+
|
|
|
<h3><a name="Beeswax-ImportingDataintoTables"></a>Importing Data into Tables</h3>
|
|
|
|
|
|
<p>When importing data, you can choose to append or overwrite the table's data with data from a file.</p>
|
|
|
@@ -426,47 +489,60 @@ You can view the actual data in the table by selecting the <b>Sample</b> tab. </
|
|
|
|
|
|
<ol>
|
|
|
<li>In the Beeswax <b>Table List</b> window, double-click the table name.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
-Beeswax displays the <b>Beeswax Table Metadata</b> window.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+Beeswax displays the <b>Beeswax Table Metadata</b> window.
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>From the Actions panel, click <b>Import Data</b>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>For <b>Path</b>, enter the path to the file that contains the data you want to import.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Check <b>Overwrite existing data</b> to replace the data in the selected table with the imported data. Leave this unchecked to append to the table.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Click <b>Submit</b> to start importing the data.</li>
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
<p><a name="Beeswax-DroppingTables"></a></p>
|
|
|
+
|
|
|
<h3><a name="Beeswax-DroppingTables"></a>Dropping Tables</h3>
|
|
|
|
|
|
<p><b>To drop a table:</b></p>
|
|
|
|
|
|
<ol>
|
|
|
<li>In the Beeswax <b>Table List</b> window, double-click the table name.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
Beeswax displays the Beeswax <b>Table Metadata</b> window.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>From the Actions panel, click <b>Drop Table</b>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Click <b>Yes</b> to confirm the deletion.</li>
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
<p><a name="Beeswax-ViewingaTable%27sLocation"></a></p>
|
|
|
+
|
|
|
<h3><a name="Beeswax-ViewingaTable%27sLocation"></a>Viewing a Table's Location</h3>
|
|
|
|
|
|
<p><b>To view a table's location:</b></p>
|
|
|
|
|
|
<ol>
|
|
|
<li>In the Beeswax <b>Table List</b> window, double-click the table name.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
Beeswax displays the Beeswax <b>Table Metadata</b> window.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" /></li>
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" /></li>
|
|
|
<li>Click <b>View File Location</b>.
|
|
|
-<br class="atl-forced-newline" /> <br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
+<br class="atl-forced-newline" />
|
|
|
Beeswax lists the selected table in its directory in the <b>File Browser</b> window. </li>
|
|
|
</ol>
|
|
|
|