User guide
Data Integration with Sybase Avaki Studio 111
Custom
Custom
A Custom operator can perform any operation that you define, using arbitrary Java-
Script code that you supply.
To implement a Custom operator, you first define the output schema you will gener-
ate. Then you write JavaScript code for the body of a function that will be called once
for each output row it is expected to produce. Your code can iterate over the operator’s
input result sets (there may be zero or more of these) and insert values for each column
in the output row according to the defined schema. Your code must return a Boolean
value. A return value of true indicates that it has produced a row. It will then be
invoked again to produce the next row when the runtime needs it. If your code returns
false, it indicates that it has no more rows to produce.
Beyond that, you’re free to set up your code as you want—you can precompute the
output when the function is called the first time and then feed out the results one by
one, simply act as a filter on the input, or do whatever you decide will work best for
the functionality you need.
Connections
The Custom operator takes anywhere from zero to five input result sets, each of which
can be the output of an Input Source or of any other operator. It produces exactly one
output result set whose schema is defined by the operator.
Population standard
deviation
Returns the population standard deviation for the values of
expression in the input result set.
Sample standard devia-
tion
Returns the sample standard deviation for the values of
expres-
sion
in the input result set.
Function Description
Required Connection
Optional Connection