Without the data catalog, table schemas and field definitions are scattered across individual AnalyticDB for MySQL cluster consoles, making central discovery and governance difficult. With the data catalog in DataWorks, you can browse tables, create and modify schemas, and track cluster metadata — all from within Data Studio.
This topic describes how to add AnalyticDB for MySQL instances to the data catalog and manage table objects.
Open the AnalyticDB for MySQL data catalog
Go to the Workspaces page in the DataWorks console. In the top navigation bar, select a region. Find the workspace you want to use and choose Shortcuts > Data Studio in the Actions column.
In the navigation pane on the left, click the
icon. In the Data Catalog tree, click AnalyticDB for MySQL to open the AnalyticDB for MySQL data catalog management page.
Add an AnalyticDB for MySQL instance to the data catalog
On the AnalyticDB for MySQL data catalog page, add existing data sources as datasets.
Click the
icon to the right of the AnalyticDB for MySQL entry to open the add instance page.On the DataWorks Data Source tab, add one or more data sources:
To add a single data source, find the existing AnalyticDB for MySQL data source in the list and click Add in the Actions column.
To add multiple data sources at once, select them in the list and click Batch Add below the list.
Create a table
Click the
icon to the left of the AnalyticDB for MySQL instance to expand it, then locate Tables under the database.Click the
icon to the right of Tables to open the Create Table page.Generate the table structure using Copilot or configure it manually.
Create a table with Copilot
In the toolbar, click Create Table With Copilot.
Enter a natural language command describing the table. For example:
Create a table for daily user purchase details.Click Generate And Replace. Copilot generates a default table name and field information based on your command.
Review the generated output. If it meets your requirements, click Accept.
NoteTo modify the table information, you can manually edit the system-generated information after you click Accept.
Create a table manually
Configure the following parameters:
Parameter Description Table name A name for the table. Set this in the Basic information section. Table description An optional description of the table's purpose. Set this in the Basic information section. Field information Define the table's fields. Click Insert above the field list to add rows, then specify the field name, type, and other details. Alternatively, click Generate Fields or Generate Field Descriptions to have Copilot generate fields based on the table name and description.
Click Publish in the top toolbar to create the table.
Manage tables
View a table
Click the
icon next to the AnalyticDB for MySQL data catalog entry, then click Tables. The Tables list page shows basic information for each table. Click a table name to open its details page and view its Fields and DDL statement.
Modify a table
Open the table details page and click Edit in the upper-right corner.
On the table editing page, update the Fields, Description, or other information.
Click Publish to apply the changes.
Delete a table
On the Tables list page, find the table and click Delete in the Actions column.
In the dialog box, click Confirm.
This operation cannot be undone. Proceed with caution.
View and detach a data catalog instance
View an instance
Click the
icon next to the data catalog entry to see all added instances. Hover over an instance to view its Cluster ID and Cluster Type.
Detach an instance
If you no longer need to manage an AnalyticDB for MySQL instance through the data catalog, right-click the instance and select Detach Data Catalog from the shortcut menu.