Configure runtime parameters

Updated at:

You can configure runtime parameters to assign values to variables in an offline task. During node scheduling, the system automatically replaces these parameters with their values. This topic explains how to configure and use node parameters, using a MaxCompute SQL task as an example.

Procedure

  1. In the top navigation bar of the Dataphin homepage, choose Develop > Data Development.

  2. In the top navigation bar of the Development page, select a project. If you are in Dev-Prod mode, you also need to select an environment.

  3. In the left-side navigation pane, choose Data Processing > Compute Task.

  4. In the computing task list, click the target computing task to open its configuration tab.

  5. In the right-side panel, click Properties to open the Properties panel. In the Runtime Parameters section, configure the following parameters.

    • Input Parameters

      Note
      • If you reference a global variable that has permission management enabled, the system automatically checks your permissions. Global variables for which you do not have permissions are marked with an image icon. You can click Apply for Permissions to go to the Permission Management > Variable Permission Management page and request permissions.

      • If the computing task references an offline computing template that contains variables, the system pre-fills the type and value of the input parameters based on the template's Properties > Task Parameters configuration. You can modify these values.

      The system displays parameters that you configured in the computing task by using the ${variable_name} expression in the Runtime Parameters section. You can modify the parameter type and assign a value in the list of runtime parameters.

      Parameter

      Description

      Parameter Name

      The name of the parameter as defined in the code editor. The name can contain only letters, digits, and underscores (_) and must be no more than 32 characters long.

      Parameter Type

      The parameter type can be Global Variable, Workspace Name Variable, Local Variable, Cross-node Variable, or Non-variable. For more information, see Variable categories.

      You can select multiple parameters or click Select All, and then click Modify Parameter Type at the bottom of the list to change the parameter type for all selected parameters in bulk.

      Parameter Value

      • Global Variable: The value defaults to the one defined for the global variable and cannot be modified. For more information, see Variable groups and global variables.

      • Workspace Name Variable: The parameter value is the name of the workspace.

      • Local Variable: The value can be up to 256 characters long or left empty. If you need to enter a date or time, you can select or refer to the expressions in the list. For more information, see Variable assignment.

      • Cross-node Variable: After you configure upstream dependencies, you can select a cross-node output parameter from an upstream node as the parameter value.

      • Non-variable: Value assignment is not supported.

    • Cross-node Output Parameters

      Important
      • Cross-node output parameters can only be defined for Python, SQL, and Shell computing tasks.

      • The input parameters of integration tasks, computing tasks, normal or hierarchical dimension logic tables, and fact logic tables support cross-node variables.

      These are variable parameters that are passed to the immediate downstream nodes of the current node. You must declare them in this list beforehand. The system ignores any output variables not declared here. If a declared variable is not assigned a value in the code, the system uses its configured default value. In the code editor, you can right-click and choose Set Cross-node Parameters to assign a value to a variable parameter.

      Note
      • To add multiple cross-node output parameters, click + Add Parameter.

      • The list of cross-node output parameters supports bulk operations. After you select one or more parameters, you can click image.png to delete them.

      Parameter

      Description

      Parameter Name

      The name can be up to 32 characters long and can contain only letters, digits, and underscores (_).

      Parameter Description

      A brief description of the parameter, up to 128 characters long.

      Default Value

      • The default value used when the variable is not assigned a value. To learn how to assign a value to a cross-node output parameter, see Assign values to cross-node output parameters.

      • If you backfill data for a downstream node without including its upstream node, the node attempts to retrieve the parameter value from the upstream node's recent run records (within the last N days). If no recent record is found, the node uses the default value. By default, N is 15 days.

      • When you backfill data, we recommend that you select both the upstream and downstream nodes. If the code in the upstream node does not assign a value to the cross-node parameter, the downstream node uses the default value.

  6. Click OK to complete the configuration of the runtime parameters for the computing task.