Using HiveQL Editor on the Hue Web UI
Scenario
Users can use the Hue web UI to execute HiveQL statements in a cluster.
Accessing Query Editors
- Access the Hue web UI. For details, see Accessing the Hue Web UI.
- Choose Hive page is displayed.
. The
Hive supports the following functions:
- Executes and manages HiveQL statements.
- View the HiveQL statements saved by the current user in Saved Queries.
- Query HiveQL statements executed by the current user in Query History.
- Click to display all databases included in Databases of Hive.
Executing HiveQL Statements
- Choose Hive page is displayed. . The
- Click and select a database from Databases. The default database is default.
The system displays all available tables in the database. You can enter a keyword of the table name to search for the desired table.
- Click the desired table name. All columns in the table are displayed.
Move the cursor to the row of the table and click . Column details are displayed.
- Enter the query statements in the area for editing HiveQL statements.
Click and select Explain. The editor checks the syntax and execution plan of the entered statements. If the statements have syntax errors, the editor reports Error while compiling statement.
- Click and select the engine for executing the HiveQL statements.
- mr: MapReduce computing framework
- spark: Spark computing framework
- tez: Tez computing framework
Tez is applicable to MRS 1.9.x and later versions.
- Click to execute the HiveQL statements.
- If you want to use the entered HiveQL statements again, click to save them.
- To format HiveQL statements, click and select Format.
- To delete an entered HiveQL statement, click and select Clear.
- Clear the entered statement and execute a new statement. Click and select New query.
- Viewing history:
Click Query History 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.
- Advanced query configuration:
Click in the upper right corner to configure information such as files, functions, and settings.
- Viewing the information of shortcut keys:
Viewing Execution Results
- In the Hive execution area, Query History is displayed by default.
- Click Results to view the execution result of the executed statement.
Managing Query Statements
- Choose Query Editors > Hive. The Hive page is displayed.
- Click Saved Queries.
Click a saved statement. The system automatically adds the statement to the editing area.
Modifying Query Editors Settings
- On the Hive tab page, click .
- Click next to Files and click to specify the directory for storing the file.
You can click to add a file resource.
- Click next to Functions and enter the names of user-defined function and function class.
You can click to add a customized function.
- Click next to Settings, enter the Hive parameter name in Key, and the value in Value. The current Hive session connects to Hive based on the customized configuration.
You can click to add a parameter.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot