Mapper logic

Mapper logic

The Mapper logic is a function that can perform various conversion/processing such as arithmetic operation and character replacement.

Usage of Mapper logic

Using the Mapper logic

When using the Mapper logic, drag the logic icon from the tool palette to the mapping canvas.

For example, for processing that that adds the number "1.05" to the input data and outputs the result, configure the settings as follows:

Method to connect a mapping link

The method to connect a link to an input handler of the Mapper logic differs depending on the type of the input handler.

For output of the Mapper logic, connect the link to other logic or an element of output schema.

 

Link to the input handler

  • When the logic has no input handler

    A mapping link can't be connected.

  • When the logic has a single input handler

    The logic can be connected to an element of input schema or other Mapper logic.

    • Element of input schema

    • Other Mapper logic

  • When the logic has two input handlers

    The logic can be connected to the combination of elements of input schema and other logics.

    • Combination of elements of input schema

    • Element of input schema and other Mapper logic

= Remarks =

For functions of each Mapper logic and information of input handlers, refer to the help of the Mapper logic

Mapper logic settings

Properties of th Mapper logic can be set from the Property setting dialog or the property inspector.

Method to move the Mapper logic

The Mapper logic placed in mapping canvas can be moved by the drag operation.

Mapping links are also moved when the Mapper logic is mapped.

Right-click menu

For the Mapper logic placed in the mapping canvas, the following operation are available with the right-click menu.

= Hint =

You can perform the same operations with Menu of Designer.

Item description

Item name

Description

Remarks

Cut

Cuts the logic icon.

 

Copy

Copies the logic icon.

 

Delete

Deletes the logic icon.

 

Alignment

Arrange the placement of the logic icons.

  • Align left

  • Align right

  • Align top

  • Align bottom

  • Align horizontally

  • Align vertically

  • These operations are available only when multiple icons are selected.

  • Align horizontally and Align vertically are available only when three or more icons are selected.

Properties

Opens the Properties setting dialog of the logic.

This operation is available only when a single icon is selected.

Paste

Pastes the cut/copied logic icon.

 

Select All

Selects all the Mapper logics placed on the mapping canvas.

 

Mapper logic help

When you select a logic icon and press the F1 key, the help page for the selected logic is displayed.

Mapper logic specifications

Mapper logic type

The Mapper logic is roughly divided into two types: "Loop" and "Convert".

The type can be determined from the chip at the upper left of the icon.

Logic type

Chip image

Palette tab name

Loop logic

Loop

Convert logic

Branch

Condition

Number

String

Date

Excel

Typically, after data is divided with Loop logic, each unit of data is processed respectively with the Convert logic, and then output in order.

Data type of the Convert logic

The input and output handlers of the Convert logic each have a specific type.

The type of input handler means the type of data converted during the input, while the type of output handler means the type of result data after the conversion/processing.

Typically, when the type of input data is different from that of input handler, the input data type is automatically cast (converted) to the type of input handler.

When the cast (conversion) of the type fails, a run-time error occurs.

= Hint =

To prevent the script to be stopped as the result of run-time error, check the data beforehand or enclose the Mapper components with Monitor Exception.

 

Type of Convert logic

The logic palette is classified by type, and the type can be determined with the chip at the lower right of the icon.

Logic type

Internal data type

Chip image

Palette tab name

Boolean type

boolean

Condition

Numeric type

BigDecimal

Number

String type

String

String

Date type

Date

Date

 

Internal data type of the Numeric logic

The Numeric type handled with Mapper is processed in BigDecimal type, which can accurately represent the data including decimal points.

When the numeric operation is executed to string type, the string is converted to the BigDecimal type before processing.

In case of rounding off numbers after the decimal point, use the string logic "Format Number".

 

Format when each type is converted to string

Format of data types of logic or script variable mapped to strings are as follows:

Type

Format of string

Date type

"yyyy-MM-dd'T'HH:mm:ss.SSSZZ"

Binary type

BASE64 Encoding

Numeric type/integer type/decimal type

Real number style

Boolean type

"True" or "false"

= Remarks =

For the format of date, refer to Format of Date/Time Formatting.

When null is input

Null indicating no value existing may be input to the data of connectors such as database.

Null input to the Convert logic is processed as follows:

  • Logics where the null option is available: null is processed based on the specified option.

  • Logics where the null option is unavailable: null is output and the subsequent process is performed.

When null is output to connectors that can't express null, null is converted to appropriate representation in the connectors.

If the input schema is the table model type and the output schema is the XML type, the null value of the input data which are mapped to the output data is treated as null even in the Mapper logic in the middle.

= Remarks =

Refer to Null option for the logics where the null option is available.

Specification limits

Common to all Mappers

  • You aren't allowed to paste logic icons to different Mapper editors.

  • The following characters can't be used in input fields of the Mapper logic: (except for the Comment field)

    • "<" "&"

    Note

    When the characters above are used in input fields of the Mapper logic, an error occurs during execution.

    In that case, open the Mapper editor and save the script.

    Note

    Fields in which regular expression patterns can be input (such as the "Regular expression replacement" logic or the "Match to regular expression" logic), characters can be represented in Unicode notation.

    • "<" → "\u003C"

    • "&" → "\u0026"

Notes

Common to all Mappers