I have these tables
I want to replace old ITEMS in table 1 with new ITEMS of table 2 and will create the output table. I 'm currently using the cell replacer node but it didn’t return the new ITEMS from column 2. Any suggestions what nodes i can use for this. Thank you!
Hi @melvinp .
You can use node String Replacer.
is there other node i can use because i don’t have a string replacer (dictionary) on my repository.
I only have these two.
I have created a work flow for you. I have set it up to make is as easy as possible to update and change.
The input table is the input table and it goes straight into the Rule engine node.
The dictionary table is also as you had it, but this connects to a column expressions node. The node makes the rules to apply. You can add or remove any number of lines in this dictionary and it will dynamically still make the rules.
The default rule table, this holds the end default rule for the rule engine.
A side note: I really don’t like that I have had to use another table creator and concatenate to get the final rule in the rule list. Is there another better way?
This node is available for KNIME Analytics Platform version 5.1.0 or higher.
Can you upgrade do 5.2?
@hmfa, hmm maybe i can upgrade to a higher version but i still have to contact out transformation team to seek an approval to upgrade. Are there any nodes i can use aside from the string replacer (dictionary) or any node i can use that are available in version 4.6.2. Thank you!
@FrankColumbo, may i know what’s in the default rule table? I’m just having two table as input tables. Thank you!
Sorry to ear that.
You can follow @FrankColumbo aproach. It acheaves the same results and can be used with several different rules at the same time.
I dont know what you know or dont know - so if i am teaching you to suck eggs - sorry.
The rule engine takes rules and applies them, in this case: $A$ = “3” => “F” and $A$ = “5” => “G”. If the rules dont apply you will end up with a missing value:
unless you use a default rule: TRUE => $B$.
This is hard coded in to the flow because I havent worked out a more elegant way. (see bottom of my last answer).
I made this one for you.
Have a try.
So thankful for your help @FrankColumbo @hmfa
I really appreciate it!
you can design a workflow without using the “Table Manipulator” node
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.