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](/content/support/en/documentation/cloudera-impala/cloudera-impala-documentation-v1-latest.html). 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 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 the Hue Installation manual.. 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 the **Settings** tab. Starting Cloudera Impala Query UI --------------------------------- Click the **Cloudera Impala Query UI** icon () in the navigation bar at the top of the Hue browser page. Managing Databases, Tables, and Partitions ------------------------------------------ You can create databases, tables, partitions, and load data by executing [Hive data manipulation statements](http://archive.cloudera.com/cdh4/cdh/4/hive/language_manual/data-manipulation-statements.html) in the Beeswax application. You can also use the [Metastore Manager](hue2.0ug_metastore_manager.html#xd_583c10bfdbd326ba-3ca24a24-13d80143249--7f9b) application to manage the databases, tables, and partitions and load data. When you change the metastore using one of these applications, you must click the Refresh button under METASTORE CATALOG in the pane to the left of the Query Editor to make the metastore update visible to the Cloudera Impala server. Installing Example Queries and Tables -------------------------------------  **Note**: You must be a superuser to perform this task. 1. Click . The Quick Start Wizard opens. 2. Click **Step 2: Examples**. 3. Click **Cloudera Impala Query UI**. Query Editor ------------ 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](http://www.cloudera.com/content/cloudera-content/cloudera-docs/Impala/latest/Installing-and-Using-Impala/Installing-and-Using-Impala.html). 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. In the box to the left of the Query field, you can select a database, override the default Cloudera Impala settings, enable users to enter parameters at run-time. See [Advanced Query Settings](#topic_5_3_2) for details on using these settings. ### Creating Queries 1. In the Query Editor window, type a query or multiple queries separated by a semicolon ";". To be presented with a drop-down of autocomplete options, type CTRL+spacebar when entering a query. 2. 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.** ### Loading Queries into the Query Editor 1. Do one of the following: - Click the My Queries tab. 1. Click the Recent Saved Queries or Recent Run Queries tab to display the respective queries. - Click the Saved Queries tab. 2. Click a query name. The query is loaded into the Query Editor. ### 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. 1. To execute a portion of the query, highlight one or more query statements. 2. 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**. 3. If there are multiple statements in the query, click Next in the Multi-statement query pane to execute the remaining statements. ### Advanced Query Settings The pane to the left of the Query Editor lets you specify the following options:
| DATABASE | The database containing the table definitions. |
| SETTINGS | Override the Cloudera Impala default settings. To configure a new
setting:
|
| PARAMETERIZATION | Indicate that a dialog box should display to enter parameter values when a query containing the string $parametername is executed. Enabled by default. |
| METASTORE CATALOG | Refresh metadata. It is best to refresh metadata after making changes to databases such as adding or dropping a table. |