forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
19 lines
3.6 KiB
HTML
19 lines
3.6 KiB
HTML
<a name="mrs_01_1020"></a><a name="mrs_01_1020"></a>
|
|
|
|
<h1 class="topictitle1">Using Hue from Scratch</h1>
|
|
<div id="body1590118096610"><p id="mrs_01_1020__a5534209d8dc14173acad83522e6d3a36">Hue provides the file browser function using a graphical user interface (GUI) so that you can view files and directories on Hive.</p>
|
|
<div class="section" id="mrs_01_1020__section12630202618440"><h4 class="sectiontitle">Prerequisites</h4><p id="mrs_01_1020__p1111333015011">You have installed Hive and Hue, and the Kerberos authentication cluster in the running state.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1020__section13302161334511"><h4 class="sectiontitle">Procedure</h4><ol id="mrs_01_1020__ol18473124685314"><li id="mrs_01_1020__li8812166235"><span>Access the Hue web UI. For details, see <a href="mrs_01_0370.html">Accessing the Hue Web UI</a>.</span></li><li id="mrs_01_1020__li874802051810"><span>Open the Hue web UI and choose <span class="menucascade" id="mrs_01_1020__menucascade14457125653111"><b><span class="uicontrol" id="mrs_01_1020__uicontrol10457156193115">Query Editors</span></b> > <b><span class="uicontrol" id="mrs_01_1020__uicontrol1145725612313">Hive</span></b></span>.</span></li><li id="mrs_01_1020__li55366463145244"><span>In <span class="uicontrol" id="mrs_01_1020__uicontrol1489512183319"><b>Databases</b></span>, select a Hive database, the default database is <span class="parmvalue" id="mrs_01_1020__parmvalue34652220145244"><b>default</b></span>.</span><p><p id="mrs_01_1020__p43434531145244">The system displays all available tables. You can enter a keyword of the table name to search for the desired table.</p>
|
|
</p></li><li id="mrs_01_1020__li29724435145244"><span>Click the desired table name. All columns in the table are displayed.</span></li><li id="mrs_01_1020__li62672328145244"><a name="mrs_01_1020__li62672328145244"></a><a name="li62672328145244"></a><span>Enter the HiveQL statements in the area for editing.</span><p><p id="mrs_01_1020__p2898016211519"><strong id="mrs_01_1020__b8308122114105">create table hue_table(id int,name string,company string) row format delimited fields terminated by ',' stored as textfile;</strong></p>
|
|
<p id="mrs_01_1020__p51702834145244">Click <span><img id="mrs_01_1020__image1461310445470" src="en-us_image_0000001349090137.jpg"></span> and select <span class="uicontrol" id="mrs_01_1020__uicontrol27316963215"><b>Explain</b></span>. The editor checks the syntax and execution plan of the entered HiveQL statements. If the statements have syntax errors, the editor reports <span class="parmvalue" id="mrs_01_1020__parmvalue28114380145244"><b>Error while compiling statement</b></span>.</p>
|
|
</p></li><li id="mrs_01_1020__li3950929145244"><span>Click <span><img id="mrs_01_1020__image18459851421" src="en-us_image_0000001296249940.png"></span>, and select the engine for executing the HiveQL statements.</span></li><li id="mrs_01_1020__li785310218562"><span>Click <span><img id="mrs_01_1020__image152120534504" src="en-us_image_0000001296090292.jpg"></span> to execute the HiveQL statements.</span></li><li id="mrs_01_1020__li30024392115137"><span>In the command text box, enter <strong id="mrs_01_1020__b27071415151023">show tables;</strong> and click <span><img id="mrs_01_1020__image25522852115137" src="en-us_image_0000001295770504.png"></span>. Check whether the <strong id="mrs_01_1020__b34471899479">hue-table</strong> table created in <a href="#mrs_01_1020__li62672328145244">5</a> exists in the result.</span></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_0369.html">Using Hue (Versions Earlier Than MRS 3.x)</a></div>
|
|
</div>
|
|
</div>
|
|
|