Help Center > > User Guide> MRS Cluster Component Operation Guide> Using Hue> Using HiveQL Editor on the Hue Web UI

Using HiveQL Editor on the Hue Web UI

Updated at: Apr 28, 2020 GMT+08:00


Users can use the Hue web UI to execute HiveQL statements in the cluster.


When Kerberos authentication is enabled, the MRS cluster administrator has assigned the permission for using Hive to the user. For details, see Creating a User.

Accessing Query Editors

  1. Access the Hue web UI and choose Query Editors > Hive. The Hive page is displayed.

    Hive supports the following functions.

    • Executes and manages HiveQL statements.
    • Queries HiveQL statements saved by the current user in Saved Queries.
    • Queries HiveQL statements executed by the current user in Query History.

  2. Click to display all databases in Hive.

Executing HiveQL Statements

  1. Access Query Editors.
  2. Select a Hive database in Databases. 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.

  3. 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.

  4. Enter the query statements in the area for editing HiveQL statements.

    Click and choose 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.

  5. Select the engine for executing the HiveQL statements.

    • mr: MapReduce computing framework
    • spark: Spark computing framework

  6. Click to execute the HiveQL statements.

    • If you want to use the entered HiveQL statements again, click to save them.
    • To format the HiveQL statements, click and choose Format.
    • To delete the entered HiveQL statements, click and choose Clear.
    • To clear the entered statements and start a new query, click and choose New query.

Querying Execution Results

  1. View the execution results below the execution area on Hive. The Query History tab is displayed by default.
  2. Click a result to view the executed statements.

Managing Statements

  1. Access Query Editors.
  2. Click Saved Queries.

    Click a saved statement. The system automatically fills the statement in the editing area.

Modifying Query Editors Settings

  1. On the Hive page, click .
  2. Click on the right side of Files, and click to specify the save path of the file.

    You can click to add a file resource.

  3. Click on the right side of Functions. Enter the name of the user-defined function and the function class.

    You can click to add a function.

  4. Click on the right side of Settings. Enter the Hive parameter name in Key under Settings and the parameter value in Value. The session connects to Hive using the user-defined configuration.

    You can click to add a parameter.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?

Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel