How to Use Governance-Based Data Discovery

Hue can use the metadata tagging, indexing, and search features available in Cloudera Navigator data management. After integrating Hue with Cloudera Navigator tags and indexed entities can be accessed and viewed in Hue. You can also tag entities using Hue. Managed metadata and custom metadata tags that are created or applied using Hue can then stored in a Cloudera Navigator instance. This topic shows you how to use metadata tags in Hue.

Integration between Hue and Cloudera Navigator is enabled by default, but if your administrator has disabled it, it must be re-enabled before you can use governance-based data discovery as described below. To enable integration between Hue and Cloudera Navigator, see How to Enable Governance-Based Data Discovery.

Using Governance-based Data Discovery

This short tutorial shows you how to create new metadata tags in Hue and search for them:

Defining Metadata Tags

Prepare Tables for Tagging

As the Hue administrator, install sample tables, and then refresh Impala metadata:
  1. In the Cloudera Manager Admin Console, launch Hue by selecting Clusters > Hue > Hue Web UI > Hue Load Balanced.
  2. In the top right corner of the page, select <user_name> > Hue Administration > Step 2: Examples



  3. Install the sample tables for Hive and Impala by clicking the download icons .
  4. At the top of the page, click Query and then select Editor > Impala to go to the Impala SQL editor, click the refresh icon, select Perform incremental metadata update, and then click Refresh:



  5. In the upper left corner of the page, select the menu icon and then select Browsers > Tables to load the Table Browser.
  6. In the Table Browser, click Refresh on the right side of the page. This ensures that the sample tables are available to work with in Hue.

Tag a Database, Table, and Field

  1. At the top of the Table Browser page, click the table icon to display the Databases page, and then click default or some other database. This loads a detail view of the database
  2. To add a database tag, click Add tags..., enter a tag name in the text box, click Add <tag_name>..., and then click the check on the right to save the tag:



  3. To add a table tag, click the a table name, for example customers, which loads a detail view of the table where you can define a tag:

    1. Click Add tags...:



    2. Enter a tag name in the text box, click Add <tag_name>..., and then click the check on the right to save the tag. This is the same process you performed for tagging the database in Step 2.
  4. To add a field tag:

    1. Click the information icon by a column name:



    2. In the dialog box that opens, click Add tags..., enter a tag name in the text box, click Add <tag_name>..., and then click the check on the right to save the tag.

Now, you have added tags to a database, a table, and a field (column) and you can search using these tag names as described in the next section.

Searching Metadata Tags

The SQL Editor in Hue provides a search text box where you can search on the metadata tags that are associated with your databases, tables, and columns.

You can search for tags in either the Hive or the Impala editors: