Altova MapForce 2024 Basic Edition

In this step, we will filter the data from MergedLibrary in such a way that only the books published after 1900 will be passed to the FilteredLibrary component. We will use a Filter component for this purpose.

 

Add a filter

To add a filter, right-click the connection between MergedLibrary and FilteredLibrary and select Insert Filter: Nodes/Rows from the context menu (screenshot below).

MF_Tut3_FilterData1

The filter component has now been added to the mapping (screenshot below).

MF_Tut3_FilterData2

As shown above, the bool input connector is highlighted in orange, which means that this input is mandatory. If you hover over the connector, you will see that an input of type xs:boolean is required (see screenshot below). To see tips, click ic-show-lib-info (Show tips) in the toolbar.

MF_Tut3_FilterData3

 

Only books after 1900

The filter component requires a condition that returns true or false. When the Boolean condition returns true, the data of the current publication sequence will be copied to the target. When the condition returns false, the data will not be copied. In this tutorial, the required condition is to map only the books that were published after 1900. To create the condition, do the following:

 

1.Click Constant in the toolbar and type 1900 in the text bar. Select Number as a type.

2.Add the greater function to the mapping.

3.Make the mapping connections to and from the greater function, as shown below. The greater function will compare the value of the publish_year element of each publication with the value of the constant. Only those publication records whose publication year is greater than 1900 will be mapped to the target.

MF_Tut3_FilterData4

 

© 2017-2023 Altova GmbH