Cell splitter for strings

Hi,
I would like to split a string into its individual characters. But, Cell splitter node forces me to indicate a delimiter.
Is there another way?
Thanks,

Hi,
unfortunately the only way I can think of is the Java Snippet (simple) node. It requires Java coding, but in this case it is very simple. If you use the expression return $yourStringColumn$.split(""); and select String as output type and check the “Array Return” box, KNIME will generate a list of characters. Using a Split Collection Column node you can turn the characters into columns.
Kind regards
Alexander

2 Likes

Or something like that : wordtoletter.knwf (54.2 KB)

4 Likes

Thanks @AlexanderFillbrunn and @Fabien_Couprie.
@Fabien_Couprie, does this node belong to a special library or you made it yourself. It is interesting how it is behaving to give the output?

It’s very simple to build it. Just right click on the component =>“component”=> “open” to see how.
This is my favourite way in Knime for little things you do all the time.

You can put it in your own tool menu in your local workspace to reuse it. (Right click => component => Share).

This version is better and with a summary on the right of your screen.

wordtoletter.knwf (58.4 KB)

Best regards

6 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.