Creating the GUI Node Class

Implement the GUI Node, which represents the design-time configuration. The GUI Node defines configuration parameters that are displayed to the user, describes input and output schemas, and can be used to design visualizations for the results.

All GUINode implementations extend OperatorGUINode. OperatorGUINode has three important functions:
  • onPlacement: This function is called at the moment a user places the operator on the canvas.
  • onInputOrParameterChange: This function is called if the user drags a new "arrow" to this operator, or changes the parameters in the GUI.
  • onOutputVisualization: This function is called to configure the display in the results console when the operator finishes running.

In the IntelliJ project, either implement all three of these functions manually, or use one of the provided templates. For this tutorial, extend SparkDataFrameGUINode by adding another class, MyColumnFilterGUINode, which extends SparkDataFrameGUINode.

Before you begin

Create the constants object.

    Procedure
  1. Add the following code:
    class MyColumnFilterGUINode extends SparkDataFrameGUINode [MyColumnFilterJob] {
    }

    MyColumnFilterJob is the name of the Spark job, implemented later in this tutorial. The SparkDataFrame template makes it easy to create a Spark transformation that takes a dataset and outputs a dataset. It provides a variety of convenience functions to make it easier to create an operator.