DataWorks supports ADB for PostgreSQL nodes. You can create an ADB for PostgreSQL node in the DataWorks console to build an online extract, transform, load (ETL) process.

Prerequisites

  • DataWorks Standard Edition or higher is activated.
  • An AnalyticDB for PostgreSQL instance is bound to the workspace where you want to create an ADB for PostgreSQL node. The AnalyticDB for PostgreSQL service is available in a workspace only after you bind an AnalyticDB for PostgreSQL instance to the workspace on the Workspace Management page. For more information, see Configure a workspace.
  • An exclusive resource group for scheduling is added. For more information, see Create an exclusive resource group for scheduling.
    Note ADB for PostgreSQL nodes can run only on exclusive resource groups for scheduling.

Background information

ADB for PostgreSQL nodes are used to connect to AnalyticDB for PostgreSQL of Alibaba Cloud. For more information, see AnalyticDB for PostgreSQL.

Procedure

  1. Go to the DataStudio page.
    1. Log on to the DataWorks console.
    2. In the left-side navigation pane, click Workspaces.
    3. In the top navigation bar, select the region where your workspace resides, find the workspace, and then click Data Analytics in the Actions column.
  2. On the DataStudio page, move the pointer over the Create icon icon and choose AnalyticDB > ADB for PostgreSQL.
    Alternatively, you can click a workflow in the Business process section, right-click AnalyticDB for PostgreSQL, and then choose New > ADB for PostgreSQL.
  3. In the Create Node dialog box, set the Node Name and Location parameters.
    Note The node name must be 1 to 128 characters in length and can contain letters, digits, underscores (_), and periods (.).
  4. Click Commit.
  5. Configure the ADB for PostgreSQL node.
    1. Select a connection from the Select data source drop-down list.
      Notice
      • When you bind an AnalyticDB for PostgreSQL instance to the workspace, DataWorks automatically creates a connection to the instance.
      • You can select only a connection that is configured by using a connection string.
    2. Write the SQL statements of the node.
      After you select a connection, write SQL statements based on the syntax that is supported by AnalyticDB for PostgreSQL.
    3. Click the Save icon icon in the toolbar to save the SQL statements to the server.
    4. Click the Run icon icon in the toolbar to execute the SQL statements you have saved.
      When you run the node for the first time, the Parameters dialog box appears. You must select a resource group for running the node from the Scheduling Resource Group drop-down list, set other parameters as required, and then click Confirm.
      When you run the node later, the system uses the resource group and parameter settings that you specify for the first running of the node. If you need to change the resource group or modify the parameter settings, click the Advanced run (run with parameters) icon icon in the toolbar.
      Note To access a data store in a virtual private cloud (VPC), a node must be run on an exclusive resource group for scheduling. In this example, you must select an exclusive resource group for scheduling that is connected to the AnalyticDB for PostgreSQL instance.
  6. On the node configuration tab, click the Scheduling configuration tab in the right-side navigation pane. On the Scheduling configuration tab, set the scheduling properties for the node. For more information, see Basic properties.
    You must select an exclusive resource group for scheduling that is connected to the AnalyticDB for PostgreSQL instance to periodically run the node.
  7. Save and commit the node.
    Notice You must set the Rerun and Parent Nodes parameters before you can commit the node.
    1. Click the Save icon in the toolbar to save the node.
    2. Click the Commit icon in the toolbar.
    3. In the Commit Node dialog box, enter your comments in the Change description field.
    4. Click OK.
    In a workspace in standard mode, you must click Deploy in the upper-right corner after you commit the node. For more information, see Deploy nodes.
  8. Test the node. For more information, see View auto triggered nodes.