Multiple Stringmanipulations and the best practice advice

if its getting “more” complex, i would always opt for the Rule Engine Dictionary.
that way you have your data in, and a second input for your rules.

unfortunately, rule engine is still limited to selective results but cannot do operations (you cannot say: if a is present and b is missing, write Text + b.

Knime has always been lackluster in this regard. Obviously, you can write long or nested if...elseif...else... statements in the Expression Node or Column Expression node (or Java Snippet / Python Snippet) but all of those are lackluster.

there are still plenty of ways to solve this and it heavily depends on your data.
My favorite approach (even if by far not the best performance) is using Row Splitter (I usually prefer Rule Based Row Splitter) and stepwise break the data into smaller chunks and process each chunk. At the end you just concat all small tables together. The nice part about this is that your dataset gets smaller and smaller, but you will always be able to easily catch “new” variations or cases you haven’t considered if your last chunk is not empty

3 Likes