The Data Catalog provides a unified interface for managing AnalyticDB for MySQL (AnalyticDB for MySQL) metadata. This topic describes how to create and manage table data objects in the Data Catalog.
Open the AnalyticDB for MySQL 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 left-side navigation pane, click the
icon. In the Data Directory tree, click AnalyticDB MySQL to open the AnalyticDB for MySQL Data Catalog management page.
Create an AnalyticDB for MySQL Data Catalog
On the AnalyticDB for MySQL Data Catalog management page, you can add existing AnalyticDB for MySQL data sources as datasets to the Data Catalog.
Click the
icon to the right of the AnalyticDB for MySQL Data Catalog to go to the add instance page.On the DataWorks Data Source tab, add AnalyticDB for MySQL data sources to the Data Catalog.
To manage existing AnalyticDB for MySQL data sources in the current workspace, find the data source on the DataWorks Data Source tab and click Add in the Operation column.
You can also select the checkboxes for multiple AnalyticDB for MySQL data sources on the DataWorks Data Source tab and click Batch Add at the bottom of the list to add them in a batch.
Manage an AnalyticDB for MySQL Data Catalog
You can add and manage table data objects in the AnalyticDB for MySQL Data Catalog.
Create a table
Click the
icon to the left of the AnalyticDB for MySQL instance and find Table under the database.Click the
icon to the right of Table to open the Create Table page.You can generate basic table information and column information by using either of the following methods.
Copilot table creation:
Click Copilot table creation in the toolbar at the top of the page to open the Copilot Chat interface.
Enter a table creation instruction in natural language (for example,
Create a daily user purchase details table).Click Generate and Replace. The system generates a default table name and column information based on your instruction.
If the table name and columns meet your expectations, click Accept.
NoteIf you need to modify some table information, click Accept first and then manually edit the system-generated table information.
Manual table creation:
Create a table based on the following parameter descriptions.
Parameter
Description
Basic information
Specify Table Name, Table Description, and other information.
Column information
Edit columns and column comments.
Manual editing: Click the Insert button above the column information list, specify the number of rows to insert, and then edit column names, column types, and other information.
Copilot intelligent editing: Click Generate Field or Generate field descriptions above the column information list. The system generates relevant columns and descriptions based on the table name and table description that you specified.
After the configuration is complete, click Publish in the toolbar at the top to create the table.
Manage tables
View a table.
After you create a table in the AnalyticDB for MySQL instance, click the
icon to the left of the AnalyticDB for MySQL Data Catalog, and then click Table to view basic table information on the Table list page. You can also click a specific table name to go to the table details page and view details such as columns and DDL.Manage a table.
On the table details page, click the edit button in the upper-right corner. On the table editing page, modify information such as Field and Description. You must click Publish for the changes to take effect.
Delete a table.
On the Table list page, find the table that you want to delete and click Delete in the Operation column. In the dialog that appears, click Confirm to delete the table.
ImportantDeleted tables cannot be recovered. Proceed with caution.
View and remove an AnalyticDB for MySQL Data Catalog
If you no longer need an AnalyticDB for MySQL Data Catalog, you can view and remove it.
View the Data Catalog.
After you add an instance to the AnalyticDB for MySQL Data Catalog, click the
icon to the left of the AnalyticDB for MySQL Data Catalog to view the added AnalyticDB for MySQL instances.Hover over the corresponding AnalyticDB for MySQL instance to view the Cluster ID and Cluster Type information.
Disassociate a project.
If you no longer need to manage a specific AnalyticDB for MySQL Data Catalog, right-click the corresponding AnalyticDB for MySQL Data Catalog and select Disassociate Data Catalog from the context menu.