Creating the Constants Object

Create a Constants object to keep some values. You can refer to variables across the operator while making it easier to maintain and update.

Perform this task in the Scala project in the IntelliJ IDEA.

Prerequisites

You must have created the signature class.

Procedure

  1. Add the following code:
    object OperatorConstants {
        val parameterID = "parameterId"
    }
  2. Optional: Add any other variables to track.
    To reference them in the code, call OperatorConstants.parameterID.
    Note: You will see this call throughout the rest of the code in this tutorial.