All Products
Search
Document Center

DataWorks:AnalyticDB for PostgreSQL node

Last Updated:Mar 26, 2026

You can use the ADB for PostgreSQL node in DataWorks to develop and schedule AnalyticDB for PostgreSQL tasks, and integrate these tasks with other operations.

DataWorks provides AnalyticDB for PostgreSQL nodes to run SQL tasks against Alibaba Cloud AnalyticDB for PostgreSQL. Use these nodes to write SQL code, schedule periodic runs, and integrate AnalyticDB for PostgreSQL tasks with other node types in your workflow. For more information about AnalyticDB for PostgreSQL, see AnalyticDB for PostgreSQL.

Prerequisites

Before you begin, ensure that you have:

Write SQL code

In the code editor, write SQL statements following AnalyticDB for PostgreSQL SQL syntax.

Use scheduling variables

To pass dynamic values at runtime, define variables in the ${Variable name} format in your SQL code. When the node runs, DataWorks replaces each variable with the value set in the Scheduling Parameters section on the Properties tab. Use this approach when a value changes across scheduled runs — for example, a date partition, a table name, or a filter condition.

Configure scheduling parameter values in the Scheduling Parameters section on the Properties tab in the right-side navigation pane.

The following example creates a table and inserts rows, using ${var} as a dynamic column name:

CREATE TABLE employees (
    id INT PRIMARY KEY,
    name VARCHAR(100),
    age INT,
    department VARCHAR(50)
);
INSERT INTO employees (id, name, age, ${var}) VALUES
(1, 'Alice', 30, 'HR'),
(2, 'Bob', 25, 'Engineering'),
(3, 'Charlie', 35, 'Marketing');
Note
  • In this example, set ${var} to department in the Scheduling Parameters section.

Run the task

  1. On the Debugging Configurations tab, configure the following parameters:

    Parameter Description
    Computing Resource Select the AnalyticDB for PostgreSQL computing resource registered in DataWorks.
    Resource Group Select a resource group connected to the computing resource. For network connectivity requirements, see Network connectivity solutions.
  2. In the upper part of the code editor, click Select DataSource and select the AnalyticDB for PostgreSQL computing resource.

  3. Click Run in the toolbar to run the task.

Schedule, deploy, and monitor

After the task runs successfully in the editor, set up the node for production:

  1. Configure scheduling: On the Properties tab, set the scheduling frequency and other parameters based on your requirements.

  2. Deploy the node: After configuration is complete, deploy the node to make it active. For details, see Deploy nodes.

  3. Monitor runs: After deployment, track the node's run status and history in Operation Center. For details, see Getting started with Operation Center.