Working with the component window

The Data Calculator component window provides tabular and graphic views of the data stream. You can also use this window to map port attributes and define transformation rules.


Tabular view

The tabular view shows the current record structure, port attributes, and transformation rules. It includes:


Graph view

The graph view shows the current mapping between the IN-port and OUT-port attributes.

StepsMapping port attributes

Although the Data Calculator component creates column-to-column mapping between the IN-port and OUT-port as a default option, there may be times when you want to map port attributes individually. To create your own mappings, use the graphic view.

  1. On the Data Calculator component window, click the Graph tab.

  2. Map the IN-port and OUT-port in one of these ways:

    • Select Mapping in the menu bar, and select one of these predefined mapping sequences:

      • Create mapping by Order – sequentially maps the port attributes of the IN-port and OUT-port.

        NoteIf the number of attributes is different, some port attributes are not mapped.

      • Create mapping by Name – maps the port attributes of the IN-port and OUT- port according to their names.

      • Create mapping by Name Case Sensitive – maps the port attributes of the IN-port and OUT-port according to their case-sensitive names.

      • Create mapping by prefix – maps the port attributes of the IN-port and OUT-port by name, ignoring the specified prefixes.

      • Create mapping by Best Match – maps the port attributes of the IN-port and OUT-port that sound alike.

    • Connect the IN-port and OUT-port attributes individually.

The component is now ready to be used and can forward records from the IN-port to the OUT-port.


Displaying transformation results

The Data Calculator immediately displays the result of transformation rules, allowing you to verify incoming data, test transformation rules, and view the effect of the rules on data output.

By default, OUT-port values reflect IN-port values. Manually changing an IN-port attribute value affects only the data of the IN-Port or OUT-port buffer, allowing you to test transformation rules, and to see the results in the current output record. This is a convenient way to create test cases for transformation rules.

Use the Transformation Rule column to add, modify, or delete transformation rules. You can also edit single-line functions by changing the current attribute input field.

See “Using the JavaScript Editor and Debugger” for information about creating complex procedural transformations.

NoteThe graphic view mirrors the actual port structures. You cannot add or delete attributes in the graphic view.

Managing transformation rules

Transformation rules are processed in sequential order. The processing starts with the first transformation rule of the list.


Simulating Data Calculator

Data Calculator is designed so you can see the changes applied to data as it moves through the transformation rules. You may find this useful, for example, to see how changing a transformation rule affects outgoing data. Depending on the status of the Auto-Synchronization button, a transformation rule is immediately applied to the entire set of IN-port records after the rule is entered.