August 16, 2023

Mapping data using a filter – Docs for ESB 6.x

Mapping data using a filter

  1. In your Studio, open the Job used in the previous scenario to display it in the
    design workspace.

    Use_Case_tXMLMap1.png

  2. Double-click the tXMLMap component to open its Map Editor.

    Use_Case_tXMLMap10b.png

  3. On the top of the Customer output table, click
    the

    Expression_Filter.png

    button to open the filter area.

    Use_Case_tXMLMapFilter1.png

  4. Drop the idState node in the main input table to the filter
    area. The XPath [row1.Customer:/Customers/Customer/Address/idState] of the
    idState node is added automatically to this filter
    area.

    Enter == 2 after the XPath of the idState node, and the complete filter condition becomes
    [row1.Customer:/Customers/Customer/Address/idState] ==
    2
    . This means only the customer data with the state id of 2 will be passed to the output flow.
  5. Click OK to validate the changes and close the
    map editor.
  6. Press Ctrl + S to save the Job and then F6 to run the Job.
Use_Case_tXMLMapFilter2.png

As shown above, the customers Griffith Paving and Sealcoatin and
Glenn Oaks Office Supplies, whose state id is
2 are displayed on the console.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x