E-MapReduce (EMR) metadata management lets you create and delete Hive databases and tables directly from the EMR console. This guide covers four operations: creating a database, creating a table, deleting a table, and deleting a database.
Prerequisites
Before you begin, ensure that you have:
An EMR cluster. For more information, see Create a cluster.
Navigate to the metadata management page
All operations described in this guide start from the metadata management page. Complete these steps once before proceeding to any operation.
Log on to the Alibaba Cloud EMR console.
In the top navigation bar, select the region where your cluster resides and select a resource group.
Click the Metadata tab.
Create a database
On the Tables page, click Create Database in the upper-right corner.
In the Create Database dialog box, configure the parameters.
Click OK.
To verify the result, click Tasks.
If Status is Successful, the database is created.
If Status is Failed, click View Details in the Actions column to identify the cause.
Create a table
On the Tables page, click a database.
Click Create Table in the upper-right corner.
In the Create Table dialog box, configure the parameters.
Parameter Description Table Name The name of the table. Delimiter The field delimiter. Select a preset delimiter or select Custom from the Delimiter drop-down list. External Table Creates an external table whose data is stored outside the EMR-managed space. Not selected by default. To create an external table: select the External Table check box, specify a file path, and then click Add Column to configure columns. Enable Partition Mode Partitions the table to improve query performance. Default value: No. To create a partitioned table: set Enable Partition Mode to Yes, and then click Add Partition Column to configure partition columns. Click OK.
To verify the result, click Tasks.
If Status is Successful, the table is created.
If Status is Failed, click View Details in the Actions column to identify the cause.
Delete a table
On the Tables page, click a database.
Find the table you want to delete and click Delete in the Actions column.
In the Delete Table dialog box, click OK.
To verify the result, click Tasks.
If Status is Successful, the table is deleted.
If Status is Failed, click View Details in the Actions column to identify the cause.
Delete a database
Delete all tables in the database before deleting the database.
On the Tables page, click a database.
Find the database you want to delete and click Delete in the Actions column.
In the Delete Database dialog box, click OK.
To verify the result, click Tasks.
If Status is Successful, the database is deleted.
If Status is Failed, click View Details in the Actions column to identify the cause.