How can I set the Sorter nodes Sort order via flow variable? It expects a boolean array but I don’t see any node that always creating such a boolean array (or any array flow variable).
Something like that could do the trick :demousers.knwf (913.5 KB)
In the group by nodes, note (I have forgotten it in the second case that option “retain row oder” must be activated). But the create collection column of Ipazin is more direct !
First an update, I only have 1 column in the sorter and using a boolean variable can be used to the the sort order and it works BUT:
I simplified the question too much. The core issue is that sorting ASC or DESC is ultimately decided by a different user input. (Regression performance metric: R2 -> sort desc, RMSE -> sort ASC etc). Therefore I would need to set the boolean variable in a Rule engine or Java snippet which doesn’t seem to work (Limitation: knime 4.1.3)
I see. I would take this approach:
where you need to obtain user input in flow variable and transform it to table upon which sorting order is determined in Rule Engine node.
But the rule engine node doesn’t allow generation of boolean column (or variable) because I already tried this with the Rule Engine (Variable) node. The Sorter node for sortOrder requires a boolean or boolean array.
Rule Engine node does create Boolean columns.
$test$ = 2 => TRUE
$test$ = 1 => FALSE
Rule Engine Variable (yet) does not.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.