After you use the discover function to find relationships between the elements
in your mapping model, follow these steps to add a transformation to a
source element so that it will be compatible with the target elements.
- Right-click on the mapping line between /SAMPLE/SAMP/DEPARTMENT/DEPTNO
and /SAMPLE/SAMP/PROJECT/DEPTNO/DEPTNO in the mapping editor. These elements seem to be a perfect match. You can verify this by selecting
Properties from the drop-down menu. The properties page contains useful
information about the source column and the target column. In this example,
the DEPTNO data type is CHAR in both the source and the target.
- But, to ensure that all of the department numbers have lower case characters,
add a lower case function to the element. Right-click on the mapping line
between /SAMPLE/SAMP/DEPARTMENT/DEPTNO and /SAMPLE/SAMP/PROJECT/DEPTNO/DEPTNO.
- Select Transform->Add to open the Expression Builder wizard.
- In the Functions field, expand the String functions. Double-click the LCASE(VARCHAR) function. The LCASE function appears in the Transformation expression field as LCASE().
- Click in the parenthesis of the function to change the focus. Then double-click on the DEPTNO element in the Columns field. The DEPTNO column appears in the parenthesis.
.
- Click OK.
- The mapping line changes to show that a transformation has been added:
