The data catalog provides a unified interface to manage and perform operations on MaxCompute metadata. This topic describes how to create and manage data objects, such as tables, views, foreign tables, resources, and functions, in the data catalog.
Limits
If you use a Resource Access Management (RAM) user or a RAM role to view MaxCompute data in the data catalog, you must first obtain the required MaxCompute permissions. If the Layer 3 model is enabled for the MaxCompute data source or project, you must also grant the RAM user or RAM role permission to view schema metadata.
If a MaxCompute project contains multiple schemas, you must grant metadata permissions for all schemas to view the complete schema list on the project details page in the data catalog.
Grant permissions to a RAM user:
GRANT DESCRIBE ON SCHEMA <Schema_Name> TO USER RAM$<Alibaba_Cloud_Account_Name>:<RAM_User_Name>;Grant permissions to a RAM role:
GRANT DESCRIBE ON SCHEMA <Schema_Name> TO USER `RAM$<Alibaba_Cloud_Account_Name>:role/<RAM_Role_Name>`;After you enable the schema feature for a MaxCompute project, you can manage schemas and manage object tables.
Go to the MaxCompute data catalog page
Go to the Workspaces page in the DataWorks console. In the top navigation bar, select a desired region. Find the desired workspace and choose in the Actions column.
In the navigation pane on the left, click the
icon. In the DATA CATALOG tree, click MaxCompute to go to the MaxCompute data catalog management page.
Create a MaxCompute data catalog
On the MaxCompute data catalog management page, you can add existing MaxCompute projects as datasets to the data catalog.
Click to the icon next to the MaxCompute data catalog.
You can add a MaxCompute project in one of the following ways.
Target source
Method
A MaxCompute data source created in the current workspace
On the DataWorks Data Source tab, find the target data source and click Add. To add multiple data sources at once, select them and click Batch Add.
A MaxCompute project created in the MaxCompute console
On the MaxCompute-Project tab, find the target project and click Add. To add multiple projects at once, select them and click Batch Add. You can also click Create Project to manually add a new MaxCompute project.
For information about internal project configuration items, see MaxCompute project configuration parameters. For information about foreign project operations, see MaxCompute data lakehouse.
ImportantMetadata synchronization has a latency of 10 to 20 seconds. After you create a project, wait a moment and then manually refresh the list to view the latest information.
Manage a MaxCompute data catalog
You can add and manage data objects, such as schemas, tables, and views, in the MaxCompute data catalog.
MaxCompute object | View | Create |
Schema | ||
Table | ||
Extenal Table | ||
Object Table | ||
View | ||
Materialized View | ||
Delta Live Materialized View | ||
Resource | ||
Function |
The schema level is displayed in the data catalog only after you enable the schema feature for MaxCompute. For more information, see Schema operations.
Manage schemas
Create a schema.
Click the
icon to the right of the MaxCompute project. In the Create Schema dialog box that appears, enter a name and press Enter.View a schema.
After you add a schema to a MaxCompute project, you can click the
icon to the left of the project to view the added schema.Delete a schema.
If you no longer need to manage a schema, you can right-click the target schema and select Delete.
ImportantThis operation cannot be undone. Proceed with caution.
Before you delete a schema, you must delete the data objects within it, such as tables and views.
Manage tables
Manage external tables
Manage object tables
You can manage object tables only in MaxCompute projects where the schema feature is enabled.
Manage views
Manage materialized views
Manage delta live materialized views
Manage resource data objects
View and remove a MaxCompute data catalog
If you no longer need to use a MaxCompute data catalog, you can view and remove it.
View a project.
After you add a project to the MaxCompute data catalog, you can click the
icon to the left of the data catalog to view the project.Hover your mouse over the MaxCompute project to view its storage usage and other related information.
Remove a project.
If you no longer need to manage a MaxCompute project, right-click the target project and select Remove.