The Metastore Manager application enables you to manage the databases, tables, and partitions of the Hive metastore shared by the (Beeswax and Cloudera Impala Query UI) applications. You can use Metastore Manager to perform the following operations:
Metastore Manager Installation and Configuration
Metastore Manager is one of the applications installed as part of Hue. For information about installing and configuring Hue, see Hue Installation in http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/latest/CDH4-Installation-Guide/CDH4-Installation-Guide.html.
Starting Metastore Manager
Installing Sample Tables
If you want to import your own data instead of installing the sample tables, follow the procedure in Creating Tables.
Creating a Database
- Click .
- Click Create a new database.
- Specify a database name and optional description. Database names are not case-sensitive. Click Next.
- Do one of the following:
- Click the Create Database button.
Although you can create tables by executing the appropriate Hive HQL DDL query commands, it is easier to create a table using the Metastore Manager table creation wizard.
There are two ways to create a table: from a file or manually. If you create a table from a file, the format of the data in the file will determine some of the properties of the table, such as the record and file formats. The data from the file you specify is imported automatically upon table creation. When you create a file manually, you specify all the properties of the table, and then execute the resulting query to actually create the table. You then import data into the table as an additional step.
To browse table data:
In the Table List window, check the checkbox next to a table name and click Browse Data. The table's data displays in the Query Results window.
To browse table metadata:
- In the Table List window, click a table name.
- Check the checkbox next to a table name and click View.
- The table's metadata displays in the Columns tab. You can view the table data by selecting the Sample tab.
- If the table is partitioned, you can view the partition columns by clicking the Partition Columns tab and display the partitions by clicking Show Partitions(n), where n is the number of partitions in the ACTIONS pane on the left.
Importing Data into a Table
When importing data, you can choose to append or overwrite the table's data with data from a file.
- In the Table List window, click the table name. The Table Metadata window displays.
- In the ACTIONS pane, click Import Data.
- For Path, enter the path to the file that contains the data you want to import.
- Check Overwrite existing data to replace the data in the selected table with the imported data. Leave unchecked to append to the table.
- Click Submit.