The Router transformation

Router transformation is single input to multiple output group transformation. Routers can be used in place of multiple Filter transformations. Router transformations accept the data through an input group once, and based on the output groups you define, it sends the data to multiple output ports. You need to define the filter condition in each output group.

A mapping using the Router transformation where we wish to load all records from LOCATION as INDIA in one target, records from UK in another target, and all other nonmatching records in the third target, is indicated in the following screenshot:

The Router transformation

When you drag the columns to the router, the Router transformation creates an input group with only input ports and no output port. To add the output groups, click on the Groups tab and add two new groups. Enter the name of each group under the group name and define the filter condition for each group. Click on OK to create the output groups in the Router transformation.

The Router transformation

When you add the group, a DEFAULT group gets created automatically. All nonmatching records from the other groups will pass through the default group if you connect the DEFAULT group's output ports to the target.

When you pass the records to the Router transformation through the input group, the Router transformation checks the records based on the filter condition you define in each output group. For each record that matches, the condition passes further. For each record that fails, the condition is passed to the DEFAULT group.

As you can see, Router transformations are used in place of multiple Filter transformations. This way, they are used to enhance the performance.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset