All Products
Search
Document Center

DataWorks:Attach an AnalyticDB for PostgreSQL computing resource

Last Updated:Aug 23, 2025

To develop and manage tasks for your cloud-native data warehouse AnalyticDB for PostgreSQL instance in DataWorks, you must attach the instance as an AnalyticDB for PostgreSQL computing resource. After the resource is attached, you can use it in different DataWorks modules to connect to your AnalyticDB for PostgreSQL instance. This lets you perform operations such as data synchronization and data development.

Prerequisites

  • An AnalyticDB for PostgreSQL instance is created.

    Note

    When you purchase an AnalyticDB for PostgreSQL instance, we recommend that you select the same Region as the DataWorks workspace where you plan to attach the instance as a computing resource. If the regions do not match, you cannot attach the instance to that workspace.

  • A workspace is created in DataWorks. The Resource Access Management (RAM) user who performs the operation is added to the workspace and assigned the Workspace Administrator role.

  • A resource group is attached 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 computing resource.

    • If you use a legacy exclusive resource group, ensure that the exclusive resource group for scheduling can connect to the AnalyticDB for PostgreSQL computing resource in your scenario.

    • 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.

Limits

  • Region limits: China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), China (Hong Kong), Japan (Tokyo), Singapore, Malaysia (Kuala Lumpur), and Indonesia (Jakarta).

  • Permission limits:

    Operator

    Required permissions

    Alibaba Cloud account

    No additional permissions are required.

    RAM user/RAM role

    Only workspace members who have the O&M or Workspace Administrator role, or who have the AliyunDataWorksFullAccess permission, can create computing resources. For more information, see Grant workspace administrator permissions.

Attach an AnalyticDB for PostgreSQL computing resource (New Data Development)

Attach an AnalyticDB for PostgreSQL computing resource to a workspace in the Public Preview of the New DataStudio.

Go to the computing resources page

  1. Log on to the DataWorks console and switch to the destination region. In the navigation pane on the left, choose More > Management Center. On the Management Center page, select your workspace from the drop-down list and click Go To Management Center.

  2. In the navigation pane on the left, click Computing Resources.

Attach the AnalyticDB for PostgreSQL computing resource

On the computing resources page, configure the AnalyticDB for PostgreSQL computing resource.

  1. Select the computing resource type.

    1. Click Attach Computing Resource to open the Attach Computing Resource page.

    2. On the Attach Computing Resource page, set the computing resource type to AnalyticDB for PostgreSQL to open the Attach AnalyticDB for PostgreSQL Computing Resource configuration page.

  2. Configure the AnalyticDB for PostgreSQL computing resource.

    On the Attach AnalyticDB For PostgreSQL Computing Resource configuration page, set 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 that you want to attach. You can also click Create 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 user.

    Computing Resource Instance Name

    Enter a custom name for the computing resource. When a task runs, you can select the computing resource for the task based on this name.

  3. Test the connectivity.

    In the connection configuration section, select the resource group that DataWorks uses to run AnalyticDB for PostgreSQL tasks. Click Test Connectivity to ensure that the resource group can access your AnalyticDB for PostgreSQL instance. For more information, see Network connectivity solutions.

  4. Click Confirm to complete the configuration.

    Note

    Attaching an AnalyticDB for PostgreSQL computing resource automatically creates an AnalyticDB for PostgreSQL data source with the same name in the Data Source module of the workspace.

Attach an AnalyticDB for PostgreSQL computing resource in the legacy Data Development

You can attach an AnalyticDB for PostgreSQL computing resource to a workspace that is not in the Public Preview Of The New DataStudio.

Go to the computing resources page

  1. 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 Data Development and O&M > Data Development. On the page that appears, select the desired workspace from the drop-down list and click Go to Data Development.

  2. In the left navigation pane, click the image icon to open the Computing Resources page.

Attach the AnalyticDB for PostgreSQL computing resource

On the computing resources page, configure the AnalyticDB for PostgreSQL computing resource.

  1. Select the computing resource type.

    1. Click New Computing Resource to open the New Computing Resource page.

    2. On the New Computing Resource page, set the computing resource type to AnalyticDB for PostgreSQL to proceed to the New Computing Resource configuration page.

  2. Configure the AnalyticDB for PostgreSQL computing resource.

    On the New Computing Resource page, set the parameters as described in the following table.

    Parameter

    Description

    Data Source Name

    Enter 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.

    Note

    A computing resource that is attached in Connection String Mode cannot be attached to the current workspace. It can only be created as a data source.

    Alibaba Cloud Account

    Select Current Alibaba Cloud Account.

    Note

    If you use Another Alibaba Cloud Account, enter the account information as prompted on the page.

    Instance

    Select the AnalyticDB for PostgreSQL instance that you want to attach. 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 user.

    Authentication Option

    Select an authentication method to access 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 authentication.

    Truststore Certificate File

    If you use SSL authentication, click Add Certificate File below to upload the .pem file from the certificate folder that you downloaded from the Data Security page of your AnalyticDB for PostgreSQL instance.

  3. Test the connectivity.

    In the connection configuration section, select the resource group that DataWorks uses to run tasks on AnalyticDB for PostgreSQL. Click Test Connectivity to verify that the resource group can access your AnalyticDB for PostgreSQL instance. For more information, see Network connectivity solutions.

  4. Click Create Computing Resource And Attach To Data Development to complete the configuration.

    Note

    When you attach an AnalyticDB for PostgreSQL computing resource, an AnalyticDB for PostgreSQL data source with the same name is automatically created in the Data Source module of the workspace.

Appendix

In Connection String Mode, you cannot attach a resource as a computing resource. You can only attach it as a data source. Use the Connection String Mode to configure data source information for AnalyticDB for PostgreSQL.

Parameter

Description

JDBC URL

Format: jdbc:postgresql://ServerIP:Port/Database.

ServerIP: The internal endpoint of the AnalyticDB for PostgreSQL instance.

Port: The internal port number of the AnalyticDB for PostgreSQL instance. The default value is 5432.

Database: 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 user.

What to do next