0 votes
in Informatica by
What is the Difference between Filter and Router T/R?

1 Answer

0 votes
by

Router transformation is an active and connected transformation, and it is similar to the filter transformation, which is used to filter the source data.

In a Router transformation, Data Integration is used as a filter condition to evaluate each row of incoming data. It checks the conditions of each user-defined group before processing the default group.

If a row connects more than one group filter condition, Data Integration passes the row multiple times. We can drop rows that do not meet any of the conditions to a default output group.

If we need to check the same input data based on multiple conditions, then we use a Router transformation in a mapping instead of creating multiple Filter transformations.

The following table compares the Router transformation to the Filter transformation:

OptionsRouterFilter
ConditionsTest for multiple conditions in a single Router transformationCheck for one condition per Filter transformation
Handlerows that do not meet the conditionRoute rows to the default output group or drop rows that do not meet the conditionDrop rows that do not meet the condition
Incoming dataThe process once with a single Router transformationProcess in each Filter transformation

For example, when filtering the data form rollno =20, we can also get those records where rollno is not equal to 20. So, router transformation gives multiple output groups, and each output group can have its filter condition.

Also, there is a default group, and this default group has record sets that don't satisfy any of the group conditions.

For example, if we have created two groups for the filter conditions rollno=20 & rollno=30 respectively, then those records which are not having rollno 20 and 30 will be passed into this default group.

The data which is rejected by the filter groups will be collected by this default group, and sometimes there can be a requirement to store these rejected data. In this way, the default output group can be useful.

To allow multiple filter conditions, the router transformation provides a group option.

  • There is a default input group that takes input data.
  • There is also a default output group that contains all those data which are not passed by any filter condition.
  • For every filter condition, an output group is created in router transformation. We can connect different targets to these different groups.

Creating Router Transformation

Follows the following steps to create the router transformation, such as:

Step 1: Create a mapping having source "STUD" and target "STUD_TARGET."

Step 2: Then in the mapping

  1. Select Transformation menu.
  2. Click on the Create

Step 3: In the create transformation window

  1. Select router transformation
  2. Enter a name for the transformation "rtr_rollno_20"
  3. And click on the Create

Step 4: The router transformation will be created in the mapping, select done option in the window.

Step 5: Drag and drop all the columns from Source qualifier to router transformation.

Step 6: Double click on the router transformation, then in the transformation property of it

...