You are on page 1of 2

Filter Transformation

This chapter includes the following topics:


Filter Transformation Overview, 20
Filter Transformation Advanced Properties, 21
Filter Condition, 21
Filter Transformation Performance Tips, 22
Filter Transformation Overview
Use the Filter transformation to filter out rows in a mapping. As an active tran
sformation, the Filter transformation may
change the number of rows passed through it.
The Filter transformation allows rows that meet the specified filter condition t
o pass through. It drops rows that do not
meet the condition. You can filter data based on one or more conditions.
The following figure shows a filter condition in a Filter transformation:
A filter condition returns TRUE or FALSE for each row that the Data Integration
Service evaluates, based on whether a
row meets the specified condition. For each row that returns TRUE, the Data Inte
gration Services pass through the
transformation. For each row that returns FALSE, the Data Integration Service dr
ops and writes a message to the
log.
20
You cannot concatenate ports from more than one transformation into the Filter t
ransformation. The input ports for the
filter must come from a single transformation.
Filter Transformation Advanced Properties
Configure properties that help determine how the Data Integration Service proces
ses data for the Filter
transformation.
Configure the following property on the Advanced Properties tab:
Tracing Level
Amount of detail displayed in the log for this transformation.
Default is normal.
The following table describes the tracing levels:
Tracing Level Description
Terse Logs initialization information, error messages, and notification of rejec
ted data.
Normal Logs initialization and status information, errors encountered, and skipp
ed rows due to
transformation row errors. Summarizes mapping results, but not at the level of i
ndividual
rows.
Verbose Initialization In addition to normal tracing, logs additional initializa
tion details, names of index and data
files used, and detailed transformation statistics.
Verbose Data In addition to verbose initialization tracing, logs each row that p
asses into the mapping. Also
notes where string data was truncated to fit the precision of a column.
When you configure this tracing level, row data for all rows in a block are writ
ten to the log
when a transformation is processed.
Filter Condition
The filter condition is an expression that returns TRUE or FALSE.
Enter conditions in the Expression Editor. The filter condition is case sensitiv
e.
You can use any expression that returns a single value as a filter. For example,
if you want to filter out rows for
employees whose salary is less than $30,000, enter the following condition:
SALARY > 30000
You can specify multiple components of the condition, using the AND and OR logic

al operators. If you want to filter out


employees who make less than $30,000 and more than $100,000, enter the following
condition:
SALARY > 30000 AND SALARY < 100000
You can also enter a constant for the filter condition. The numeric equivalent o
f FALSE is zero (0). Any non-zero value
is the equivalent of TRUE. For example, the transformation contains a port named
NUMBER_OF_UNITS with a
numeric datatype. You configure a filter condition to return FALSE if the value
of NUMBER_OF_UNITS equals zero.
Otherwise, the condition returns TRUE.
Filter

You might also like