To use DataWorks to develop and manage tasks for your AnalyticDB for PostgreSQL instance, you must first associate the instance with DataWorks as an AnalyticDB for PostgreSQL computing resource. After you associate the AnalyticDB for PostgreSQL instance, you can use this computing resource in DataWorks for operations like data synchronization and data development.
Prerequisites
You have created an AnalyticDB for PostgreSQL instance.
NoteWhen you purchase an AnalyticDB for PostgreSQL instance, select the same Region as your DataWorks workspace.
A workspace has been created in DataWorks, and the RAM user performing the operation has been added to the workspace and granted the Workspace Administrator role.
You have associated a resource group with the workspace and established network connectivity.
If you use a serverless resource group, ensure that the serverless resource group can connect to your AnalyticDB for PostgreSQL instance.
If you use a legacy exclusive resource group, ensure that the exclusive resource group for scheduling can connect to your AnalyticDB for PostgreSQL instance.
The resource group must be in the same 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.
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 additional permissions are required.
RAM user/RAM role
To create a computing resource, you must be a workspace member with the O&M or Workspace Administrator role, or have the
AliyunDataWorksFullAccesspermission. For more information, see Grant a user the permissions of a workspace administrator.
DataStudio: Associate an AnalyticDB for PostgreSQL computing resource
This section describes how to associate an AnalyticDB for PostgreSQL computing resource with a Use Data Studio (New Version).
Go to the computing resources page
Log on to the DataWorks console. Switch to the target region, then in the navigation pane on the left, click . Select the target workspace from the drop-down list and click Go to Management Center.
In the navigation pane on the left, click Computing Resources.
Associate an AnalyticDB for PostgreSQL computing resource
On the Computing Resource list page, configure an AnalyticDB for PostgreSQL computing resource.
Select the computing resource type.
Click Associate Computing Resources to go to the Associate Computing Resources page.
On the Associate Computing Resources page, select AnalyticDB for PostgreSQL as the computing resource type to go to the Bind AnalyticDB for PostgreSQL Computing Resource configuration page.
Configure the AnalyticDB for PostgreSQL computing resource.
On the Associate AnalyticDB for PostgreSQL Computing Resource page, configure the parameters as described in the following table.
Parameter
Description
Configuration mode
Select Alibaba Cloud Instance Mode.
Alibaba Cloud account
Select Current Alibaba Cloud Account.
Instance
Select the AnalyticDB for PostgreSQL instance that you want to associate. You can also click Create in the drop-down list 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 for an account that can access the AnalyticDB for PostgreSQL instance. If you do not have an account, you can create a privileged account.
Computing resource name
Enter a name for the computing resource. This name is used to select the resource when you run a task.
Test the connectivity.
In the connection configuration section, select the resource group that DataWorks uses to run AnalyticDB for PostgreSQL tasks, and then click Test Connectivity to verify that the resource group can access your AnalyticDB for PostgreSQL instance. For more information, see Overview of network connection solutions.
Click Confirm to complete the configuration.
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.
Legacy Data Development: Associate an AnalyticDB for PostgreSQL computing resource
This section describes how to associate an AnalyticDB for PostgreSQL computing resource with a workspace that does not 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 open the Computing Resources page.
Associate an AnalyticDB for PostgreSQL computing resource
Select the computing resource type.
Click Create Computing Resource to go to the Create Computing Resource page.
On the Create Computing Resource page, select AnalyticDB for PostgreSQL as the computing resource type to open the Create Computing Resource configuration page.
Configure the AnalyticDB for PostgreSQL computing resource.
On the Create Computing Resource page, configure the parameters as described in the following table.
Parameter
Description
Data source name
Enter a custom name for the computing resource. This name is used to select the computing resource when you run a task.
Configuration mode
Select Alibaba Cloud Instance Mode.
NoteYou cannot associate a computing resource with the current workspace in User-created Data Store with Public IP Addresses; you can only add it as a data source.
Alibaba Cloud account
Select Current Alibaba Cloud Account.
NoteIf you use Connection String Mode, enter the information about the other account as prompted on the page.
Instance
Select the AnalyticDB for PostgreSQL instance that you want to associate. If no instance exists, 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 for an account that can access the AnalyticDB for PostgreSQL instance. If you do not have an account, you can create a privileged account.
Authentication method
Select an authentication method for accessing the AnalyticDB for PostgreSQL instance.
No Authentication: No other operations are required.
SSL Authentication: If you select this method, you must configure SSL encryption for the AnalyticDB for PostgreSQL instance and download the certificate file for subsequent verification.
Truststore certificate file
If you select SSL Authentication, click Add authentication document below and upload the
.pemfile from the certificate folder that you downloaded from the Data Security page of your AnalyticDB for PostgreSQL instance.Test the connectivity.
In the connection configuration section, select the resource group that DataWorks uses to run AnalyticDB for PostgreSQL tasks, and then click Test 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 to complete the configuration.
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.
Appendix
The User-created Data Store with Public IP Addresses supports binding to data sources, but not to computing resources. You can use User-created Data Store with Public IP Addresses to configure an AnalyticDB for PostgreSQL data source.
Parameter | Description |
JDBC URL | Format: ServerIP: The internal endpoint of the AnalyticDB for PostgreSQL instance. Port: The port of the internal endpoint of the AnalyticDB for PostgreSQL instance. Default value: Database: The name of the database that you use. |
Username and password | The username and password for an account that can access the AnalyticDB for PostgreSQL instance. If you do not have an account, you can create a privileged account. |
Next steps
DataStudio: After you associate the AnalyticDB for PostgreSQL computing resource, you can use a batch synchronization node to perform data synchronization or 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 to perform data synchronization or create and use an AnalyticDB for PostgreSQL node to perform data development.