Creating the Signature Class
In this task, write the code for the operator. A custom operator must implement three classes: the signature, the GUI node, and the runtime. Each of these classes defines behavior and information that the TIBCO Data Science - Team Studio workflow engine uses to execute the operator.
The signature class of this operator contains metadata about the operator and describes the other included classes.
Before you beginSetting Up Your Environment for the custom operator project.
- Procedure
- Create a class called
SimpleDatasetGeneratorSignatureand have it extendOperatorSignature.For the type parameters, includeSimpleDatasetGeneratorGUINodeandSimpleDatasetGeneratorRuntime, both of which are described in Creating the GUI Node Class. - Add one function called
getMetadata().This function describes the metadata about your operator. The code for this part should resemble the following: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.") ) } }
What to do nextCreate the Utils object.