KNIME Java Snippet Nodes version 4.3.0.v202011191508 by KNIME AG, Zurich, Switzerland
Manipulates or defines values of variables like search and replace, capitalize or remove leading and trailing white spaces.
Examples:
To remove leading and trailing blanks from a variable with name
c0
you would use the expression:
strip($${Sc0}$$)
If you have your customer names in flow variable
names
with titles Mr and Mister and you
want to normalize the data so that
only Mr is used you could
use the expression:
replace($${Snames}$$, "Mister", "Mr")
or you could combine it to
replace(replace($${Snames}$$, "Mister", "Mr"), "Miss", "Ms")
Or if you want to have the number of characters of the strings
in a
variable with name
text
:
length($${Stext}$$)
Note that strings which are part of the expression and are not from the input data (or the result of another wrapped function call) need to be enclosed in double quotes ('"'). Additionally, if the string contains a quote character, it must be escaped using a backslash character ('\"'). Finally, other special characters such as single quotes and backslashes need to be escaped using a backslash. For instance, a single backslash in a string is written as two consecutive backslash characters; the first one acts as the escape character for the second.
To use this node in KNIME, install KNIME Javasnippet from the following update site:
A zipped version of the software site can be downloaded here.
You don't know what to do with this link? Read our NodePit Product and Node Installation Guide that explains you in detail how to install nodes to your KNIME Analytics Platform.
You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.
Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com, follow @NodePit on Twitter, or chat on Gitter!
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.