Calculator overview

The Calculator lets you transform and manipulate data as it is mapped from one data source to another. In fact all transformations "pass through” the calculator even if they are simple one-to-one field mappings. But the Calculator will be used when you want to modify the value of a target data source field. Calculations determine the value of an output field based on values already in source or target data source fields or they can look up constants or calculate functions not related to values already in the data sources. A scripting tool lets you build a calculation of arbitrary complexity that can access any other system, or perform some user defined function.

A calculation can be made up of a combination of fields, constants, operators and functions, use these links to find out more about the range of these elements available. In addition there are Variable utilities which use local and global variables, and Error handling utilities.

The top part of the Calculator window screen gives access to the elements of a calculation, expand the lists by pressing +. Fields (columns) from your current source and target data sources are displayed on the left, and other elements including Calculator functions or operators on the right. Exactly what you see may depend on where you accessed the Calculator, for example from the Mapping tab on a data transfer or from the Properties tab on a data transfer.  

Double click an element at the top of the screen to automatically enter it into the area at the bottom of the screen where the calculation is built up. The building up of a calculation is shown as a piece of Jython script. Internally to the system the execution does not necessarily take place as the execution of Jython script, using the built-in Jython script engine. A simple mapping for example short circuits the scripting engine to carry out the mapping directly between the data elements.

A field mapping is the simplest form of calculation, and specifies that the data for a target field comes from a source field. However most fields in a target data source will more complex, perhaps made up of more than one source field, only part of a source field, or perhaps have values based on information unrelated to source fields such as date information or functions, see Mapping for more. The Calculator is used for these cases.    

Other related topics include Calculator properties, Fields, Constants, Operators, Functions, Variable utilities, Error handling utilities, Mapping, Select filters, Example JDBC mapping