This topic describes the resources you must prepare and deploy before running data queries and analysis in the new Notebook.
Billing information
-
The cost of a workspace depends on the total number of compute units (CUs) consumed by Airflow instances and Notebook sessions in that workspace. For the latest pricing, refer to the on-screen prompts during resource configuration.
NoteYou are not charged at purchase time. Billing starts when your Airflow instance or Notebook session consumes CUs.
-
Using AnalyticDB for MySQL incurs charges.
Prepare AnalyticDB for MySQL and access the workspace
-
If you jump directly from the AnalyticDB for MySQL console to the DMS workspace for Notebook development, follow Path 1 to prepare resources.
-
If you manually register AnalyticDB for MySQL in DMS before developing Notebooks, follow Path 2 to prepare resources.
If you have already jumped to the DMS workspace from the AnalyticDB for MySQL console or used the target instance in the DMS workspace, skip the steps for preparing AnalyticDB for MySQL resources.
Path 1: Jump directly to the DMS workspace from the AnalyticDB for MySQL console
-
Purchase an AnalyticDB for MySQL instance.
-
Log on to the AnalyticDB for MySQL console.
-
Click Purchase Instance in the upper-right corner.
-
Configure the required parameters and click Buy Now in the lower-right corner. For more information, see Create an Enterprise Edition or Basic Edition cluster.
NoteWhen configuring the virtual private cloud (VPC), select the same VPC as your workspace.
-
After purchase, view your new cluster in the Cluster List.
-
-
Create a privileged account.
On the Account Management page, click Create Account and configure the required information.
After creation, the account list displays a root account with type Privileged Account and status Active.
-
Create a Job resource group and attach an account.
-
On the Cluster Management > Resource Management page, click Add Resource Group. Configure parameters such as Resource Group Name, Task Type (select Job), and Maximum Compute Resources. For parameter details, see Create a resource group.
-
Click OK. The resource group is created.
-
In the Actions column of the target resource group, click and select the RAM user (sub-account) to attach.
-
-
In the navigation pane on the left, choose .
-
On the prompt page, confirm the following configurations are complete.
-
Bind your current RAM user to the created database account.
NoteIf you use an Alibaba Cloud account (main account), skip this step.
-
Grant the AliyunADBSparkProcessingDataRole permission to your Alibaba Cloud account.
-
The current instance has at least one Job resource group.
-
Configure an OSS Bucket to store Spark application logs for the AnalyticDB for MySQL instance.
NoteOn the page, click Log Configuration and select the default path or a custom storage path. If you choose a custom path, do not save logs in the root directory of the OSS bucket. Ensure the path includes at least one subfolder.
-
-
Click Enter DMS Notebook.
The page automatically redirects to the DMS workspace. You will then be prompted to create a new workspace or use an existing one.
Path 2: Register an AnalyticDB for MySQL instance in DMS and access the workspace
Prerequisites
Procedure
Log in to DMS 5.0.
Move the pointer over the
icon in the upper-left corner of the DMS console and choose . NoteIf you use the DMS console in normal mode, choose in the top navigation bar.
-
On the Instance Management page, click Add and configure the required information.
NoteFor Access Method, select Security Hosting - Manual.
In the Add Instance dialog box, set Database Type to AnalyticDB MySQL 3.0, select Instance Region, set Registration Method to Instance ID, enter the instance ID, and provide the Database Account and Database Password. Then click Submit.
-
After configuration, click Submit.
-
If you already have a suitable workspace, skip creation and click the target workspace name.
Create a workspace
-
If you already have a suitable workspace, skip creation and click the target workspace name.
-
The VPC and region of the workspace must match those of AnalyticDB for MySQL.
-
Click Create Workspace and configure workspace information.
NoteThe Owner is the workspace administrator. You can also change the role type of other members.
In the dialog box, enter a Workspace Name and Workspace Description, select a Region (for example, China (Beijing)), select a VPC ID (if no VPC is available, click Create VPC to create one), and click Confirm.
-
Click Confirm.
Configure resources
You can set a CU limit for the workspace. If CU usage exceeds this limit, workspace resources cannot start.
-
Click the workspace name to enter the workspace.
-
In the lower-left corner of the page, choose .
-
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 jumped to the DMS workspace from the AnalyticDB for MySQL console, DMS has already imported the data source by default. Skip this section.
-
Click the workspace name to enter the workspace. In the navigation pane on the left, click Data Catalog
, then click
. -
On the Data Source Import page, enter the AnalyticDB for MySQL instance name or endpoint to search for the target instance.
-
Click Import in the Actions column of the target instance.
After clicking Import, refresh the data catalog to view the data source. If database details do not appear after import, click
to refresh or sync the dictionary.NoteTo remove the resource from the workspace, on the Data Source Import page, click Remove.
> Storage Management