Viewing code and executing the Route - 7.3

Filter (Mediation)

author
Talend Documentation Team
EnrichVersion
Cloud
7.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Data Governance > Third-party systems > Routing components (Mediation) > Filter components (Mediation)
Data Quality and Preparation > Third-party systems > Routing components (Mediation) > Filter components (Mediation)
Design and Development > Third-party systems > Routing components (Mediation) > Filter components (Mediation)
EnrichPlatform
Talend Studio

Procedure

  1. Click the Code tab at the bottom of the design workspace to have a look at the generated code.
    As shown in the code, the messages are routed according to conditions initialized with the .choice() piece of code. The filter you defined is initialized with the .when() piece of code, and the non filtered messages are routed through the .otherwise() piece of code.
  2. Click the Run button in the Run view or press F6 to execute your Route.
    RESULT: The files containing "Paris" are sent to a folder named Paris_only, and the other messages are sent in a folder called Other_cities.