Conditional Propagate¶
Propagates one input or the other depending on a configurable predicate function.
Documentation¶
This node takes a configurable predicate function (a function that returns True or False) from the configuration and uses it to decide which input to return to the output.
The function is applied to the input data for the node. So for example if
the input port is connected to a table port the argument of the lambda will
be a sympathy.api.table.File. Have a look at the Data type
APIs to see what methods and attributes are available on the
data type that you are working with.
If the lambda function returns True, the data from the first port is written to the output, otherwise the data from the second port is written to the output.
Definition¶
Input ports¶
- true
Type: <a>Description: First, returned if predicate held true- false
Type: <a>Description: Second, returned if predicate did not hold true- data
Type: <b>Description: Data for the predicate comparison
Output ports¶
- output
Type: <a>Description: Output, First if the predicate holds true otherwise Second
Configuration¶
- Condition function (predicate)
Function, called with data to determine which input to output. Should return a boolean
Examples¶
Example flows demonstrating this node:
Implementation¶
- class node_filter_list.ConditionalPropagate[source]