Specifying input and output interface schemas

For a data set to be used as input or output from an operator, the record schema of the data set must be compatible with the interface schema of the operator.

Operator interface schemas define the number and type of data sets that can be used as input or output for an operator.

You use protected member functions of APT_Operator to define the interface schema of a derived operator class. The following member functions define the number of input and output data sets:

You can define any number of input and output data sets for an operator. Records of an input data set are read-only. An operator can read the records from an input data set and process them but it cannot write results to an input data set. Records of an output data set are read and write. When you use a data set as an output, you write results to the records of the output data set.

For both input and output data sets, you must specify:

To make these specifications, you include calls to two member functions from within APT_Operator::(): setInputInterfaceSchema() and setOutputInterfaceSchema().

The following figure is an example of an interface schema for an operator:

Figure 1. Example interface schemaOperator interface schema

In this figure, the interface schema for both the input and the output data sets is the same. Both schemas require the data sets to have at least three fields: two integer fields named field1 and field2 and a floating-point field named field3. Any extra fields in the input data set are dropped by this operator.

You can use view adapters to convert components of the record schema of a data set to match components of the interface schema of an operator.

Consider these variations when you specify interface schemas: