A parameter node is a special type of virtual node. This type of node is used to manage parameters in workflows and transmit parameters between nodes. Parameter nodes can be used to manage constant and variable parameters and transparently transmit parameters of ancestor nodes. Nodes that need to use parameters can obtain parameters from the parameter nodes. This topic describes how to create a parameter node.

Background information

Parameter nodes are actually virtual nodes. They do not run computing tasks. They are mainly used to transmit parameters between nodes and manage parameters in workflows.
  • Parameter transmission between nodes

    If a node in a workflow needs to obtain the output parameters of its ancestor nodes, you can create a parameter node and use it as an ancestor node of the node and a descendant node of the ancestor nodes. Then, add all the parameters required by the node to the parameter node. This way, the node can obtain all the required parameters from the parameter node.

    Parameter transmission between nodesIn the preceding figure, the sql_7 node needs to obtain the output parameters of the sql_1, sql_3, and sql_4 nodes. In this case, you can create a parameter node and use it as a descendant node of the sql_1, sql_3, and sql_4 nodes and an ancestor node of the sql_7 node. Then, add all the parameters required by the sql_7 node to the parameter node. This way, the sql_7 node can directly obtain all the required parameters from the parameter node.
  • Parameter management

    If nodes in a workflow need to use some constant and variable parameters, you can create a parameter node and use it as an ancestor node of those nodes. Then, add all the parameters required by those nodes to the parameter node. This way, those nodes can obtain all the required parameters from the parameter node. The parameter node facilitates the centralized management of all parameters used in the workflow.

    Parameter managementIn the preceding figure, the sql_3, sql_4, sql_5, and sql_7 nodes need to use some parameters. In this case, you can create a parameter node and use it as an ancestor node of the sql_3, sql_4, sql_5, and sql_7 nodes. Then, add all the parameters required by the nodes to the parameter node.

Precautions

If a node needs to use parameters in a parameter node, the node must be a direct descendant node of the parameter node.

Create a parameter node

  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 General > Params Node.
    Alternatively, you can open your desired workflow, right-click General, and then choose Create > Parameter nodes.
  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.

Configure scheduling properties for the parameter node

After the parameter node is created, you can configure scheduling properties for the parameter node based on your business requirements.

Scheduling properties include basic properties, time properties, resource properties, and scheduling dependencies. A parameter node does not run data development tasks. It is used only to manage parameters and transparently transmit parameters. Therefore, you must pay special attention to the scheduling dependencies configured for a parameter node.
  • If a node needs to use the parameters in a parameter node, the node must be a descendant node of the parameter node.
  • Ancestor nodes whose parameters need to be transparently transmitted must be the ancestor nodes of the parameter node.

For more information about how to configure scheduling properties for a parameter node, see Basic properties, Configure time properties, Configure the resource group, and Dependencies.

Add parameters to the parameter node

After you configure scheduling properties for the parameter node, you can add the parameters that you want to manage and transparently transmit to the parameter node for subsequent management and use. This section describes the procedure in detail.

  1. On the right-side parameter node editing tab, click Added parameters.
  2. Specify Parameter name, Type, Valid values, and Description, and click Save.
    Add parametersThe valid values of Type include Constant, Variable, and Pass-through variables.
    • Constant: indicates that the value of the parameter is a constant.
    • Variable: indicates that the value of the parameter is a variable. If you need to use a variable such as the system time, set the value of Type to Variable. For more information about variable parameters, see Scheduling parameters.
    • Pass-through variables: Pass-through variables are used to transparently transmit the output parameters of ancestor nodes to descendant nodes. If you add a parameter of the pass-through variable type, you can set Valid values to an output parameter of ancestor nodes of the parameter node.

What to do next

After you configure the parameter node, descendant nodes can directly use the parameters in the parameter node. This facilitates centralized management of parameters and improves the task development efficiency of descendant nodes.