• MapReduce Service

  1. Help Center
  2. MapReduce Service
  3. User Guide
  4. Using MRS
  5. Using Hue
  6. Using HiveQL Editor on the Hue WebUI

Using HiveQL Editor on the Hue WebUI


After Kerberos authentication is enabled for an MRS cluster, users can use the Hue WebUI to execute HiveQL statements in the cluster.


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