Creating the onInputOrParameterChange Method

After you define the parameters that the user can customize, you must define the behavior of the operator when the user adjusts those parameters.

In this operator in particular, you must be able to update the schema if the user chooses a different number of rows to output, or a different format. To do that, override the function onInputOrParameterChange. This method updates the schema, and then returns the operator's status (valid or invalid). Because runtime errors occur if the parameters have no values, specify that the operator status is always valid.
    Procedure
  1. Add the following code:
    override def onInputOrParameterChange(
                                          inputSchemas: Map[String, TabularSchema],
                                          params: OperatorParameters,
                                          operatorSchemaManager: OperatorSchemaManager):
      OperatorStatus = {
        // update the schema
        // this is using the value chosen by the user in the Alpine GUI
        operatorSchemaManager.setOutputSchema(DatasetGeneratorUtils.getOutputSchema(params))
        // return the operator status with isValid = true.
        OperatorStatus(isValid = true)
      }
What to do nextCreate a runtime class.