Assert¶
This Node takes in an expression. It evaluates the expression and based on the results sends the execution to the first or the second output Node
Input¶
It accepts a DataFrame as input from the previous Node
Output¶
The incoming DataFrame is sent to the output. Only one of the output Nodes receives the DataFrame based on the results of the expression
Type¶
transform
Class¶
fire.nodes.etl.NodeAssert
Fields¶
Name |
Title |
Description |
|---|---|---|
expression |
Expression |
Expression to be evaluated. It can use variables computed in the previous Nodes |
Details¶
Assert Node Details¶
The Assert Node evaluates the specified expression and based on the Boolean result sends the data to either the first output node or the second output bode.
If expression evaluates to true then first output Node will display the dataframe records otherwise it will display records on the second output node.
The expression can contain variables generated by the execution of the previous nodes. One such node is the Count node. It would generate a variable with a value equal to the number of rows in the Dataframe which can be then evaluated in the Assert node.
Examples¶
Assert Node Example¶
Assume that we have used a Count Node before the Assert node which stores the output in the variable ‘Count’
In the Assert node Expression field , we have the expression value set as Count > 100
If the expression evaluates to true, the output would go to the first edge of the Assert node.
If the expression evaluates to false, the output would go to the second edge of the Assert node.