Icon

kn_​example_​if_​switch

Check if column is present and use if-switch accordingly

Using Java and Rule engine and If-Switch to decide if a column is present and active which branch of a workflow should be executed

https://forum.knime.com/t/add-column-if-doesnt-exist/8059/2 https://forum.knime.com/t/if-rule/13502 Using Java and Rule engine and If-Switch to decide if a column is present and active which branch of a workflowshould be executed A + B present$Column Header$ = "B" => 1if B not present = 0 TopactivebranchB not presentif B not present = 0 Top$Column Header$ = "B" => 1activebranch Table Creator ExtractColumn Header Transpose Rule Engine GroupBy Java IF (Table) Table Rowto Variable Java EditVariable (simple) ConstantValue Column Table Creator End IF Java IF (Table) ConstantValue Column Transpose GroupBy Rule Engine Table Rowto Variable Java EditVariable (simple) End IF ExtractColumn Header https://forum.knime.com/t/add-column-if-doesnt-exist/8059/2 https://forum.knime.com/t/if-rule/13502 Using Java and Rule engine and If-Switch to decide if a column is present and active which branch of a workflowshould be executed A + B present$Column Header$ = "B" => 1if B not present = 0 TopactivebranchB not presentif B not present = 0 Top$Column Header$ = "B" => 1activebranchTable Creator ExtractColumn Header Transpose Rule Engine GroupBy Java IF (Table) Table Rowto Variable Java EditVariable (simple) ConstantValue Column Table Creator End IF Java IF (Table) ConstantValue Column Transpose GroupBy Rule Engine Table Rowto Variable Java EditVariable (simple) End IF ExtractColumn Header

Nodes

Extensions

Links