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
- Create a mapping model.
- Create mappings between a source and a target, or run the discover
function and accept at least one mapping.
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:
- In the Mapping Group view of the mapping editor, right-click
a mapping line.
- Click to open the Add a Filter Expression window.
If a filter already exists, click to open the Change
a Filter Expression window.
- 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.
- 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.
- 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.
- Click OK.
Example
The following example is a valid filter expression:
SAMP.EMPLOYEE.FIRSTNME LIKE 'Juan' AND SAMP.EMPLOYEE.EMPNO>100