Create an Interface with a Matched Source

Interfaces based on a Matched Source allow you to compare two sets of data and report the differences (mismatches).

In this example, you can compare positions for a specific entity and data source between two consecutive days, and output the rows for which the difference exceeded 1 %.

Add a Matched Source

After you select the main data object for your interface and click Create, you see the EDS Worksheet. The main Data Object you chose is at the left and the Taxonomy is at the right.

To add a match mashup to the current interface:

  1. At the bottom of the window, click  Add Step Before, and then click Matched Source.

    Matched Source option

    This action adds two more steps before the Taxonomy Mapping: Matched Source and Source Designer. In the Matched Sources Step box, you see a message asking if you want to continue to enable the Matched Source.

  2. Click Yes to continue. 
    You see the Match With Source grid on the right. And you see the options at the bottom of the window change to Matched Source > Source Designer > Taxonomy Mapping, where Matched Source is underlined.

Link the Fields

In the Match With Source grid, you can now link the fields you want to match by using a drag-and-drop operation to drag a field from the main Data Object grid to a Match With Source grid field. 

To easily find the fields, you can start typing the field name in the search box. The system filters the content of the grid as you type. Another useful option is to use the Mapped, Not Mapped, and Filtered tabs.

Fields Linked to Match With Source grid

The keys are different for different mashups. For example, the key for the SMF mashup contains Security Alias, for Generic Entity it is Entity ID, and so on.

To remove the link for a field, in the right Match With Source grid, delete the corresponding expression from the Match With column. 

Provide Matching Properties

Matching key expressions are mandatory fields. They tell the application which records to compare. 

In this example, you are comparing records which belong to the same entity_id and security_alias. Therefore the Matching expression on both sides is |ENTITY_ID| + |SECURITY_ALIAS|.

To set matching parameters: 

  1. At the right side of the window, click Properties to expand the Properties floating pane.

  2. Specify the value for the Left Key Expression and the Right Key Expression.
    As you start typing in the expression fields, the autocomplete drop-down lists all the available variables. In this example, the Matching expression on both sides is |ENTITY_ID| + |SECURITY_ALIAS|

  3. In the Include Matches to Result check box, you can include matched records from the result dataset by selecting the corresponding check box.
    Otherwise, you can exclude matched records from the result dataset by clearing the corresponding check box.

  4. In the Common Float Tolerance box, you can provide the default tolerance for numeric fields.
    In this example, it is set to 0.02 = 2%.

  5. You can overwrite this default value by setting specific tolerances for each field in the Tolerance Diff column of the Match With Source grid.
    The records in the result set, for which the difference is less than specified in the tolerance, will be treated as matched.

Note that the default name of the right data set is match_with. You are going to use it later when you define filtering options for run time requests.

Map in Source Designer

The Source Designer mode allows you to enrich your data with additional mashups, but for example it is not necessary. In this example, you simply map all the fields to the Vocabulary.

To map all the fields to the Vocabulary:

  1. At the bottom of the window, click Source Designer.
    You see the CompositeSource base grid and the Vocabulary grid. 

  2. In the CompositeSource base grid, right-click and then click Select All Rows.

  3. Drag the fields all at once to the destination grid.

Map the Taxonomy

The taxonomy mapping for this example is mostly straightforward as well. You just add one calculated field to see the actual absolute difference for the local market value.

The expression used is:  abs(atof(|left_LOCAL_MARKET_VALUE|) - atof(|right_LOCAL_MARKET_VALUE|)) 

Notice that atof() functions are necessary to convert the LOCAL_MARKET_VALUE to a number representation before making any math operations with them. This is because by default all the values are assumed to be character strings.

Run a Test

In the Run Time Request (RTR) message, you have to provide the correct filtering options for the left and right data sets.

For both sides in this example, you want to see values for same SN20 and same source - STARDIRECT, but you use different effective dates for the left and right sides.

To run a test:

  1. On the Solution tab, in the Debug group, click Test Solution.
    You see the Run window, with the Task Parameters tab selected by default. 

  2. Specify the task parameter values.
    For both sides in this example, you want to see values for same SN20 and same source - STARDIRECT, but you use different effective dates for the left and right sides. The filtering Parameter Names for the right data set should be prefixed with the data set name, which is match_with by default. The parameter names for the left data set do not need any prefix.

  3. Click the Raw RTR tab to see how Run Time Request message will look.
    You will need this information when you are ready to run the interface from outside of the EDS tool.

  4. Click Run. 
    You can see the results, as follows. The M in the status fields means Match, and MIS means Mismatch.

  5. Click Close.