User guide
Operator reference
118 Data Integration with Sybase Avaki Studio
Generator properties
Double-click a Generator operator to display the Generator Properties dialog. You
can edit the name and description as described in “Properties dialogs” on page 58.
Your code has access to the variables structure, including an object called
variables.<yourGeneratorOperatorName>, into which you can insert state
variables, using expressions such as:
variables.myOperator.foo = 5;
If your code needs to call external functions or if you need to import other Java classes
in order to do your custom processing, you can add these to the .jsi file for your model.
For details, see “Using a .jsi file to enhance your model” on page 75.
As an example, let’s assume you wish to create a Generator that will output data with
a single integer column whose values range from 0 to 100.
Entering iteration control code
You control the starting, intermediate, and ending values of your generated column
values using code you enter into the Iteration Controls tab in the Generator Properties
dialog. There are three fields, which you define as follows:
Initialize: This field contains expressions which set up any variables you wish to use
in order to calculate the values of each row you are generating. In our simple example,
you would initialize a counter variable to zero. You can enter any JavaScript code here