Creating the Signature Class

This is where we write the code for our operator. A custom operator must implement three classes: the signature, the GUI node, and the runtime. Each of these defines behavior and information that the Team Studio workflow engine uses to execute the operator.

The signature class of this operator contains metadata about your operator and describes the other included classes.

Prerequisites

You must have set up the environment for the custom operator project.

Procedure

  1. Create a class called SimpleDatasetGeneratorSignature and have it extend OperatorSignature. For the type parameters, include SimpleDatasetGeneratorGUINode and SimpleDatasetGeneratorRuntime, both of which are described in Creating the GUI Node Class.
  2. Add one function called getMetadata(), which will describe the metadata about your operator. The code for this part should look like this:
    class SimpleDatasetGeneratorSignature extends OperatorSignature[
      SimpleDatasetGeneratorGUINode,
      SimpleDatasetGeneratorRuntime] {
      def getMetadata: OperatorMetadata = {
        new OperatorMetadata(
          name = "Sample - Simple Data Generator", // a name for your operator
          category = "Plugin Sample - Spark",      // a category for the operator (seen on the Alpine web application)
          author = Some("My Name"),                     // the author's name
          version = 1,                             // a version number
          helpURL = None,                           // a link to documentation about the operator, if available
          icon = None,                      // an OperatorIcon object for a custom icon (optional)
          toolTipText = Some("An operator that generates a dataset with user-specified number of rows.")
        )
      }
    }