Adding a filter to the mapping group

You can add a filter to a mapping group. By using a filter, you define any condition based on the value of the columns that are involved in your source tables. When you generate an SQL script with the mapping model, the content of your filter is used to generate a WHERE clause in the SQL query.

Before you begin

About this task

After you create a mapping between a source and a target, you can define a filter that can be applied to the target.

Procedure

To add a filter to the mapping group:

  1. In the Mapping Group view of the mapping editor, right-click a mapping line.
  2. Click Filter > Add to open the Add a Filter Expression window. If a filter already exists, click Filter > Change to open the Change a Filter Expression window.
  3. Double-click an element in the Columns field to place it in the expression editor at the current cursor position. You can type directly in the expression editor to create the expression.
  4. Double-click a function in the Functions field to place it in the expression editor at the current cursor position. You can type directly in the expression editor to create the expression.
  5. If you selected Validate expressions in the workbench Preferences page, and you see a red wavy underscore to denote an expression that is not valid, modify the expression to create a valid filter expression.
  6. Click OK.

Example

The following example is a valid filter expression:
    

SAMP.EMPLOYEE.FIRSTNME	LIKE 'Juan' AND SAMP.EMPLOYEE.EMPNO>100

Feedback