The data catalog provides a unified interface to manage metadata for AnalyticDB for MySQL. This topic describes how to create and manage tables 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 to your 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 add an existing AnalyticDB for MySQL data source from the current workspace, find the data source on the DataWorks Data Source tab and click Add in the Operation column.
To add multiple data sources at once, select the checkboxes for the AnalyticDB for MySQL data sources on the DataWorks Data Source tab and click Batch Add at the bottom of the list.
Manage an AnalyticDB for MySQL data catalog
You can add and manage tables 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 the basic information and field information for the table in one of the following ways.
Create a table with Copilot:
In the toolbar at the top of the page, click Copilot table creation to open Copilot Chat.
Enter a command in natural language to create the table. For example:
Create a table for daily user purchase details.Click Generate and Replace. The system generates a default table name and fields based on your command.
If the table name and fields meet your requirements, click Accept.
NoteIf you want to modify the generated information, click Accept and then edit it manually.
Create a table manually:
Create a table based on the parameter descriptions.
Parameter
Description
Basic information
Set the Table Name and Table description.
Field information
Edit fields and field descriptions.
Manual editing: Above the field list, click Insert, specify the number of rows to insert, and then edit the field name, type, and other information.
Copilot smart editing: Click Generate Field or Generate field descriptions above the field list. The system can generate relevant fields and descriptions based on the table name and description you provided.
After you complete the configuration, click Publish in the top toolbar to create the table.
Manage tables
View a table.
After you create a table in an AnalyticDB for MySQL instance, click the
icon to the left of the AnalyticDB for MySQL data catalog and then click Table. On the Table list page, you can view basic information about the table. You can also click a table name to view its details, such as Fields and DDL.Modify a table.
On the table details page, click the Edit button in the upper-right corner. On the table editing page, you can modify the table's Field, Description, and other information. Click Publish to apply your changes.
Delete a table.
On the Table list page, find the table to delete and click Delete in the Operation column. In the dialog box that appears, click Confirm.
ImportantThis action cannot be undone. Proceed with caution.
View and detach the AnalyticDB for MySQL data catalog
You can view details of an AnalyticDB for MySQL data catalog or detach it if it is no longer needed.
View a data catalog.
After you add an instance to the AnalyticDB for MySQL data catalog, you can click the
icon to the left of the data catalog to view the added AnalyticDB for MySQL instances.Hover over the corresponding AnalyticDB for MySQL instance to view its Cluster ID and Cluster Type.
Detach a data catalog.
If you no longer need to manage an AnalyticDB for MySQL data catalog, right-click the corresponding data catalog and select Disassociate Data Catalog.