Skip to main content

Router

The Router package filters and routes data to separate tables through defined ports. Router produces multiple outputs produced against distinct rules-based expressions.

Example: Router package

Example of router dataflow with 4 target entities

Once source entities are added to the canvas, the Router package is brought onto the canvas by double-clicking or dragging the icon. When the square icon becomes a live controller on the canvas, double-click to reveal rule and output port definition panel.

Router package

Router controller

Filter Rule and Output Port definition

 

Add Ports by selecting Add Rule and enter names for ports to be created. Create a target entity for each port, a good practice is to append the port name to the target entity name. Connect the outports of the Router controls to the inports of the newly created corresponding target entities.

Rule definition

Select the icon expression builderExpression Builder to create rules defining which output will be routed to the ports (defined in the next step). For more information see Custom Expression Builder.

Expression builder panel

In this example, the source entity will be filtered on values for the field 'Major', creating target entities routed by field values:

Target Entity

Where

Value for Field 'Major'

 

StudentMajor_Router_a

Major=='Art' OR Major=='Accounting'

StudentMajor_Router_b

Major=='Business' OR Major=='Math'

StudentMajor_Router_c

Major=='Psychology'

StudentMajor_Router_d

Major=='Music' OR Major=='Biology'

Rule field displays the expression that was created in expression builder

OUTPUT PORT definition: Ports must be named for Router to validate the dataflows.

Output port names are required in the controller output port definition fields

Save the dataflow, Validate the package, then Execute the dataload into the target entities. In this example,

Sample data shows output of the four Router operations in this example (located though the discover module):

Sample Data: Output Port a :Target Entity: StudentMajor_Router_a (RULE: [Major == 'Art' or 'Accounting'])

Sample data displays only records of art or accounting majors

Sample Data: Output Port b: Target Entity: StudentMajor_Router_b (RULE: [Major == 'Business' or 'Math'])

Sample data displays only records of business or math majors

Sample Data: Output Port c : Target Entity: StudentMajor_Router_c (RULE: [Major == 'Psychology'])

Sample data displays only records of psychology majors

Sample Data: Output Port d : Target Entity: StudentMajor_Router_d (RULE: [Major== 'Music' or 'Biology'])

Sample data displays only records of music or biology majors

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!