Previous Page | Next Page

Maintaining Processes

Example: Defining Mapping Process Properties to Transform Data


Overview

This example defines the Mapping process properties to transform data by specifying a derived mapping. Only the Column Mapping tab for the Mapping Process Properties window is illustrated.

For this example, the input source is an ODD named Customer, and the output table is a Detail Table named Custdet. Both tables have a column named Gender. The ODD Gender is a numeric column that stores the values 0 or 1. The Detail Table Gender is a character column that stores the values Male or Female.

Note:   The following explanation describes the metadata and methods used to achieve the desired results. It is assumed that the appropriate Data Warehouse Environment, Data Warehouse, Subject, data stores, Job, and Process Flow exist.  [cautionend]


Defining Mapping Properties

In the Job Process Flow, position the cursor on the Mapping process icon, click the right mouse button, and select Properties. The Mapping Process Properties window displays. Only the Column Mapping tab, which defines the transformation, is explained here:

Column Mapping Tab

defines how input columns are mapped into the output table(s) and how the data in those columns is transformed. This example transforms data by specifying a derived mapping for the Gender column.

[untitled graphic]

First, select the column to be transformed:

[untitled graphic]

Then, click Derive Mapping, which opens the Expression Builder window:

[untitled graphic]

Using the Expression Builder window, you can define a SAS expression, which can transform columns, provide conditional processing, calculate new values, and assign new values. To define an expression, position the cursor in the Transformation field, which automatically displays the name of the selected column, and then select from the Components list and operator buttons. Or, you can enter the appropriate expression. For example, the following expression would transform the numeric values 0 and 1 (stored in the ODD) to the character values Male and Female (for the Detail Table):

[untitled graphic]

Click OK to return to the Column Mapping tab, which displays the derived mapping.

[untitled graphic]

Previous Page | Next Page | Top of Page