How to: |
Replace functions are used to match and replace specific values of the input data. For example, suppose your input data has a node called "car_age" with a value of either "new" or "used". If you decide to substitute the term "used" and want to use "pre-owned", you can define a replace function with match and replace value pairing where the match value would be specified as "used" and the replace value is "pre-owned."
Replace functions work similar to custom functions in that you must first define the function itself and then, assign it in the output node mapping value which needs to be modified. This task can be accomplished with the @REPLACE and @SIMPLE_REPLACE functions.
The process of defining replace functions accounts for setting up the values to match and replace, but not the mapping. You must map the replace functions using the Output Node Mapping Builder. For more information, see Using the Output Node Mapping Builder.
To define a replace function:
The Project Properties dialog box opens.
The following image shows the Project Properties dialog box with the @REPLACE Functions category selected in the left pane.
The Input Lookup and JDBC Lookup tabs contain the lists for the two types of replace functions available in Transformer.
To define replace functions in which the match and replace values are taken from the columns of the specified database table, enabling you to insert the input values from the different databases, use the JDBC Lookup tab. For information, see Configuring Properties for JDBC Replace Functions.
To define an input lookup for a replace function:
The Add New Input Lookup dialog box opens.
The name Input is supplied by default.
The Add New Input Lookup dialog box opens.
You are returned to the previous Add New Input Lookup dialog box.
You can add multiple input lookups if required.
For example, the following image shows a replace function named "Mammals." The lower pane of the Add New Input Lookup dialog box has columns for Match and Replace node values for various mammals, for example, “cow” to "bovine.”
To modify an input lookup:
The Input Lookup Properties dialog box opens.
You can perform either one of the following modifications to an input lookup group:
To delete an input lookup:
The following confirmation dialog box opens.
The input lookup is removed from the list.
iWay Software |