This topic describes the functions of the Assignment Node. The Assignment Node is a special node type that supports the assignment of output parameters by writing code in the node. The Assignment Node transfers the integrated node context to downstream nodes for reference, which in turn is used as values.
Create an assignment node
Write the logic value of the assignment node
- The value of the output parameter takes only the output from the last line of code
- The output of the SELECT statement on the last line of MaxCompute SQL.
- The data from the ECHO statement on the last line of shell.
- The output of the PRINT statement on the last line of Python.
- The maximum transfer value of the output parameter is 2M. If the assignment statement output value exceeds this limit, the assignment node will fail to run.
Use the assignment node output on the downstream node
An example of assignment node
- Create the business flow, and then create the following nodes as shown in the figure,
- By default, the system will display an Outputs parameter when the assignment node is configured. After the task is run, you can
find the relevant parameter results in the related page.
- The upstream Outputs parameter is used as the downstream input parameter, as shown in the figure below.
Run the assignment node task
- When the task is configured and scheduled, a run instance is generally generated the next day. The following figure is an example of running supplementary data.
- You can view the context input and output parameters, and click the next link to view the input or output results during runtime.
- In the Running Log, you can view the final code output through 'finalResult'.