< Previous | Next >

Adding a transformation to an element in the mapping model

This exercise teaches you how to transform a source element to be compatible with a target element.

To add a transformation to an element in the mapping model:

  1. 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.

  2. Right-click on the mapping line between /SAMPLE/SAMP/DEPARTMENT/DEPTNO and /SAMPLE/SAMP/PROJECT/DEPTNO/DEPTNO, and select Transform > Add to open the Expression Builder wizard.
  3. In the Functions field, expand the String functions, and double-click the LCASE(VARCHAR) function. The LCASE function appears in the Transformation expression field as LCASE().
  4. 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.

    Screen capture showing the Expression Builder, as described.

  5. Click OK.

    The mapping line changes to show that a transformation has been added.

    Screen capture showing the changed mapping line, as described.

  6. From the menu bar, click File > Save or CTRL+S to save the results of the current mapping between /SAMPLE/SAMP/DEPARTMENT/DEPTNO and /SAMPLE/SAMP/PROJECT/DEPTNO/DEPTNO.
You now have a saved mapping model that you can use to deploy SQL statements to a server.
< Previous | Next >

Feedback