Using HiveQL Editor on the Hue Web UI
Scenario
Users can use the Hue web UI to execute HiveQL statements in an MRS cluster.
Access Editor
- Access the Hue web UI. For details, see Accessing the Hue Web UI.
- In the navigation tree on the left, click and choose Hive. The Hive page is displayed.
Hive supports the following functions:
- Executes and manages HiveQL statements.
- Views the HiveQL statements saved by the current user in Saved Queries.
- Queries HiveQL statements executed by the current user in Query History.
Executing HiveQL Statements
- Select a Hive database from the Database drop-down list box. The default database is default.
The system displays all available tables. 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 where the table or column is located and click . Column details are displayed.
- Enter the query statements in the area for editing HiveQL statements.
- Click to execute the HiveQL statements.
- If you want to use the entered HiveQL statements again, click to save them.
- Advanced query configuration:
Click in the upper right corner to configure information such as files, functions, and settings.
- Viewing the information of shortcut keys:
Click in the upper right corner to view the syntax and keyboard shortcut information.
- To delete an entered HiveQL statement, click the triangle next to and select Clear.
- 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.
Viewing Execution Results
- View the execution results below the execution area on Hive. The Query History tab page is displayed by default.
- Click a result to view the execution result of the executed statement.
Hue does not support the display of a large amount of data. When a large number of SQL query results are loaded, the page may be frozen and some data may not be displayed. It is recommended that no more than 5,000 lines of query results be loaded.
Managing Query Statements
- Click Saved Queries.
- Click a saved statement. The system automatically adds the statement to the editing area.
Modifying the Session Configuration of the Hue Editor
- On the editor page, click .
- Click on the right of Files, and then click to select files.
You can click next to Files to add a file resource.
- In the Functions area, enter a user-defined name and the class name of the function.
You can click next to Functions to add a customized function.
- In the Settings area, enter the Hive parameter name in the Key, and 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