Associate an AnalyticDB for PostgreSQL instance with a DataWorks workspace as a computing resource to use it for data synchronization and data development tasks.
Prerequisites
Before you begin, make sure you have:
-
An AnalyticDB for PostgreSQL instance in the same region as your DataWorks workspace
-
A DataWorks workspace with your Resource Access Management (RAM) user added and granted the Workspace Administrator role
-
A resource group associated with the workspace, with network connectivity to the AnalyticDB for PostgreSQL instance:
-
Serverless resource group: confirm the Serverless resource group can reach the instance
-
Legacy exclusive resource group: confirm the exclusive resource group for scheduling can reach the instance
-
The resource group must be in the same Virtual Private Cloud (VPC) as the instance, and the resource group IP addresses must be added to the whitelist of the instance
-
Limitations
Supported regions: China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), China (Hong Kong), Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), and Indonesia (Jakarta).
Permissions:
| Operator | Required permissions |
|---|---|
| Alibaba Cloud account | No extra permissions required |
| Alibaba Cloud RAM user/RAM role | O&M and Workspace Administrator roles, or the AliyunDataWorksFullAccess permission. See Grant a user the permissions of a workspace administrator. |
Choose your setup path
The steps differ depending on which version of DataWorks your workspace uses:
| Workspace type | Go to |
|---|---|
| Uses Data Studio (New Version) | Associate a computing resource in DataStudio |
| Does not use Data Studio (New Version) | Associate a computing resource in legacy Data Development |
Associate a computing resource in DataStudio
Follow these steps if your workspace uses Data Studio (New Version).
Go to the computing resources page
-
Log on to the DataWorks console. Switch to the target region. In the left navigation pane, choose More > Management Center. Select your workspace from the drop-down list and click Go To Management Center.
-
In the left navigation pane, click Computing Resource.
Configure and associate the computing resource
-
Click Associate Computing Resource. The Associate Computing Resource page appears.
-
Select AnalyticDB for PostgreSQL as the computing resource type. The Associate AnalyticDB For PostgreSQL Computing Resource configuration page appears.
-
Configure the following parameters.
Parameter Description Required Configuration Mode Select Alibaba Cloud Instance Mode. Yes Alibaba Cloud Account Select Current Alibaba Cloud Account. Yes Instance Select the AnalyticDB for PostgreSQL instance to associate. To create a new instance, click New in the drop-down menu. Yes Database Name Enter the name of the database. Yes Username and Password Credentials for an account that can access the instance. If you don't have one, create a privileged account. Yes Computing Resource Instance Name A custom name for this computing resource. Tasks use this name to select the resource at runtime. Yes -
In the connection configuration section, select the resource group DataWorks will use to run AnalyticDB for PostgreSQL tasks. Click Test Network Connectivity to verify the connection.
If the test fails, check that the resource group IP addresses are added to the whitelist of the AnalyticDB for PostgreSQL instance. For more information, see Overview of network connection solutions.
-
Click OK.
After association, the system automatically creates an AnalyticDB for PostgreSQL data source with the same name on the Data Sources page of your workspace.
Associate a computing resource in legacy Data Development
Follow these steps if your workspace does not use Data Studio (New Version).
Go to the computing resources page
-
Log on to the DataWorks console. In the top navigation bar, select the target region. In the left navigation pane, choose Data Development and O&M > Data Development. Select your workspace from the drop-down list and click Go to Data Development.
-
In the left navigation pane, click the
icon to go to the Computing Resource page.
Configure and associate the computing resource
-
Click Create Computing Resource. The Create Computing Resource page appears.
-
Select AnalyticDB for PostgreSQL as the computing resource type.
-
Configure the following parameters.
Parameter Description Required Data Source Name A custom name for this computing resource. Tasks use this name to select the resource at runtime. Yes Configuration Mode Select Alibaba Cloud Instance Mode. Connection String Mode creates a data source only — it does not associate a computing resource. Yes Alibaba Cloud Account Select Current Alibaba Cloud Account. To use a different account, select Another Alibaba Cloud Account and enter the account details as prompted. Yes Instance Select the AnalyticDB for PostgreSQL instance to associate. If you haven't created one yet, create an AnalyticDB for PostgreSQL instance. Yes Database Name Enter the name of the database. Yes Username and Password Credentials for an account that can access the instance. If you don't have one, create a privileged account. Yes Authentication Method Select the authentication method for subsequent access to the instance: No Authentication (no further steps needed) or SSL Authentication (configure SSL encryption and download the certificate). Yes Truststore Certificate File Appears when SSL Authentication is selected. Click Add Authentication File and upload the .pemfile from the certificate folder downloaded from the Data Security page of the instance.Conditional -
In the connection configuration section, select the resource group DataWorks will use to run AnalyticDB for PostgreSQL tasks. Click Test Network Connectivity to verify the connection.
If the test fails, check that the resource group IP addresses are added to the whitelist of the AnalyticDB for PostgreSQL instance. For more information, see Overview of network connection solutions.
-
Click Create and Associate Computing Resource with DataStudio.
After association, the system automatically creates an AnalyticDB for PostgreSQL data source with the same name on the Data Source page of your workspace.
Appendix: Create a data source using Connection String Mode
Connection String Mode does not support associating a computing resource. Use it only to register a data source.
| Parameter | Description |
|---|---|
| JDBC URL | Format: jdbc:postgresql://ServerIP:Port/Database. ServerIP is the internal network endpoint of the instance. Port is the internal network port number (default: 5432). Database is the database name. |
| Username and Password | Credentials for an account that can access the instance. If you don't have one, create a privileged account. |
What's next
-
DataStudio: Use a batch synchronization node for data synchronization and an ADB for PostgreSQL node for data development.
-
Legacy Data Development: Use a node for data synchronization and create and use an AnalyticDB for PostgreSQL node for data development.