How to Populate the Hue Database

Not every action in the Hue UI touches the Hue database (embedded or custom). This page explains how to populate the database with user account information, Hive queries, and Oozie workflows. This is useful when testing the migration of a database.

  1. Add New User (Alice)
    1. Log on to Hue as the administrator.
    2. Open the Administration drop down sand select Manage Users.
    3. Click Add user and follow the three steps.
      • Add a username (for example, "Alice") and password and click Next.
      • Ensure Alice belongs to the default group and click Next.
      • Give Alice Superuser status (for Hue, not HDFS) and click Add user.
    4. Log out as the administrator and log on as Alice.
  2. Save Hive Query (customers.sql)
    1. Go to About Hue > Quick Start by clicking the Hue logo.
    2. Click the Examples tab ("Step 2").
    3. Click download Hue Download icon BlackHive to install sample databases.
    4. Go to the Metastore Manager (or Data Browser > Metastore Tables).
    5. Click the default database and customers (sample) table.
    6. Click Browse Data Hue Browse Data icon to automatically generate a select * query in the Hive editor.
    7. Run the query with your cursor in the editor and CTRL + Enter, or by clicking the Run icon Hue Run icon.
    8. Save the query as customers.sql by clicking the Save icon Hue Save icon.
    9. View the query on the Saved Queries tab in the Hive editor.
  3. Save Oozie Workflow (Customers Workflow)
    1. Go to Oozie by selecting, Workflows > Editors > Workflows.
    2. Click the Create button.
    3. Rename "My Workflow" as "Customers Workflow" and click the Save icon Hue Workflow Save icon.
    4. Drag the action icon for Saved Hive Query to the field, "Drop your action here."
    5. Select a saved query (customers.sql) from the drop down and click Add.
    6. Save the workflow by clicking the Save Hue Save icon icon.
    7. Submit the workflow by clicking the Hue Submit Job icon icon and clicking Submit. You should see the workflow status change to Hue Job Succeeded icon.
    8. View the saved workflow (and all documents) by clicking the home icon Hue Home icon.