map_output
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Description
Maps outputs to FlowNode, indicating that the pp_output_index output of pp is sent to the node_output_index output of FlowNode and then the mapped FlowNode is returned.
This method is optional. If this method is used, the outputs of FlowNode and pp are mapped in sequence by default.
Prototype
1 | map_output(node_output_index, pp, pp_output_index) |
Parameters
Parameter |
Data Type |
Description |
|---|---|---|
node_output_index |
int |
Output index of FlowNode. |
pp |
Union[GraphProcessPoint, FuncProcessPoint] |
pp mapped from FlowNode. The value can be GraphProcessPoint or FuncProcessPoint. |
pp_output_index |
int |
Output index of pp. |
Returns
None is returned in normal scenarios.
The DfException exception is reported in abnormal scenarios. You can catch DfException and retrieve its error_code and message attributes to check the specific error code and error details. For details, see DataFlow Error Codes.
Examples
1 2 3 4 5 6 7 8 9 10 | import dataflow as df pp = df.FuncProcessPoint(...) flow_node = df.FlowNode(input_num=2, output_num=2) flow_node.add_process_point(pp) flow_node.map_input(0, pp, 0) flow_node.map_input(1, pp, 1) flow_node.map_output(0, pp, 1) flow_node.map_output(1, pp, 0) # Construct an edge relationship. flow_node_out = flow_node(data, data1) |
Constraints
None