To use DataWorks to develop and manage tasks for your AnalyticDB for PostgreSQL instance, you must first associate the instance to DataWorks as an AnalyticDB for PostgreSQL computing resource. Once the resource is associated, you can use it in various DataWorks modules to connect to the AnalyticDB for PostgreSQL instance and perform operations such as data synchronization and data development.
Prerequisites
An AnalyticDB for PostgreSQL instance is created.
NoteWhen you purchase an AnalyticDB for PostgreSQL instance, ensure that it is in the same Region as your DataWorks workspace. Otherwise, you cannot associate the instance to the workspace as a computing resource.
A workspace is created in DataWorks. The Resource Access Management (RAM) user who performs the operation must be added to the workspace and granted the Workspace Administrator role.
A resource group is associated to the workspace, and network connectivity is established.
If you use a Serverless resource group, ensure that the Serverless resource group can connect to the AnalyticDB for PostgreSQL instance.
If you use a legacy exclusive resource group, ensure that the exclusive resource group for scheduling can connect to the AnalyticDB for PostgreSQL instance for your scenario.
The resource group must be in the same Virtual Private Cloud (VPC) as the AnalyticDB for PostgreSQL instance. You must also add the IP addresses of the resource group to the whitelist of the AnalyticDB for PostgreSQL instance.
Limits
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 are required.
Alibaba Cloud RAM user/RAM role
Only workspace members with the O&M and Workspace Administrator roles, or workspace members with the
AliyunDataWorksFullAccesspermission can create computing resources. For more information, see Grant a user the permissions of a workspace administrator.
Associate an AnalyticDB for PostgreSQL computing resource in DataStudio
Associate an AnalyticDB for PostgreSQL computing resource to a workspace that Use Data Studio (New Version).
Go to the computing resources page
Log on to the DataWorks console. Switch to the destination region. In the navigation pane on the left, choose . Select the desired workspace from the drop-down list and click Go To Management Center.
In the navigation pane on the left, click Computing Resource.
Associate the AnalyticDB for PostgreSQL computing resource
On the computing resources page, configure the parameters to associate the AnalyticDB for PostgreSQL computing resource.
Select the type of computing resource to associate.
Click Associate Computing Resource to open the Associate Computing Resource page.
On the Associate Computing Resource page, select AnalyticDB for PostgreSQL as the computing resource type. The Associate AnalyticDB For PostgreSQL Computing Resource configuration page appears.
Configure the AnalyticDB for PostgreSQL computing resource.
On the Associate AnalyticDB For PostgreSQL Computing Resource page, configure the following parameters.
Parameter
Description
Configuration Mode
Select Alibaba Cloud Instance mode.
Alibaba Cloud Account
Select Current Alibaba Cloud account.
Instance
Select the AnalyticDB for PostgreSQL instance to associate. You can also click New in the drop-down menu to create an AnalyticDB for PostgreSQL instance.
Database Name
Enter the name of the database that you use.
Username and Password
The username and password of an account that can be used to access the AnalyticDB for PostgreSQL instance. If you do not have an account, you can create a privileged account.
Computing Resource Instance Name
Specify a custom name for the computing resource. When a task runs, you can select the computing resource for the task based on this name.
Test the connectivity.
In the connection configuration section, select the resource group that DataWorks will use to run AnalyticDB for PostgreSQL tasks. Then, click Test Network Connectivity to verify that the resource group can access your AnalyticDB for PostgreSQL instance. For more information, see Overview of network connection solutions.
Click OK.
NoteWhen you associate an AnalyticDB for PostgreSQL computing resource, the system automatically creates an AnalyticDB for PostgreSQL data source with the same name on the Data Sources page of the current workspace.
Associate an AnalyticDB for PostgreSQL computing resource in legacy Data Development
Associate an AnalyticDB for PostgreSQL computing resource to a workspace that does not use Use Data Studio (New Version).
Go to the computing resources page
Go to the DataStudio page.
Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose . On the page that appears, select the desired workspace from the drop-down list and click Go to Data Development.
In the navigation pane on the left, click the
icon to go to the Computing Resource page.
Associate the AnalyticDB for PostgreSQL computing resource
On the computing resources page, configure and associate the AnalyticDB for PostgreSQL computing resource.
Select the type of computing resource to associate.
Click Create Computing Resource. The Create Computing Resource page appears.
On the Create Computing Resource page, select AnalyticDB for PostgreSQL as the computing resource type. The Create Computing Resource configuration page appears.
Configure the AnalyticDB for PostgreSQL computing resource.
On the Create Computing Resource page, configure the following parameters.
Parameter
Description
Data Source Name
Specify a custom name for the computing resource. When a task runs, you can select the computing resource for the task based on this name.
Configuration Mode
Select Alibaba Cloud Instance Mode.
NoteA computing resource associated in Connection String Mode cannot be associated to the current workspace. It can only be created as a data source.
Alibaba Cloud Account
Select Current Alibaba Cloud Account.
NoteIf you use Another Alibaba Cloud Account, enter the parameter information for the other account as prompted on the page.
Instance
Select the AnalyticDB for PostgreSQL instance to associate. If you have not created an instance, you can create an AnalyticDB for PostgreSQL instance.
Database Name
Enter the name of the database that you use.
Username and Password
The username and password of an account that can be used to access the AnalyticDB for PostgreSQL instance. If you do not have an account, you can create a privileged account.
Authentication Method
Select the authentication method for subsequent access to the AnalyticDB for PostgreSQL instance.
No Authentication: No other operations are required.
SSL Authentication: If you select this authentication method, you must configure SSL encryption for the AnalyticDB for PostgreSQL instance and download the certificate file for subsequent verification.
Truststore Certificate File
When the authentication option is set to SSL authentication, click Add Authentication File below and upload the
.pemfile from the certificate folder that you downloaded from the Data Security page of the AnalyticDB for PostgreSQL instance.Test the connectivity.
In the connection configuration section, select the resource group that DataWorks will use to run AnalyticDB for PostgreSQL tasks. Then, click Test Network Connectivity to verify that the resource group can access your AnalyticDB for PostgreSQL instance. For more information, see Overview of network connection solutions.
Click Create and Associate Computing Resource with DataStudio.
NoteWhen you associate an AnalyticDB for PostgreSQL computing resource, the system automatically creates an AnalyticDB for PostgreSQL data source with the same name on the Data Source page of the current workspace.
Appendix
Connection String Mode does not support associateing a computing resource. You can use Connection String Mode to create a data source, such as an AnalyticDB for PostgreSQL data source.
Parameter | Description |
JDBC URL | Format: ServerIP: The internal network endpoint of the AnalyticDB for PostgreSQL instance. Port: The internal network port number of the AnalyticDB for PostgreSQL instance. The default value is Database: The name of the database that you use. |
Username and Password | The username and password of an account that can be used to access the AnalyticDB for PostgreSQL instance. If you do not have an account, you can create a privileged account. |
What to do next
DataStudio: After you associate the AnalyticDB for PostgreSQL computing resource, you can use a batch synchronization node in Data Development to perform data synchronization and use an ADB for PostgreSQL node to perform data development.
Legacy Data Development: After you associate the AnalyticDB for PostgreSQL computing resource, you can use a node in Data Development to perform data synchronization and create and use an AnalyticDB for PostgreSQL node to perform data development.