Create a PostgreSQL public node

Updated at:

PostgreSQL nodes run on PostgreSQL cloud resources and process both PostgreSQL and MaxCompute data. This topic shows you how to create a PostgreSQL public node.

Prerequisites

You have created a PostgreSQL cloud resource. For more information, see Create a cloud resource.

Procedure

  1. Log on to the Data Resource Platform Console.

  2. In the upper-left corner of the page, click the 菜单 icon and select Collaboration.

  3. In the top navigation bar, click the 选择工作组 icon, select the target workgroup, and then click Asset Processing.

    Note

    If you are already on the Asset Processing page, skip clicking Asset Processing.

  4. In the left-side navigation pane, click the image icon and select Public Nodes.

  5. Click the image icon. On the Public Nodes page, click Create Node.

  6. In the Create Node dialog box, select the PostgreSQL node type and click OK.

  7. On the node editor page, configure the node.

    1. In the Node Properties tab on the right, specify the node identifier, node name, and node description.

      Parameter

      Description

      node name

      A customizable name for the node.

      node identifier

      A unique identifier for the node. It must be unique within the same workgroup.

      Public Node Version

      The initial version is Beta (development). The version number increments with each subsequent release.

      node directory

      The directory where the node is located.

      node description

      A description to help you identify and manage the node.

    2. In the editor, enter the SQL statement and click the 保存 icon.

    3. In the Confirm Node Information dialog box, verify that the node identifier, node name, and node directory are correct, and then click Confirm.

    4. On the Run Configuration tab on the right, select the development compute engine for the node.

    5. If your code uses input tables, output tables, or node variables, you must define them as parameters for the node. You can add the parameters manually, or click the 解析 icon in the editor to parse them automatically.

      The following steps use automatic parsing as an example. The parameters are described in the following table.

      1. Click the 解析 icon in the editor. The automatically parsed inputs, outputs, and node variables are displayed on the Run Configuration tab.

      2. Turn on the switch image.png next to Node Input to view the node input.

      3. Next to Node Output, turn on the image.png switch to view the node output.

      4. Enter values for the node variables.

        Parameter

        Description

        Node Input

        Input Identifier

        The identifier for the input variable. You can customize this based on the script content, for example, Input.

        data structure

        Select the logical table that defines the data structure for the input. This specifies the table structure in the cloud resource that provides the data.

        • Ensure the selected data model matches the output data model of the upstream node.

        • Select an asterisk (*) to allow any data structure. Use this for tables that do not have a defined data model.

        Node Output

        Output Identifier

        The identifier for the output variable. You can customize this based on the script content, for example, Output.

        data structure

        Select the logical table that defines the data structure for the output. This specifies the table structure in the cloud resource that receives the output data.

        • Ensure the node's output model matches the input data model of the downstream node.

        • Select an asterisk (*) to allow any data structure. Use this for tables that do not have a defined data model.

        node variable

        variable name

        A customizable name for the variable.

        variable value

        The value of the variable. The type is String.

        Variable description

        The description of the variable.

    6. In the node editor, click the 保存 icon in the upper-left corner.

    7. Click the 运行 icon. In the Node Variables dialog box, verify that the parameter types and default values are correct, and then click OK.

      Note

      If no parameters are parsed, the Node Variables dialog box does not appear after you click the Run icon.

    8. Check the run results and log. The message "Current task status:SUCCESS" indicates that the public node ran successfully.