Router is an active transformation which will divide the data into groups. Each group will hve a condition. If the condition is matching only those records will go to the output. Other records will go to the default group.
- If a record is matching with the condition of multiple groups, It will be detected multiple times, So it is an active transformation.
- The default condition for each group is true, which will send all input rows as output.
- Multiple conditions are possible in Router Transformation.
- Router Transformation works like a case statement.
Creating Router Transformation
- In the mapping dessigner->Mpping->Create new mapping
- Go to Transformation->Select Router Transformation->Specify Name->Create->done.
- Select the ports from previous transformation and drag them in to the router transformation or create ports maually.
Configuring Router Transformation
Router Transformation has two groups. One is input group other is output group.
Input Group
The designer copies the input port to create the output port for each output group.
Output Group
Router has two output groups. One is User defined group and the other is Default group.
User-defined groups: This group is created based on the input data. Here we specify filter condition. We can create or modify the user defined in the groups tab.
Default group: The designer creates only one default group.The default group does not have a group filter condition.If all the conditions evaluate to FALSE, the integration service passes the row to the default group.
Creating Router Transformation
- Drag source from repository to designer and Drag target to the designer
- Go to transformation->create->Router->OK
- Copy all the ports from source ualifier to filter.
- Edit Router-> Groups->Add two Groups-> Sal>2000, Sal>3000->OK
- Connect First group to the first target and second group to the second target