The node brings significant performance improvements over the nodes of the legacy KNIME Python Integration and enables working with larger-than-memory data. More details on how to transition to the node's new scripting API can be found here. There are also example workflows that further illustrate its use here as well as example templates on the Templates tab of the node.
Please consider the following prerequisites before using this node:
knime.scripting.io
module (imported as knio
by default) to access the
node's input data and populate its output data as described in the Ports section below. Use the
knio.flow_variables
dictionary to access input flow variables by name and to add new output
flow variables by name.jedi
is installed in the Python environment used by the node (default if Python environment is created through KNIME).knio.input_objects
. For example, the first input object can be accessed like this:
knio.input_objects[0]
.knio.input_tables
. For example, the first input
table can be accessed like this: knio.input_tables[0]
. Each table is an instance of type
knio.Table
. Before being able to work with the table, you have to convert it into, for
example, a pandas.DataFrame
or a pyarrow.Table
. Please refer to the
KNIME Python Integration Guide to
learn how to do this, or take a look at one of the templates on the Templates tab of the node.knio.output_tables
in your script. For example,
to populate the first output table, assign it a value like this: knio.ouput_tables[0] =
<value>
. The assigned value must be an instance of type knio.Table
which can
be created from, for example, a pandas.DataFrame
or a pyarrow.Table
. Please refer to the
KNIME Python Integration Guide to
learn how to do this, or take a look at one of the templates on the Templates tab of the node.knio.output_images
in your script. For example,
to populate the first output image, assign it a value like this knio.output_images[0] =
<value>
. The assigned value must be a bytes-like object encoding a PNG or SVG image.knio.output_objects
. For example, to
populate the first output object, assign it a value like this: knio.output_objects[0] =
<value>
. The assigned value can be of any type that can be pickled. It will automatically be
pickled for you.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.
To use this node in KNIME, install the extension KNIME Python Integration from the below update site following our NodePit Product and Node Installation Guide:
A zipped version of the software site can be downloaded here.
Deploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!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.
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.