Mapping Values

In this section:

Creating an output structure is usually not sufficient to perform a transformation. You typically must also specify the mapping values for each output node using the interface of the Mapping Values pane.

You can specify the value for each output node using the Output Node Mapping Builder dialog box. To access this dialog box, in the Mappings tab of the Output pane, highlight the row containing the output node you want to define or change in the Mapping Values pane, and click the ellipsis button. The following image shows the output structure on the left and the Mapping Values pane on the right.

The following image shows the Output Node Mapping Builder dialog box that opens.

The left pane of the Output Node Mapping Builder dialog box provides you with the option of switching between the following areas:

The Functions and Input panes are available by default. The remaining panes are only available if specific values are configured in the corresponding sections of the Project Properties dialog box. For example, if a global constant is configured using the Project Properties dialog box, the Global Constants pane would be enabled in the Output Node Mapping Builder.

This feature allows you to drag and drop any available configuration that was specified using the Project Properties dialog box into the workspace area of the Output Node Mapping Builder. You can switch between the available panes by clicking on the corresponding button, for example, Global Constants, JDBC Data Source, and so on. You can access the Project Properties dialog box directly from the Output Node Mapping Builder, by clicking the View Project Properties button on the lower-left corner, as shown in the following image.


Top of page

x
Input Pane (Context)

This pane is typically located in the lower-left corner of the Output Node Mapping Builder. It allows you to select the location of the input node on which to base the value of the current output node.

You can drag and drop the input node into the working area of the Output Node Mapping Builder. Depending on where in your workspace you drop the node, you can overwrite or update the existing mapping tree.

The Output Node Mapping Builder uses the following notation as the context property to define the location of the input node in the mapping formula:

Sales/Company/Year/Quarter/Product/Item@sold

Note: If you decide to type the mapping formula manually and it is incorrect, an Invalid signature error message is generated.

This is the same notation that is used in the Mapping Values pane, as shown in the following image.


Top of page

x
Functions Pane

This pane is typically located in the upper-left corner of the Output Node Mapping Builder. It allows you to select pre-defined functions or custom functions that you defined to associate with an output node.

You can drag and drop the function into the working area of the Output Node Mapping Builder.

Note: In this version of Transformer, you can drag and drop functions above or below the existing mapping tree.


Top of page

x
Set Constant

Allows you to type in a fixed value for a function or input node, by right-clicking the node and selecting Set Constant or double-clicking the node.

Make sure the Set Constant option is selected.

The Set Mapping Value dialog box opens, as shown in the following image.

Type your value in the Constant field and click OK.


Top of page

x
Set Expression

An expression is a logical statement where two or more input node values are combined into one output value using the basic operators and functions. In Mapping Builder, expressions are typically used for concatenation where input fields are joined by a plus sign "+" operator.

To set an expression, right-click the node and select Set Expression or double-click the node.

Make sure the Set Expression option is selected.

The Set Mapping Value dialog box opens, as shown in the following image.

Type your value in the Expression field and click OK.

You can also click the Browse button to open the Expression Builder dialog box.

An expression can contain a concatenation of any number of input nodes and constant values in any order, in the following format:

<input item>+'constant'+...

For example:

'For '+tree/fruit+tree/fruit/year+': '+tree/fruit/
apple/yield+
' bushels, '+tree/fruit/apple/avgweight+' grams avg.'

Note: It is strongly encouraged to use the @CONCAT function instead of an expression to concatenate strings. For more information on using the @CONCAT function and its properties, see Using Functions.

For more information on how to use the Output Node Mapping Builder, see Using the Output Node Mapping Builder.


iWay Software