KNIME JPython Scripting nodes version 4.1.0.v201911110939 by KNIME AG, Zurich, Switzerland
Executes a JPython script, taking 1 input DataTable and returning 1 output DataTable. A simple example script is included (but commented out) in the dialog's text window of the Script tab.
Currently employs jython v2.2.1.
dts = inData0.getDataTableSpec() input1ColumnIndex= dts.findColumnIndex("H atoms")
iterator = inData0.iterator() while iterator.hasNext(): row = iterator.next() ...
iterator = inData0.iterator() while iterator.hasNext(): row = iterator.next() outContainer.addRowToTable(row)
dts = inData0.getDataTableSpec() shoeSizeColumnIndex= dts.findColumnIndex("Size of Shoe")
dts = inData0.getDataTableSpec() petNamesColumnIndex= dts.findColumnIndex("Name of Pet") iterator = inData0.iterator() row = iterator.next() current_name = str(row.getCell(petNamesColumnIndex))Example use to obtain the floating-point value from a row for a particular column:
dts = inData0.getDataTableSpec() petWeightColumnIndex= dts.findColumnIndex("Weight of Pet") iterator = inData0.iterator() row = iterator.next() current_name = float(str(row.getCell(petWeightColumnIndex)))
dts = inData0.getDataTableSpec() sunshineColumnIndex= dts.findColumnIndex("Days of Sunshine")
To use this node in KNIME, install KNIME Jython Scripting (Legacy) from the following update site:
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 firstname.lastname@example.org, 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.