I’d like to replace each word in the same column (which corresponds with SAP code status) , with the corresponding text. But I wonder if there is any direct possibility using a node. I have tried using the string replace dictionary , but it only replaces the cell if it matches with the whole key, not individually.
Then, other way I found out to do that, is by splitting the cell in a list, then ungroup the rows, join tables and then group again. Is there any simple way to do that? I guess a loop could be used, but I’m still studying these topics and I’m not familiarized with it.
Thank you in advance
have a feeling I know what are you looking for but if you share input data and desired output it would make things much easier
Maybe Split, Rule Engine, and Column Aggregator?
ok, I’ll give you one row example:
Lookup table (one value example)
Desired ouput (i just want to replace “code” for “text”)
Hi @Sgomezba , when we ask to share some sample data, it means some data we can work with, that is something we can copy and paste and use, basically it means in text version, not a screenshot where we can’t copy the data from
Hi @Sgomezba !!
In addition to previous proposals I would like to add one more alternative to your case.
You can use Knime text processing nodes for your task. All you need is convert the input column to document type (target to be modified) using ‘String to Document’ node, then you can use a ‘Dictionary Replacer’ and finally, use ‘Document Data Extractor’ node to get the modified text.
Would be helpful if you add a file/workflow with data. Hope it works. Here is a small example.
Text replacement.knwf (25.9 KB)
Maybe you don’t need to re-invent the wheel.
Take a look to this elegant solution suggested by @Iris
sorry @bruno29a , I will take into account for future posts
thanks @cristiancandia and @gonhaddock , you were very helpful
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.