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 you place your operator on the canvas.
  • onInputOrParameterChange: If you drag a new "arrow" to this operator or change the parameters in the GUI, this function is called.
  • onOutputVisualization: This function configures what appears in the results console when the operator finishes running.

In your IntelliJ project, you can implement all three of these functions manually, or you can use one of the provided templates. For this tutorial, extend SparkDataFrameGUINode by adding another class, this time called MyColumnFilterGUINode, that extends SparkDataFrameGUINode.

Prerequisites

You must have created the constants object.

Procedure

  • Add the following code:
    class MyColumnFilterGUINode extends SparkDataFrameGUINode [MyColumnFilterJob] {
    }

    MyColumnFilterJob is the name of the Spark job, which you implement 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.