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:
Continue reading:
Defining Metadata Tags
Prepare Tables for Tagging
- In the Cloudera Manager Admin Console, launch Hue by selecting Clusters > Hue > Hue Web UI > Hue Load Balanced.
-
In the top right corner of the page, select <user_name> > Hue Administration > Step 2: Examples
- Install the sample tables for Hive and Impala by clicking the download icons .
-
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:
- In the upper left corner of the page, select the menu icon and then select Browsers > Tables to load the Table Browser.
- 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
- 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
-
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:
-
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:
-
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. This is the same process you performed for tagging the database in Step 2.
-
-
To add a field tag:
-
Click the information icon by a column name:
- 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:
- Go to Query Editor > Impala.
-
To locate the tags you created, in the metadata search box located just to the right of the Query drop-down menu, type a tag name:
After you type the tag name in the search box, the <database>.<table> where the tag is found is returned. Click the <database>.<table> to view the tags that have been defined for it.