Cloudera Impala Query UI

The Cloudera Impala Query UI application enables you to perform queries on Apache Hadoop data stored in HDFS or HBase using Cloudera Impala. For information about Cloudera Impala, see Installing and Using Cloudera Impala. You can create, run, and manage queries, and download the results in a Microsoft Office Excel worksheet file or a comma-separated values file.

Cloudera Impala Query UI and Installation and Configuration

The Cloudera Impala Query UI application is one of the applications installed as part of Hue. For information about installing and configuring Hue, see Hue Installation.

The Cloudera Impala Query UI assumes an existing Cloudera Impala installation. The Hue installation instructions include the configuration necessary for Impala. You can view the current configuration from from the Settings tab.

Starting Cloudera Impala Query UI

To start the application, click the Cloudera Impala icon ( images/image7.png ) in the navigation bar at the top of the Hue browser page.

Working with Queries

The Query Editor view lets you create queries in the Cloudera Impala Query Language, which is based on the Hive Standard Query Language (HiveQL) and described in the Cloudera Impala Language Reference topic in Installing and Using Cloudera Impala. You can name and save your queries to use later. When you submit a query, you can either wait for the query to complete, or return later to find the queries in the History view.

Creating and Running Queries

  Note:

To run a query, you must be logged in to Hue as a user that also has a Unix user account on the remote server.

To create and run a query:

  1. In the Query Editor window, type the query. For example, to select all data from the sample_08 table, you would type:
    SELECT * FROM sample_08
  2. In the box to the left of the Query field you can enable users to enter parameters at run-time and request email notification when the job is complete. See Advanced Query Settings for details on using these settings.
  3. To save your query and advanced settings to use again later, click Save As, enter a name and description, and then click OK. To save changes to an existing query, click Save.
  4. To run the query, click Execute. The Query Results window appears with the results of your query.
    • To view a log of the query execution, click Log at the top of the results display. You can use the information in this tab to debug your query.
    • To view the query that generated these results, click Query at the top of the results display.
    • To view the columns of the query, click Columns.
    • To return to the query in the Query Editor, click Unsaved Query.

Advanced Query Settings

The pane to the left of the Query Editor lets you specify the following options:

Option

Description

SETTINGS

Override the Cloudera Impala default settings. Click Add to configure a new setting. »   For Key, enter an Impala configuration variable name. »   For Value, enter the value you want to use for the variable. To view the default settings, click the Settings tab at the top of the page.

PARAMETERIZATION

Indicate that a dialog box should display to enter parameter values when a query containing the string $<parametername> is executed. Enabled by default.

Viewing, Editing, or Deleting My Queries

You can view a list of saved queries of all users by clicking Saved Queries. You can copy any user's query, but you can only edit, delete, and view the history of your own queries.

To edit a saved query:

  1. In the Cloudera Impala window, click Saved Queries. The Queries window displays.
  2. Click the Options button next to the query and choose Edit from the context menu. The Query Editor window displays.
  3. Change the query and then click Save. You can also click Save As, enter a new name, and click OK to save a copy of the query.

To delete a saved query:

  1. Click Saved Queries. The Queries window displays.
  2. Click the Options button next to the query and choose Delete from the context menu.
  3. Click Yes to confirm the deletion.

To copy a saved query:

  1. Click Saved Queries. The Queries window displays.
  2. Click the Options button next to the query and choose Clone from the context menu. The Query Editor window displays.
  3. Change the query as necessary and then click Save. You can also click Save As, enter a new name, and click Ok to save a copy of the query.

To copy a query in the Query History window:

  1. Click History. The Query History window displays.
  2. To display the queries for all users, click Show everyone's queries. The queries for all users displays in the Query History window.
  3. Click the Clone link next to the query you want to copy. A copy of the query displays in the Query Editor window.
  4. Change the query, if necessary, and then click Save As, enter a new name, and click OK to save the query.