Budapest HU
Sydney AU
London UK

Cross Match Walkthrough

In this example we demonstrate using the Mars microservices to compare records in two different formats, one in the format of a GLEIF record originating from a GLEIF XML file and the other a flat record – probably from a table as it doesn’t exhibit any nested nature.

In the crossMatch.json file in the resources to this page, you will find two records in json format, one looks like it came from an GLEIF source and the other a Company record from a table.

[
  {
        'Table': 'GLEIF', 
	'Source Name': 'LEI',
	'LEI': '212345',
	'Entity': {
		LegalName: 'Ally Auto Receivables Trust 2014-1',
		'HeadquartersAddress': {
			'Country': 'GB',
                        'FirstAddressLine': '1 NEW CHANGE',
                        'City': 'London'
		},
                'RegistrationAuthority': {
                   'RegistrationAuthorityEntityID': 'GB99890909'
	        }
        }
  },
  {
        'Table': 'Company', 
	'Source Name': 'Internal',
	'SRC_PKEY': '333334',
        'Name': 'Allie Auto Rec Trust 2014-1',
        'RegCoNum': 'GB99890909',
        'AddressLine1': '1 New Change',
        'City': 'London',
        'NatBus': 'GB'
  }
]

You will note the two records are provided in a list of objects, one object for each record, and differently to the GLEIF example we have added a “Table” attribute, this attribute is key to the successful processing of the data as it tells the Mars system how to deal with the object. In our schemaCompany2 included in the resources below and also provided in the docker install in the volume “schemas” – you will find the definition of both a GLEIF and Company table, this will enable the system to interpret the  data, in addition please note the purposeColumnMappings for the new Company table.

The “Table” property is not mandatory if you are comparing the same types of records, it can be passed as a path parameter to the rest interface, in addition this can then be overridden by the Table property of the record. For example if we call the rest method compare with a path http://hostname:port/CrossMatch/GLEIF then the system will default to assuming the Table to use if the GLEIF table and you only need to provide the “Table” property in the record if the table is not of that type – ie Company!

Please see the example CURL call to match the two records.

curl --data @"crossMatch.json" -H "Content-Type: application/json" -X POST http://localhost:8080/compare/CrossMatch/

//or to default to GLEIF as the Table type:

curl --data @"crossMatch.json" -H "Content-Type: application/json" -X POST http://localhost:8080/compare/CrossMatch/GLEIF

This will produce an output file with records in the following form, all valid comparisons will be included regardless of their score – the important thing to note is the acceptance for the match in the output – the values for this would be Auto-Match, Reject, or User-Review.

[
  {
    "score": 83.33333333333334,
    "acceptance": "User-Review",
    "action": "EID",
    "actionText": "Link",
    "rule": {
      "canMatchSameSystem": true,
      "systemMatchType": 0,
      "lowScore": 80.0,
      "highScore": 95.0,
      "actionText": ""
    },
    "records": [
      {
        "Table": "Company",
        "Source Name": "Internal",
        "SRC_PKEY": "333334",
        "Name": "Allie Auto Rec Trust 2014-1",
        "RegCoNum": "GB99890909",
        "AddressLine1": "1 New Change",
        "City": "London",
        "NatBus": "GB",
        "standardized": {
          "Company_Name": [
            {
              "Class": "com.identiza.entity.resolve.types.StandardCompanyName",
              "gradient": 0,
              "baseTokens": [
                "ALLIE",
                "AUTO",
                "REC",
                "TRUST",
                "2014",
                "1"
              ],
              "originalWords": [
                "ALLIE",
                "AUTO",
                "REC",
                "TRUST",
                "2014",
                "1"
              ]
            }
          ],
          "RegCoNum": [
            {
              "Class": "com.identiza.entity.resolve.types.StandardString",
              "baseTokens": [
                "GB99890909"
              ],
              "originalWords": [
                "GB99890909"
              ]
            }
          ],
          "Address": [
            {
              "Class": "com.identiza.entity.resolve.types.StandardAddress",
              "unitNumber": -1,
              "startHouseNumber": 1,
              "endHouseNumber": 1,
              "locality": "NEW CHANGE LONDON GB",
              "gradient": 0,
              "baseTokens": [
                "1",
                "NEW",
                "CHANGE",
                "LONDON",
                "GB"
              ],
              "originalWords": [
                "1",
                "NEW",
                "CHANGE",
                "LONDON",
                "GB"
              ]
            }
          ]
        }
      },
      {
        "Table": "GLEIF",
        "Source Name": "LEI",
        "LEI": "212345",
        "Entity": {
          "LegalName": "Ally Auto Receivables Trust 2014-1",
          "HeadquartersAddress": {
            "Country": "GB",
            "FirstAddressLine": "1 NEW CHANGE",
            "City": "London"
          },
          "RegistrationAuthority": {
            "RegistrationAuthorityEntityID": "GB99890909"
          }
        },
        "standardized": {
          "Company_Name": [
            {
              "Class": "com.identiza.entity.resolve.types.StandardCompanyName",
              "gradient": 0,
              "baseTokens": [
                "ALLY",
                "AUTO",
                "RECEIVABLE",
                "TRUST",
                "2014",
                "1"
              ],
              "originalWords": [
                "ALLY",
                "AUTO",
                "RECEIVABLES",
                "TRUST",
                "2014",
                "1"
              ]
            }
          ],
          "RegCoNum": [
            {
              "Class": "com.identiza.entity.resolve.types.StandardString",
              "baseTokens": [
                "GB99890909"
              ],
              "originalWords": [
                "GB99890909"
              ]
            }
          ],
          "Address": [
            {
              "Class": "com.identiza.entity.resolve.types.StandardAddress",
              "unitNumber": -1,
              "startHouseNumber": 1,
              "endHouseNumber": 1,
              "locality": "NEW CHANGE LONDON",
              "gradient": 0,
              "baseTokens": [
                "1",
                "NEW",
                "CHANGE",
                "LONDON"
              ],
              "originalWords": [
                "1",
                "NEW",
                "CHANGE",
                "LONDON"
              ]
            }
          ]
        }
      }
    ]
  }
]


Resources you may need:

Cross Match Schema

Cross Match Demo File