0 ×

PySpark Script (2 to 1)

KNIME Extension for Apache Spark core infrastructure version 4.3.1.v202101261633 by KNIME AG, Zurich, Switzerland

This node allows you to execute Python code on Spark (See PySpark documentation). The code has to put the desired output in the data frame with the name resultDataFrame1

Options

PySpark Script Node

Flow Variable List
The list contains the flow variables that are currently available at the node input. Double clicking any of the entries will insert the respective identifier at the current cursor position (replacing the selection, if any).
Snippet text area

Enter your Python code here.

The SparkSession can be accessed via the global variable spark. The input Dataset<Row> can be accessed via the method input parameter dataFrame1 and dataFrame2. The output Dataset<Row> must be called resultDataFrame1.

The editor optionally provides autocompletion (CTRL + Space) using the local Python installation, if the KNIME Python Extension and the Python module jedi is installed. The path to the Python executable has to be configured in Preferences → KNIME → Python.
Note: The completion suggestions are made based on the local Python environment, which may differ from the Python setup in the cluster!

Input Ports

Icon
First input Spark DataFrame.
Icon
First input Spark DataFrame.

Output Ports

Icon
Result Spark DataFrame.

Best Friends (Incoming)

Best Friends (Outgoing)

Installation

To use this node in KNIME, install KNIME Extension for Apache Spark from the following update site:

KNIME 4.3

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.

Wait a sec! You want to explore and install nodes even faster? We highly recommend our NodePit for KNIME extension for your KNIME Analytics Platform. Browse NodePit from within KNIME, install nodes with just one click and share your workflows with NodePit Space.

Developers

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.