Configuring the components and connections - Cloud - 8.0

Filter (Mediation)

Version
Cloud
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
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)
Last publication date
2024-02-21

Procedure

  1. Double-click the cFile component, which is labeled Source, to display its Basic settings view in the Component tab.
  2. In the Path field, specify the file path to the message source.
    From the Encoding list, select the encoding type of your source files, and leave all the other parameters as they are.
  3. Double-click the cIdempotentComsumer component, which is labeled Deduplicator, to display its Basic settings view in the Component tab.
  4. From the Repository Type list, select between Memory and File to specify where the message identifiers will be stored before the deduplication process. For this scenario, select File.
    In the File store field, specify the location of the file storing message identifiers.
    In the Expression field, enter an expression to filter the messages. In this scenario, enter the following expression to filter the messages according to the person node of the XML files: xpath("/people/person"), and leave all the other parameters as they are. Alternatively, you can select the Use language check box, select XPath from the Language list, and enter "/people/person" in the Predicate field.
  5. Double-click the cProcessor component labeled Unique to display its Basic settings view in the Component tab.
  6. In the Code area, customize the code to display the file name of the message that passes the deduplication:
    System.out.println("Message consumed on Unique: "+
    exchange.getIn().getHeader("CamelFileName"));
  7. Repeat these steps to configure the other cProcessor component, which is labeled All, to display the file names of all the messages coming from the source:
    System.out.println("Message consumed on All: "+
    exchange.getIn().getHeader("CamelFileName"));
  8. Press Ctrl+S to save your Route.