Create an AnalyticDB PostgreSQL public node

Updated at:

An AnalyticDB PostgreSQL node uses an AnalyticDB PostgreSQL cloud computing resource to process data from both AnalyticDB PostgreSQL and MaxCompute. This topic describes how to create an AnalyticDB PostgreSQL public node.

Background

Before you begin, make sure that you have created an AnalyticDB PostgreSQL cloud computing resource. For instructions, see Create a cloud computing 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 menu bar, click the 选择工作组 icon, select the target workspace, 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 node.

  5. Click the image icon. On the public node page, click create node.

  6. In the create node dialog box, select the AnalyticDB PostgreSQL node type and click OK.

  7. On the node editing page, configure the following settings.

    1. On the node properties tab on the right side of the page, specify the node identifier, node name, and node description.

      Parameter

      Description

      node name

      A customizable name for the node.

      node identifier

      A unique, customizable identifier for the node within the workspace.

      public node version

      Defaults to the development version (Beta) on creation. The version number increments with each publish.

      node directory

      The directory where the node is located.

      node description

      A description that helps users understand and find the node.

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

    3. (Optional) To use a user-defined function in the SQL statement, click the reference functions tab, find the required function in the list, and then return to the editor to enter it. If the function list is empty, you must create a function first. For more information, see Create a user-defined function.

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

    5. Click the runtime configuration tab on the right side of the page and select a development computing engine.

    6. (Conditionally required) If your code contains input tables, output tables, or node variables, you must manually add the node inputs, node outputs, and node variables. Alternatively, you can click the 解析 icon in the editor to automatically parse the inputs, outputs, and variables of the public node.

      The following steps demonstrate automatic parsing.

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

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

      3. Turn on the image.png switch next to node output to view the node output.

      4. Specify the 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.

        input data structure

        The data format for the input table, defined by a data model. Select the logical table that specifies the input schema for this computing resource.

        • If you select a data table, ensure that its data model matches the output data model of the upstream node.

        • An asterisk (*) indicates an arbitrary data structure, used for operations on tables without a data model.

        node output

        output identifier

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

        output data structure

        The data format for the output table, defined by a data model. Select the format that specifies the output schema for this computing resource.

        • If you select a data table, ensure that the node's output data model matches the input data model of the downstream node.

        • An asterisk (*) indicates an arbitrary data structure, used for operations on tables without a data model.

        node variable

        variable name

        The name of the algorithm variable. You can customize the name.

        variable value

        The value of the variable. The value must be a string.

        variable description

        A description of the variable.

    7. On the node editing page, click the 保存 icon in the upper-left corner.

    8. Click the 运行 icon. In the node variable dialog box, verify the parameter types and default values, and then click OK.

      Note

      If no parameters are parsed, the node variable dialog box does not appear after you click the run icon.

    9. View the run result and log. If the message "Current task status:SUCCESS" appears, the public node ran successfully.

Next steps

After creating the node, publish it for use in production. For instructions, see Publish a public node.