Transformations > Router Transformation > Router Transformation Examples
  

Router Transformation Examples

You might use a Router transformation in one of the following ways:
For example, your source includes data for customers in different regions. You want to configure a marketing campaign with variants for customers in the North America, Asia Pacific, and EMEA regions. All other customers see the default ad campaign. In this case, you can use a Router transformation to apply the conditions and filter the data to four different Target transformations.
The following figure shows a mapping with a Router transformation that filters data based on these conditions:
You create two output groups and specify two group filter conditions on the Output Groups tab as shown in this table:
Group Name
Group Filter Condition
NA
region = ‘NA’
EMEA
region = ‘EMEA’
APAC
region = ‘APAC’
In this case, the default group would include data for all customers who are not in the North America, EMEA, or APAC regions.
Also note that a Router transformation passes data through all output groups that meet the filter condition. In the following example, the conditions test for an employee salary threshold and the filter conditions for the two output groups overlap:
Group Name
Group Filter Condition
Group1
employee_salary > 20000
Group2
employee_salary > 30000
When the Router transformation processes an input row data with employee_salary=35000, it routes the data through output groups 1 and 2.
If you want to pass the data through a single output group, define the filter conditions so they do not overlap. For example, change Group1 to employee_salary <= 30000.