Java Snippet Multiple column addition with multiple column output

Hi Everyone,

I am trying to add different columns to obtain different outputs columns in Java Snippet node.
after writing down my code the node does not execute.
For example in my dataset I have column A, B, C, D, and E and I want to have
Output 1= column A+B+C and Output 2 = D+E
Can someone please help me with this issue? I am a begginer in Java programming language.

Best regards,

Hi @williams99 , welcome to the KNIME community.

Here is a basic java snippet example of what you are describing:

To include the java field names related to each column in the code, double-click the required column (or flow variable) in the panel on the left.
java snippet example.knwf (7.5 KB)

You’ll find further examples on the forum for other examples of java snippets


Hi @takbb

Thank you so much your help.

You’re welcome @williams99.


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