How to Enable Usage-Based Query Assistance for Hue

Hue can leverage usage statistics for recommendations and risk alerts during query development for Hive and Impala. This includes autocomplete suggestions based on most used (or “popular”) values from SELECT, FROM, JOIN, WHERE, GROUP BY, and ORDER BY queries, so SQL users can easily identify tables and other items of interest. This is particularly useful to discover and prioritize when there are thousands of tables and columns available. It also helps for guessing join conditions based on this usage.

Before queries are submitted, Hue also leverages risk evaluations to help protect against inefficient or resource-heavy queries. Risk alerts and query suggestions are provided within the interface during development.

Both usage statistics and risk evaluations are gathered by Cloudera Navigator Optimizer. Organizations can gain the benefit of statistically derived optimizations by integrating Cloudera Navigator Optimizer with Hue as detailed below.

For more information about Hue Query Assistant with Navigator Optimizer Integration, see the Cloudera Engineering Blog post New in Cloudera Enterprise 5.12: Hue 4 Interface and Query Assistant.

Requirements

Navigator Optimizer is a cloud-based component available only with select Cloudera Enterprise editions. It requires a Cloudera Altus account. To request an Altus account, see the Altus registration page and complete the necessary Altus setup and any other steps needed to obtain an Altus access key and private key. The steps below assume that these have already been obtained and the administrator integrating Hue and Navigator Optimizer has them available during the process.

In addition to the required Altus account, the administrator performing the tasks below must be a Cloudera Manager administrator, that is, have an account that has the Cloudera Manager Full Administrator user role.

Enabling Navigator Optimizer for Hue

To enable Navigator Optimizer for use by the Hue server running on your Cloudera Manager cluster:
  1. Log in to the Cloudera Manager Admin Console.
  2. Select Administration > Altus Credentials. The Add Access Key Authentication page displays.
    1. Enter a meaningful name for the Altus credential.
    2. Enter the access key ID and the private key. For example:

    3. Click Add to save the credentials and dismiss the dialog.
    The credential are now listed on the Altus Credentials page:

    You can now configure Hue to use the credentials.
  3. Select Clusters > Hue.
  4. Click the Configuration tab.
  5. Click Cloudera Navigator Optimizer under the Category filter.
  6. In the Cloudera Altus Access Key drop-down, select your key.
  7. Check Enable Cloudera Navigator Optimizer integration with Hue.

  8. Click Save Changes.
  9. Restart Hue.