Before you can query and analyze data in the Notebook, set up an AnalyticDB for MySQL instance and configure a DMS workspace with compute resources.
Billing
Workspace costs come from two sources:
| Cost source | Trigger | Details |
|---|---|---|
| Airflow instances and Notebook sessions | Billing starts when Airflow instances or Notebook sessions consume compute units (CUs). No charge when you purchase resources. | For unit prices, see the pricing information on the resource configuration page. |
| AnalyticDB for MySQL instance | Billing starts when you purchase the instance. | See Billing. |
You can set a CU limit for the workspace. If CU usage exceeds the limit, resources in the workspace cannot be started.
Choose your setup path
Select the path that matches your situation:
| Path | Use this path if... |
|---|---|
| Path 1: Redirected from the AnalyticDB for MySQL console | You are being redirected from the AnalyticDB for MySQL console to a DMS workspace |
| Path 2: Adding an instance manually in DMS | You already have an AnalyticDB for MySQL instance and want to add it in DMS yourself |
If you have already been redirected from the AnalyticDB for MySQL console to a DMS workspace, or have used the target instance in a DMS workspace before, skip the AnalyticDB for MySQL resource preparation steps.
Path 1: Redirected from the AnalyticDB for MySQL console
Step 1: Purchase an AnalyticDB for MySQL instance
Log on to the AnalyticDB for MySQL console.
In the upper-right corner, click Buy Instance.
Configure the parameters and click Buy Now in the lower-right corner. For details, see Create an Enterprise Edition or Basic Edition cluster.
When configuring the virtual private cloud (VPC) parameter, select the same VPC as the workspace.
After the purchase completes, view the new cluster in the Cluster List.
Step 2: Create a privileged account
On the Accounts page, click Create Account and configure the required information.

Step 3: Create a Job resource group and attach an account
Go to Cluster Management > Resource Management > Resource Groups, then click Create Resource Group.
Configure Resource Group Name, Job Type (select Job), and Maximum Clusters. For parameter details, see Create a resource group.
Click OK. The resource group is created.
In the Actions column of the resource group, choose More > Associate with Account and select the Resource Access Management (RAM) user to attach.
Step 4: Complete required configurations
In the navigation pane, choose Job Development > Notebook Development. On the page that appears, complete the following:
Attach the database account to the RAM user you are currently logged in with.
Skip this step if you are using an Alibaba Cloud account to access the console.
Grant the AliyunADBSparkProcessingDataRole permission to the Alibaba Cloud account you are logged in with.
Confirm that the instance has at least one Job resource group.
Configure an OSS bucket to store Spark application logs.
On the Job Development > Spark JAR Development page, click Log Settings and select a default path or a custom storage path. If you use a custom path, the path cannot be the OSS root directory — it must contain at least one folder.
Step 5: Go to DMS workspace
Click Go to DMS Workspace. The page automatically redirects to a DMS workspace. DMS imports the data source automatically — you do not need to import it manually. From there, create a new workspace or select an existing one.
Path 2: Adding an instance manually in DMS
Prerequisites
Before you begin, ensure that you have:
Add the instance
Log on to the DMS console V5.0.
Move the pointer over the
icon in the upper-left corner and choose All Features > Data Assets > Instances.In normal mode, choose Data Assets > Instances in the top navigation bar.
On the Instance Management page, click New and configure the parameters.
Set Access mode to Enable.
Click Submit.
Enter a workspace. If you already have a workspace that meets your requirements, click its name instead of creating a new one.
Create a workspace
If you already have a workspace that meets your requirements, click its name — no need to create one. The VPC and region of the workspace must match those of the AnalyticDB for MySQL instance.
Click Create Workspace and configure the workspace information.
The Owner field designates the workspace administrator. Role types for other members can be changed after creation.

Click Confirm.
Configure resources
Click the workspace name to enter it.
In the lower-left corner, choose
> Workspace Management.Click the Resource Configuration tab.
In the Workspace resource configuration section, or on the right side of the page, click Resource Configuration.
In the Resource configuration panel, configure CU configuration.
Click Create and complete the purchase.
Import a data source
If you used Path 1 (redirected from the AnalyticDB for MySQL console), DMS has already imported the data source automatically. Skip this section.
Click the workspace name to enter it. In the data catalog on the left, click the
icon, then click the
icon.On the Import Data Source page, enter the name or endpoint of the AnalyticDB for MySQL instance to find it.

In the Actions column of the instance, click Import.
After clicking Import, wait a moment and then refresh the data catalog to see the data source. If no database information appears, click the
icon to refresh or sync the dictionary.

To remove a data source from the workspace, click Remove on the Import Data Source page.