This topic uses an ApsaraDB RDS for MySQL instance as an example to explain how to connect DataWorks to a data source within the same Alibaba Cloud account and region.
Use cases
This solution is recommended if your data source and DataWorks workspace meet all of the following conditions:
The data source is an Alibaba Cloud product.
The data source and the DataWorks workspace belong to the same Alibaba Cloud account.
The data source and the DataWorks workspace are in the same region.
How it works
For the same-account, same-region scenario, we recommend that you use a VPC (private network) connection. Deploy the resource group of your DataWorks workspace and the data source in the same VPC to enable network connectivity.
Prerequisites
-
You have an Alibaba Cloud data source that is supported by DataWorks.
-
You have created a workspace.
-
You have created a resource group and bound it to the workspace.
-
Your data source and DataWorks workspace meet the conditions described in Use cases.
Configure network connectivity
Step 1: Get basic information
Data source
-
VPC information:
NoteThis topic uses ApsaraDB RDS for MySQL as an example. For other Alibaba Cloud instances, refer to their official documentation to obtain VPC information.
-
Go to the ApsaraDB RDS console, find the target instance, and click its Instance Name to open the Basic Information page.
-
In the left-side navigation pane, click Database Connection to view the VPC information of the ApsaraDB RDS for MySQL instance (named
VPC 1in this example).
-
DataWorks
-
VPC and vSwitch information of the resource group:
-
Go to the DataWorks resource group list page, find the target resource group, and click Network Settings in the Operation column.
-
Under the relevant module, view the bound VPC and vSwitch CIDR Block.
For example, to synchronize data between ApsaraDB RDS for MySQL and DataWorks, view the corresponding VPC (named
VPC 2in this example) and vSwitch CIDR Block under Data Scheduling & Data Integration.
-
Step 2: Establish network connection
-
If
VPC 1andVPC 2are the same, the data source and the DataWorks resource group are deployed in the same VPC, and network connectivity is established by default. -
If
VPC 1andVPC 2are different, go to the network settings page of the DataWorks resource group, click Add Binding, and bindVPC 1to the resource group. This deploys the DataWorks resource group and the data source in the same VPC.
Step 3: Add to whitelist
If your data source uses a whitelist, add the vSwitch CIDR block of the resource group to the data source's whitelist. This allows the resource group to access the data source.
This topic uses ApsaraDB RDS for MySQL IP whitelist settings as an example. Add the vSwitch CIDR Block of the DataWorks resource group to the Whitelist And Security Group.
For other Alibaba Cloud instances, refer to their official documentation for instructions on adding an IP address to the whitelist.

Verify network connectivity
-
Log on to the DataWorks console. In the target region, click in the left-side navigation pane. Select a workspace from the drop-down list and click Go to Data Integration.
-
In the left-side navigation pane, click Data Sources. On the data source list page, click Add Data Source. Select the appropriate data source type and fill in the connection parameters.
-
In the connection configuration, select the resource group that is connected to the data source, and then click Test Connectivity.
NoteIf the connectivity test result is Failed, you can use the Network Connectivity Diagnostic Tool to resolve the issue yourself. If you still cannot connect the resource group to the data source, please submit a ticket.
Related documents
For frequently asked questions about network connectivity, see Resource group operations and network connectivity.
