Yang, Tong 6182f91ba8 MRS component operation guide_normal 2.0.38.SP20 version
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>
2022-12-09 14:55:21 +00:00

35 lines
8.4 KiB
HTML

<a name="mrs_01_0134"></a><a name="mrs_01_0134"></a>
<h1 class="topictitle1">Using HiveQL Editor on the Hue Web UI</h1>
<div id="body1598413137777"><div class="section" id="mrs_01_0134__s9f93d0a70cdc4575b48c96902a562dfe"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_0134__p7684161264218">Users can use the Hue web UI to execute HiveQL statements in an MRS cluster.</p>
</div>
<div class="section" id="mrs_01_0134__section26788191145057"><h4 class="sectiontitle">Access Editor</h4><ol id="mrs_01_0134__ol44107557145123"><li id="mrs_01_0134__li849515575276"><span>Access the Hue web UI. For details, see <a href="mrs_01_0132.html">Accessing the Hue Web UI</a>.</span></li><li id="mrs_01_0134__li32181645145123"><span>In the navigation tree on the left, click <span><img id="mrs_01_0134__image188071542102916" src="en-us_image_0000001349090381.png"></span> and choose <span class="uicontrol" id="mrs_01_0134__uicontrol10468102964715"><b>Hive</b></span>. The <span class="parmname" id="mrs_01_0134__parmname23960182145123"><b>Hive</b></span> page is displayed.</span><p><p id="mrs_01_0134__p18668164145123"><span class="parmname" id="mrs_01_0134__parmname61726564145123"><b>Hive</b></span> supports the following functions:</p>
<ul id="mrs_01_0134__ul25945359145123"><li id="mrs_01_0134__li8151932145123">Executes and manages HiveQL statements.</li><li id="mrs_01_0134__li58461858145123">Views the HiveQL statements saved by the current user in <strong id="mrs_01_0134__b212318151321522">Saved Queries</strong>.</li><li id="mrs_01_0134__li40165519145123">Queries HiveQL statements executed by the current user in <strong id="mrs_01_0134__b5163134510167">Query History</strong>.</li></ul>
</p></li></ol>
</div>
<div class="section" id="mrs_01_0134__section5938223214523"><h4 class="sectiontitle">Executing HiveQL Statements</h4><ol id="mrs_01_0134__ol59674238145244"><li id="mrs_01_0134__li55366463145244"><span>Select a Hive database from the <span class="wintitle" id="mrs_01_0134__en-us_topic_0272686976_wintitle396173155119"><b>Database</b></span> drop-down list box. The default database is <span class="parmvalue" id="mrs_01_0134__en-us_topic_0272686976_parmvalue34652220145244"><b>default</b></span>.</span><p><p id="mrs_01_0134__en-us_topic_0272686976_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_0134__li29724435145244"><span>Click the desired table name. All columns in the table are displayed.</span><p><p id="mrs_01_0134__p55498498145244">Move the cursor to the row where the table or column is located and click <span><img id="mrs_01_0134__image16701686485" src="en-us_image_0000001296090540.png"></span>. Column details are displayed. </p>
</p></li><li id="mrs_01_0134__li62672328145244"><span>Enter the query statements in the area for editing HiveQL statements.</span></li><li id="mrs_01_0134__li66282794145244"><span>Click <span><img id="mrs_01_0134__image152120534504" src="en-us_image_0000001296250188.jpg"></span> to execute the HiveQL statements.</span><p><div class="note" id="mrs_01_0134__note52103997145244"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_0134__ul35615494145244"><li id="mrs_01_0134__li6209567145244">If you want to use the entered HiveQL statements again, click <span><img id="mrs_01_0134__image1548910543262" src="en-us_image_0000001348770573.png"></span> to save them.</li><li id="mrs_01_0134__li674754114817">Advanced query configuration:<p id="mrs_01_0134__p574717411482"><a name="mrs_01_0134__li674754114817"></a><a name="li674754114817"></a>Click <span><img id="mrs_01_0134__image4747241154816" src="en-us_image_0000001349170281.png"></span> in the upper right corner to configure information such as files, functions, and settings.</p>
</li><li id="mrs_01_0134__li1174704114814">Viewing the information of shortcut keys:<p id="mrs_01_0134__p374717418489"><a name="mrs_01_0134__li1174704114814"></a><a name="li1174704114814"></a>Click <span><img id="mrs_01_0134__image42283819130" src="en-us_image_0000001349170277.png"></span> in the upper right corner to view the syntax and keyboard shortcut information.</p>
</li><li id="mrs_01_0134__li34295104145244">To delete an entered HiveQL statement, click the triangle next to <span><img id="mrs_01_0134__image1696182111616" src="en-us_image_0000001295930712.jpg"></span> and select <span class="uicontrol" id="mrs_01_0134__uicontrol24450026145244"><b>Clear</b></span>.</li><li id="mrs_01_0134__li1580691217484">Viewing history:<p id="mrs_01_0134__p16806151215484"><a name="mrs_01_0134__li1580691217484"></a><a name="li1580691217484"></a>Click <span class="parmname" id="mrs_01_0134__parmname380691204816"><b>Query History</b></span> to view the HiveQL running status. You can view the history of all the statements or only the saved statements. If many historical records exist, you can enter keywords in the text box to search for desired records.</p>
</li></ul>
</div></div>
</p></li></ol>
</div>
<div class="section" id="mrs_01_0134__section3491749914539"><h4 class="sectiontitle">Viewing Execution Results</h4><ol id="mrs_01_0134__ol47679345145312"><li id="mrs_01_0134__li13016201145312"><span>View the execution results below the execution area on <span class="wintitle" id="mrs_01_0134__wintitle138688441281"><b>Hive</b></span>. The <span class="wintitle" id="mrs_01_0134__wintitle88511950987"><b>Query History</b></span> tab page is displayed by default.</span></li><li id="mrs_01_0134__li50036947145312"><span>Click a result to view the execution result of the executed statement.</span></li></ol>
</div>
<div class="section" id="mrs_01_0134__section53760602145325"><h4 class="sectiontitle">Managing Query Statements</h4><ol id="mrs_01_0134__ol61171655145335"><li id="mrs_01_0134__li7136121691110"><span>Click <span class="uicontrol" id="mrs_01_0134__uicontrol17137161613119"><b>Saved Queries</b></span>.</span></li><li id="mrs_01_0134__li14253391145335"><span>Click a saved statement. The system automatically adds the statement to the editing area.</span></li></ol>
</div>
<div class="section" id="mrs_01_0134__section62596142145356"><h4 class="sectiontitle">Modifying the Session Configuration of the Hue Editor</h4><ol id="mrs_01_0134__ol5177964214543"><li id="mrs_01_0134__li1502120814543"><span>On the editor page, click <span><img id="mrs_01_0134__image1931015286554" src="en-us_image_0000001349289869.jpg"></span>.</span></li><li id="mrs_01_0134__li2308899414543"><span>Click <span><img id="mrs_01_0134__image860765510554" src="en-us_image_0000001295930716.jpg"></span> on the right of <span class="parmname" id="mrs_01_0134__parmname875836814543"><b>Files</b></span>, and then click <span><img id="mrs_01_0134__image44615161571" src="en-us_image_0000001349170285.jpg"></span> to select files.</span><p><p id="mrs_01_0134__p2493506514543">You can click <span><img id="mrs_01_0134__image68051841125715" src="en-us_image_0000001295930716.jpg"></span> next to <strong id="mrs_01_0134__b348864817149">Files</strong> to add a file resource.</p>
</p></li><li id="mrs_01_0134__li6062811414543"><span>In the <span class="parmname" id="mrs_01_0134__parmname5826919714543"><b>Functions</b></span> <span><img id="mrs_01_0134__image2056171385812" src="en-us_image_0000001295930716.jpg"></span> area, enter a user-defined name and the class name of the function.</span><p><p class="litext" id="mrs_01_0134__p6638878014543">You can click <span><img id="mrs_01_0134__image9504139185810" src="en-us_image_0000001295930716.jpg"></span> next to <strong id="mrs_01_0134__b544918312152">Functions</strong> to add a customized function.</p>
</p></li><li id="mrs_01_0134__li6540561714543"><span>In the <span class="parmname" id="mrs_01_0134__parmname5404229102916"><b>Settings</b></span> <span><img id="mrs_01_0134__image22716685912" src="en-us_image_0000001295930716.jpg"></span> area, enter the Hive parameter name in the <span class="parmname" id="mrs_01_0134__parmname2606183214543"><b>Key</b></span>, and value in <span class="parmname" id="mrs_01_0134__parmname3322989914543"><b>Value</b></span>. The current Hive session connects to Hive based on the customized configuration.</span><p><p id="mrs_01_0134__p726729014543">You can click <span><img id="mrs_01_0134__image13973133465917" src="en-us_image_0000001295930716.jpg"></span> to add a parameter.</p>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_0130.html">Using Hue (MRS 3.x or Later)</a></div>
</div>
</div>