NAV Navbar
Python Java C G2Command shell
  • Introduction
  • Quickstart
  • G2Engine
  • G2Config
  • G2Product
  • G2Audit
  • Getting Stuff Done
  • Introduction

    Welcome to the Senzing API reference. The APIs allow you to embed and leverage Senzing's world-class Entity Resolution capabilities into your applications, solutions and systems.

    If you're new to Senzing and Entity Resolution be sure to check out basic information on Senzing and our technology. Before you go any further and if you haven't already, register for the knowledge center this provides access to information, articles, FAQs, etc. Links herein refer to the knowledge center; you really should register!

    System Requirements

    Current requirements for deploying G2 and utilizing the APIs can be found at System Requirements.

    Messaging Format

    The G2 APIs currently accept request messages and return response messages in JSON format. The JSON format and terms understood by G2 are outlined in the Generic Entity Specification.

    APIs that accept a file as input expect the file to also be JSON adhering to the Generic Entity Specification.

    Arguments

    Many of the APIs accept one or more arguments, some of which are required and others optional. Required arguments are indicated with surrounding <...> and optional arguments with [...]

    Arguments are documented with their respective API information.

    Quickstart

    G2Command Quickstart Tutorial

    For a quickstart tutorial on the G2Command shell, visit our G2Command Quickstart Tutorial.

    Interpreting Entity API Response Messages

    For a quickstart tutorial on interpreting entity API response messages, visit the Interpreting Entity API Response Messages tutorial

    G2Engine

    Engine

    Initialization

    Example code:

    from G2Engine import G2Engine
    
    #----------------------------------------
    if __name__ == '__main__':
        moduleName = "pyG2",
        iniFilename = "G2Module.ini"
        verboseLogging = False
        configID = bytearray([])
    
        # Create the G2Engine object with the G2Module.ini once per process
        engine = G2Engine()
    
        # Initialize the G2Engine once per process. This will take a few seconds.
        initRet = engine.init(moduleName, iniFilename, verboseLogging, configID)
    
    
    import com.senzing.g2.engine.G2Engine;
    import com.senzing.g2.engine.G2JNI;
    import com.senzing.g2.engine.Result;
    
    //...
    
        String moduleName = "G2JNI";
        String iniFilename = args[0];
        boolean verboseLogging = false;
        Result<Long> configID = new Result<Long>();
    
    /** init */    
        G2Engine engine = new G2JNI();
        int initResult = engine.init(moduleName, iniFilename, verboseLogging, configID);
    
    
    
    #include "libg2.h"
    #include <stdio.h>
    #include <stdlib.h>
    
    int main(int argc, char *argsz[])
    {
        char *moduleName = "g2module";
        char *iniFilename = "/opt/senzing/g2/python/G2Module.ini";
        bool verboseLogging = false;
        int ret = G2_init(moduleName, iniFilename, verboseLogging);
    
    /* Alternatively, use the G2_initAndGetConfigID() function to return the configID.
     * Be sure to choose only one of the initialization functions per process
    
        long long configID;
        int ret2 = G2_initAndGetConfigID(moduleName, iniFilename, verboseLogging, &configID);
    */
    }
    
    
    python G2Command.py
    

    To start using the Senzing engine, you must first create and initialize an instance of the engine -- this should be done once per process. Create a new instance of the Senzing engine and assign it to a variable. Then, call the init method to initialize the engine. During the call, the init method accepts the following parameters:

    Calling this function will return "0" upon success - useful for error handling.

    Prime Engine

    Example code:

         #primeEngine
         ret = engine.primeEngine()
    
    
    /** primeEngine */
        int ret = engine.primeEngine();
    
    
        //primeEngine
        int ret = G2_primeEngine();
    
    

    The primeEngine() method may optionally be called to pre-initialize some of the heavier weight internal resources of the G2 engine.

    Uninitialization

    Example code:

       # When done with all G2 requests in the process, shutdown the G2Engine
       engine.destroy()
    
    
    /** destroy */
        int destroyResult = engine.destroy();
    
    
        int ret = G2_destroy();
    
    
    (g2) quit
    Ending Terminal.
    
    (g2) exit
    Ending Terminal.
    
    (g2) <CTRL-C>
    
    Are you sure you want to exit?  yes
    ^C
    

    Once all searching is done in a given process, call destroy() to unitialize Senzing and clean up resources. You should always do this once at the end of each process.

    Statistics

    Example code:

         #Retrieve stats
         ret = engine.stats()
         print ret
    
    
    /** stats */
        String stats = engine.stats();
    
        System.out.println("STATS: " + stats);
    
    
        char *response = NULL;
        size_t bufSize = 0;
    
        //stats
        int ret = G2_stats(&response,&bufSize,realloc);
        printf("STATS: %s\n", response);
        free(response);
    
    

    Example response:

    { "workload": { "records": 0,  "loadedRecords": -1,  "delete records": 0,  "duration": 0,  "retries": 0,  "candidates": 0,  "ambiguousTest": 0,  "unresolveTest": 0,  "grouperKeyMatch": 0,  "busyWait": 0,  "longBusyWait": 0,  "gnrScorersUsed": 1,  "scoredPairs": [ ],  "cacheHit": [ ],  "cacheMiss": [ ],  "redoTriggers": [ ],  "latchContention": [ ],  "genericDetect": [ ],  "candidateBuilders": [ ] } }
    
    

    Call stats() to retrieve workload statistics for the current process. These statistics will automatically reset after retrieval.

    (Note: when using C, the stats() method accepts the following three parameters as input:

    Export Config

    Example code:

        response = bytearray("")
        configID = bytearray([]) 
    
        #exportConfig
        ret = engine.exportConfig(response, configID)
    
        print str(response)
    
    
        StringBuffer response = new StringBuffer();
        Result<Long> configID = new Result<Long>();
    
    /** exportConfig */
        int ret = engine.exportConfig(response, configID);
    
        System.out.println("CONFIG: " + response.toString());
    
    
        char *response = NULL;
        size_t bufSize = 0;
    
        //exportConfig
        int ret = G2_exportConfig(&response,&bufSize,realloc);
        printf("EXPORT CONFIG: %s\n", response);
        free(response);
    
        //exportConfigAndConfigID
        response = NULL;
        long long configID;
        int ret = G2_exportConfigAndConfigID(&response, &bufSize, realloc, &configID);
        printf("CONFIG ID: %ll\n", configID);
    
    

    Example response is really, really long...

    Call exportConfig to retrieve your Senzing engine's configuration. The call will assign a JSON document to a user-designated buffer, containing all relevant configuration information -- the function itself will return "0" upon success. The exportConfig function accepts the following parameters as input:

    Active ConfigID

    Example code:

    from G2Engine import G2Engine
    
    #----------------------------------------
    if __name__ == '__main__':
       # Create the G2Engine object with the G2Module.ini once per process
       engine = G2Engine()
    
       # Initialize the G2Engine once per process. This will take a few seconds.
       engine.init('pyG2', 'G2Module.ini', True)
    
       # Get active configID
       configID = bytearray([])
       ret = engine.getActiveConfigID(configID)
    
       print("Active configID: " + str(configID))
    
       # When done with all G2 requests in the process, shutdown the G2Engine
       engine.destroy()
    
    
        Result<Long> configID = new Result<Long>();
    
    /** getActiveConfigID */
        int ret = engine.getActiveConfigID(configID);
    
        System.out.println("Active configID: " + configID.getValue());
    
    
        long long configID;
    
        //getActiveConfigID
        int ret = G2_getActiveConfigID(&configID);
        printf("Active configID: %ld\n", configID);
    
    

    Example response:

    Active configID: 113127798
    
    

    Call getActiveConfigID() to return an identifier for the loaded Senzing engine configuration. The call will assign a long integer to a user-designated variable -- the function itself will return "0" upon successThe getActiveConfigID() method accepts one parameter as input:

    Repository's Last Modified Time

    Example code:

    from G2Engine import G2Engine
    
    #----------------------------------------
    if __name__ == '__main__':
       # Create the G2Engine object with the G2Module.ini once per process
       engine = G2Engine()
    
       # Initialize the G2Engine once per process. This will take a few seconds.
       engine.init('pyG2', 'G2Module.ini', True)
    
       # Get repository's last modified time
       lastModifiedTime = bytearray([])
       ret = engine.getRepositoryLastModifiedTime(lastModifiedTime)
    
       print("Last modified time: " + str(lastModifiedTime))
    
       # When done with all G2 requests in the process, shutdown the G2Engine
       engine.destroy()
    
    
        Result<Long> lastModifiedTime = new Result<Long>();
    
    /** getRepositoryLastModifiedTime */
        int ret = engine.getRepositoryLastModifiedTime(lastModifiedTime);
    
        System.out.println("Last modified time: " + lastModifiedTime.getValue());
    
    
        long long lastModifiedTime;
    
        //getRepositoryLastModifiedTime
        int ret = G2_getRepositoryLastModifiedTime(&lastModifiedTime);
        printf("Last modified time: %ld\n", lastModifiedTime);
    
    

    Example response:

    Last modified time: 1530887677083
    
    

    Call getRepositoryLastModifiedTime() to obtain the last modified time of the Senzing repository, measured in the number of seconds between the last modified time and January 1, 1970 12:00am GMT (epoch time). The call will assign a long integer to a user-designated buffer -- the function itself will return "0" upon success. The getRepositoryLastModifiedTime() method accepts one parameter as input:

    Data Manipulation

    Entity data can be easily loaded into the data repository through the use of the G2 interface. This allows for a more direct way of adding (or removing) data from an application system.

    There is much background on the core of the JSON messages in the Generic Entity Specification article. This information can help to create the necessary JSON documents for specifying entity attributes.

    With a few function calls, you can manipulate data using a few key fields and a simple JSON document outlining the entity attributes.

    Adding Records

    Example code:

        dataSourceCode = 'TEST'
        recordID = 'entity_record_id'
        jsonData = '{"NAMES": [{ "NAME_TYPE": "PRIMARY", "NAME_LAST": "Smith", "NAME_FIRST": "John", "NAME_MIDDLE": "M"}], "PASSPORT_NUMBER": "PP11111", "PASSPORT_COUNTRY": "US", "DRIVERS_LICENSE_NUMBER": "DL11111", "SSN_NUMBER": "111-11-1111" }'
        loadID = None
    
        # Add data record(s)
        # Make as many parallel requests as desired.
        ret = engine.addRecord(dataSourceCode,recordID,jsonData,loadID)
    
        # addRecordWithRecordID
        recordID2 = bytearray("")
        ret = engine.addRecordWithReturnedRecordID(dataSourceCode,recordID,jsonData,loadID)
    
        print("New Record ID: "+str(recordID))
    
    
    
        String dataSourceCode = "TEST";
        String recordID = "RECORD3";
        String jsonData =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JANE\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}";
        String loadID = null;
    
    /** addRecord */
        int ret = engine.addRecord(dataSourceCode, recordID, jsonData, loadID);
    
    /** addRecordWithReturnedRecordID */
        StringBuffer recordID2 = new StringBuffer();
        int ret2 = engine.addRecordWithReturnedRecordID(dataSourceCode, recordID2, jsonData, loadID);
    
        System.out.println("New Record ID: " + recordID2.toString());
    
    
        const char *dataSourceCode = "TEST";
        const char *recordID = "RECORD3";
        const char *jsonData =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JANE\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}";
        const char *loadID = NULL;
    
        //Add record
        int ret = G2_addRecord(dataSourceCode, recordID, jsonData, loadID);
    
        char recordID2[64*1028];
    
        //Add record with returned id
        int ret2 = G2_addRecordWithReturnedRecordID(dataSourceCode, jsonData, loadID, recordID2, sizeof(response));
        printf("New Record ID: %s\n", recordID2);
    
    

    Example response:

    New Record ID: 49AD3C65923BFAC7275ACB06019131E353B0373C
    
    

    Once the Senzing engine is initialized, use addRecord() to load a record into the Senzing repository -- addRecord() can be called as many times as desired and from multiple threads at the same time. The addRecord() function returns "0" upon success, and accepts four parameters as input:

    Relatedly, the addRecordWithReturnedRecordID() method behaves identically to addRecord(), with the single difference that the user does not pre-specify the record ID of the added record. Rather, addRecordWithReturnedRecordID() generates a new, unique record ID for the record loaded into the Senzing repository. In particular, addRecordWithReturnedRecordID() accepts the following parameters as input:

    Deleting Records

    Example code:

        dataSourceCode = 'TEST'
        recordID = 'entity_record_id'
        loadID = None
    
        #deleteRecord
        ret = engine.deleteRecord(dataSourceCode,recordID,loadID)
    
    
        String dataSourceCode = "TEST";
        String recordID = "RECORD3";
        String loadID = null;
    
    /** deleteRecord */
        int ret = engine.deleteRecord(dataSourceCode, recordID, loadID);
    
    
        const char *dataSourceCode = "TEST";
        const char *recordID = "RECORD3";
        const char *loadID = NULL;
    
        //Delete record
        int ret = G2_deleteRecord(dataSourceCode, recordID, loadID);
    
    

    Similarly, use deleteRecord() to remove a record from the data repository (returns "0" upon success) ; deleteRecord() can be called as many times as desired and from multiple threads at the same time. The deleteRecord() function accepts three parameters as input:

    Replacing Records

    Example code:

        dataSourceCode = 'TEST'
        recordID = 'entity_record_id'
        jsonData = '{"NAMES": [{ "NAME_TYPE": "PRIMARY", "NAME_LAST": "Smith", "NAME_FIRST": "John", "NAME_MIDDLE": "M"}], "PASSPORT_NUMBER": "PP11111", "PASSPORT_COUNTRY": "US", "DRIVERS_LICENSE_NUMBER": "DL11111", "SSN_NUMBER": "111-11-1111" }'
        loadID = None
    
        #replaceRecord
        ret = engine.replaceRecord(dataSourceCode,recordID,jsonData,loadID)
    
    
        String dataSourceCode = "TEST";
        String recordID = "RECORD3";
        String jsonData =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JANE\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}";
        String loadID = null;
    
    /** replaceRecord */
        int ret = engine.replaceRecord(dataSourceCode, recordID, jsonData, loadID);
    
    
        const char *dataSourceCode = "TEST";
        const char *recordID = "RECORD3";
        const char *jsonData =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JANE\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}";
        const char *loadID = NULL;
    
        //Replace record
        int ret = G2_replaceRecord(dataSourceCode, recordID, jsonData, loadID);
    
    

    Use the replaceRecord() function to update or replace a record in the data repository (if record doesn't exist, a new record is added to the data repository). Like the above functions, replaceRecord() returns "0" upon success, and it can be called as many times as desired and from multiple threads at the same time. The replaceRecord() function accepts four parameters as input:

    Loading data and exporting is the core use case for batch style Entity Resolution but, when it comes to interactive use of Entity Resolution intelligence, search is a key component. The core Senzing engine provides real-time search capabilities that are easily accessed via the available G2Engine.py interface.

    There is much background on the core of the JSON messages in the Generic Entity Specification article.

    Retrieve a Record

    Example code:

        dataSourceCode = 'TEST'
        recordID = 'entity_record_id'
        response = bytearray("")
    
    
        # getRecord
        ret = engine.getRecord(dataSourceCode,recordID,response)
        print str(response)
    
    
        String dataSourceCode = "TEST";
        String recordID = "RECORD3";
        StringBufer response = new StringBuffer();
    
    /** getRecord */
        int ret = engine.getRecord(dataSourceCode, recordID, response);
    
        System.out.println("GET RECORD: " + response.toString());
        System.out.println("");
    
    
        const char *dataSourceCode = "TEST";
        const char *recordID = "RECORD3";
        char *response = NULL;
        size_t bufSize = 0;
    
        //Get record
        int ret = G2_getRecord(dataSourceCode, recordID, &response, &bufSize, realloc);
        printf("RECORD: %s\n", response);
        free(response);
    
    

    Example output:

    {
      "JSON_DATA": "{\"NAMES\":[{\"NAME_TYPE\":\"PRIMARY\",\"NAME_LAST\":\"Smith\",\"NAME_FIRST\":\"John\",\"NAME_MIDDLE\":\"M\"}],\"PASSPORT_NUMBER\":\"PP11111\",\"PASSPORT_COUNTRY\":\"US\",\"DRIVERS_LICENSE_NUMBER\":\"DL11111\",\"SSN_NUMBER\":\"111-11-1111\",\"DATA_SOURCE\":\"TEST\",\"ENTITY_TYPE\":\"TEST\",\"DSRC_ACTION\":\"A\",\"LOAD_ID\":\"\",\"LENS\":\"DEFAULT\",\"RECORD_ID\":\"entity_record_id\"}",
      "NAME_DATA": [
        "PRIMARY: Smith John M"
      ],
      "ATTRIBUTE_DATA": [],
      "IDENTIFIER_DATA": [
        "DRLIC: DL11111",
        "PASSPORT: PP11111 US",
        "SSN: 111-11-1111"
      ],
      "ADDRESS_DATA": [],
      "PHONE_DATA": [],
      "RELATIONSHIP_DATA": [],
      "ENTITY_DATA": [],
      "OTHER_DATA": [
        "LENS: DEFAULT"
      ],
      "DATA_SOURCE": "TEST",
      "RECORD_ID": "entity_record_id",
      "ENTITY_TYPE": "TEST",
      "ENTITY_KEY": "D8250B485CFEC5F5218F60C831CF3160E1DECAE7",
      "OBS_ENT_HASH": "D8250B485CFEC5F5218F60C831CF3160E1DECAE7"
    }
    
    

    Use getRecord() to retrieve a single record from the data repository; the record is assigned in JSON form to a user-designated buffer, and the function itself returns "0" upon success. Once the Senzing engine is initialized, getRecord() can be called as many times as desired and from multiple threads at the same time. The getRecord() function accepts the following parameters as input:

    Example code:

        dataSourceCode = 'TEST'
        jsonData = '{"NAMES": [{ "NAME_TYPE": "PRIMARY", "NAME_LAST": "Smith", "NAME_FIRST": "John", "NAME_MIDDLE": "M"}], "PASSPORT_NUMBER": "PP11111", "PASSPORT_COUNTRY": "US", "DRIVERS_LICENSE_NUMBER": "DL11111", "SSN_NUMBER": "111-11-1111" }'
        recordID = 'entity_record_id'
        loadID = None
    
        #addRecord
        ret = engine.addRecord(dataSourceCode,recordID,jsonData,loadID)
    
        #...
    
        entityID = 1
        response = bytearray("")
    
        #getEntityByEntityID
        ret2 = engine.getEntityByEntityID(entityID,response)
        print str(response)
    
        #...
    
        response = bytearray("")
    
        #getEntityByRecordID
        ret3 = engine.getEntityByRecordID(dataSourceCode,recordID,response)
        print str(response)
    
        #...
    
        response = bytearray("")
    
        #searchByAttributes
        ret4 = engine.searchByAttributes(jsonData,response)
        print str(response)
    
    
        String dataSourceCode = "TEST";
        String recordID = "RECORD3";
        String jsonData =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JANE\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}";
        String loadID = null;
    
    /** addRecord */
        int ret = engine.addRecord(dataSourceCode, recordID, jsonData, loadID);
    
    //...
    
        long entityID = 1;
        StringBuffer response = new StringBuffer();
    
    /** getEntityByEntityID */
        int ret2 = engine.getEntityByEntityID(entityID, response);
        System.out.println("GET Entity: " + response.toString());
    
    //...
    
        response = new StringBuffer();
    
    /** getEntityByRecordID */
        int ret3 = engine.getEntityByRecordID(dataSourceCode,recordID,response);
        System.out.println("GET Entity: " + response.toString());
    
    //... 
    
        response = new StringBuffer();
    
    /** searchByAttributes */
        int ret4 = engine.searchByAttributes(jsonData, response);
        System.out.println("GET Entity: " + response.toString());
    
    
        const char *dataSourceCode = "TEST";
        const char *recordID = "RECORD3";
        const char *jsonData =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JANE\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}";
        const char *loadID = NULL;
    
        //Add record
        int ret = G2_addRecord(dataSourceCode, recordID, jsonData, loadID);
    
        char *response = NULL;
        size_t bufSize = 0;
        const long long entityID = 4001;
    
        //Get entity by entityID
        int ret1 = G2_getEntityByEntityID(entityID, &response, &bufSize, realloc);
        printf("ENTITY: %s\n", response);
        free(response);
    
        response = NULL;
    
        //Get entity by recordID
        int ret2 = G2_getEntityByRecordID(dataSourceCode,recordID,&response, &bufSize,realloc);
        printf("ENTITY: %s\n", response);
        free(response);
    
        response = NULL;
    
        //Search by entity attributes
        int ret1 = G2_searchByAttributes(jsonData, &response, &bufSize, realloc);
        printf("RECORD: %s\n", response);
        free(response);
    
    

    Example return:

    {
      "RESOLVED_ENTITY": {
        "ENTITY_ID": 3001,
        "LENS_ID": 1,
        "FEATURES": {
          "DRLIC": [
            {
              "FEAT_DESC": "DL11111",
              "LIB_FEAT_ID": 3003,
              "FEAT_DESC_VALUES": [
                {
                  "FEAT_DESC": "DL11111",
                  "LIB_FEAT_ID": 3003
                }
              ]
            }
          ],
          "NAME": [
            {
              "FEAT_DESC": "JOHN M SMITH",
              "LIB_FEAT_ID": 3001,
              "UTYPE_CODE": "PRIMARY",
              "FEAT_DESC_VALUES": [
                {
                  "FEAT_DESC": "JOHN M SMITH",
                  "LIB_FEAT_ID": 3001
                }
              ]
            }
          ],
          "PASSPORT": [
            {
              "FEAT_DESC": "PP11111 US",
              "LIB_FEAT_ID": 10,
              "FEAT_DESC_VALUES": [
                {
                  "FEAT_DESC": "PP11111 US",
                  "LIB_FEAT_ID": 10
                }
              ]
            }
          ],
          "SSN": [
            {
              "FEAT_DESC": "111-11-1111",
              "LIB_FEAT_ID": 3002,
              "FEAT_DESC_VALUES": [
                {
                  "FEAT_DESC": "111-11-1111",
                  "LIB_FEAT_ID": 3002
                }
              ]
            }
          ]
        },
        "RECORDS": [
          {
            "JSON_DATA": {
              "NAMES": [
                {
                  "NAME_TYPE": "PRIMARY",
                  "NAME_LAST": "Smith",
                  "NAME_FIRST": "John",
                  "NAME_MIDDLE": "M"
                }
              ],
              "PASSPORT_NUMBER": "PP11111",
              "PASSPORT_COUNTRY": "US",
              "DRIVERS_LICENSE_NUMBER": "DL11111",
              "SSN_NUMBER": "111-11-1111",
              "DATA_SOURCE": "TEST",
              "ENTITY_TYPE": "TEST",
              "DSRC_ACTION": "A",
              "LOAD_ID": "",
              "LENS": "DEFAULT",
              "RECORD_ID": "entity_record_id",
              "ENTITY_KEY": "D8250B485CFEC5F5218F60C831CF3160E1DECAE7",
              "ENTITY_NAME": "John M Smith",
              "MATCH_KEY": "",
              "MATCH_SCORE": "",
              "ERRULE_CODE": "",
              "REF_SCORE": 0,
              "MATCH_LEVEL": 0
            },
            "NAME_DATA": [
              "PRIMARY: Smith John M"
            ],
            "ATTRIBUTE_DATA": [],
            "IDENTIFIER_DATA": [
              "DRLIC: DL11111",
              "PASSPORT: PP11111 US",
              "SSN: 111-11-1111"
            ],
            "ADDRESS_DATA": [],
            "PHONE_DATA": [],
            "RELATIONSHIP_DATA": [],
            "ENTITY_DATA": [],
            "OTHER_DATA": [
              "LENS: DEFAULT"
            ]
          }
        ]
      },
      "RELATED_ENTITIES": [
        {
          "ENTITY_ID": 1,
          "LENS_ID": 1,
          "MATCH_LEVEL": 3,
          "MATCH_KEY": "+SSN+DRLIC+PASSPORT",
          "MATCH_SCORE": "10",
          "ERRULE_CODE": "SF1E",
          "REF_SCORE": 6,
          "FEATURES": {
            "ADDRESS": [
              {
                "FEAT_DESC": "111 FIRST ST LAS VEGAS NV 89111",
                "LIB_FEAT_ID": 4,
                "UTYPE_CODE": "HOME",
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "111 FIRST ST LAS VEGAS NV 89111",
                    "LIB_FEAT_ID": 4
                  },
                  {
                    "FEAT_DESC": "111 1ST ST LAS VEGAS NV 89222",
                    "LIB_FEAT_ID": 25
                  }
                ]
              },
              {
                "FEAT_DESC": "PO BOX 111 LAS VEGAS NV 89111",
                "LIB_FEAT_ID": 5,
                "UTYPE_CODE": "MAIL",
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "PO BOX 111 LAS VEGAS NV 89111",
                    "LIB_FEAT_ID": 5
                  }
                ]
              }
            ],
            "DOB": [
              {
                "FEAT_DESC": "1981-01-02",
                "LIB_FEAT_ID": 2,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "1981-01-02",
                    "LIB_FEAT_ID": 2
                  },
                  {
                    "FEAT_DESC": "1981-02-01",
                    "LIB_FEAT_ID": 24
                  }
                ]
              }
            ],
            "DRLIC": [
              {
                "FEAT_DESC": "DL11111 NV",
                "LIB_FEAT_ID": 9,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "DL11111 NV",
                    "LIB_FEAT_ID": 9
                  }
                ]
              }
            ],
            "EMAIL_ADDR": [
              {
                "FEAT_DESC": "BOB@JONESFAMILY.COM",
                "LIB_FEAT_ID": 12,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "BOB@JONESFAMILY.COM",
                    "LIB_FEAT_ID": 12
                  }
                ]
              }
            ],
            "GENDER": [
              {
                "FEAT_DESC": "M",
                "LIB_FEAT_ID": 3,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "M",
                    "LIB_FEAT_ID": 3
                  }
                ]
              }
            ],
            "LOGIN_ID": [
              {
                "FEAT_DESC": "@BOBJONES27",
                "LIB_FEAT_ID": 11,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "@BOBJONES27",
                    "LIB_FEAT_ID": 11
                  }
                ]
              }
            ],
            "NAME": [
              {
                "FEAT_DESC": "ROBERT M JONES",
                "LIB_FEAT_ID": 1,
                "UTYPE_CODE": "PRIMARY",
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "ROBERT M JONES",
                    "LIB_FEAT_ID": 1
                  },
                  {
                    "FEAT_DESC": "BOBBY JONES",
                    "LIB_FEAT_ID": 23
                  }
                ]
              }
            ],
            "PASSPORT": [
              {
                "FEAT_DESC": "PP11111 US",
                "LIB_FEAT_ID": 10,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "PP11111 US",
                    "LIB_FEAT_ID": 10
                  }
                ]
              }
            ],
            "PHONE": [
              {
                "FEAT_DESC": "702-222-2222",
                "LIB_FEAT_ID": 6,
                "UTYPE_CODE": "CELL",
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "702-222-2222",
                    "LIB_FEAT_ID": 6
                  }
                ]
              },
              {
                "FEAT_DESC": "800-201-2001",
                "LIB_FEAT_ID": 7,
                "UTYPE_CODE": "WORK",
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "800-201-2001",
                    "LIB_FEAT_ID": 7
                  }
                ]
              }
            ],
            "SSN": [
              {
                "FEAT_DESC": "311-11-1111",
                "LIB_FEAT_ID": 8,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "311-11-1111",
                    "LIB_FEAT_ID": 8
                  }
                ]
              }
            ]
          },
          "RECORDS": [
            {
              "JSON_DATA": {
                "CELL_PHONE_NUMBER": "702-222-2222",
                "DATA_SOURCE": "PEOPLE",
                "DATE_OF_BIRTH": "1/2/1981",
                "DRIVERS_LICENSE_NUMBER": "DL11111",
                "DRIVERS_LICENSE_STATE": "NV",
                "DSRC_ACTION": "A",
                "EMAIL_ADDRESS": "bob@jonesfamily.com",
                "ENTITY_TYPE": "PEOPLE",
                "GENDER": "M",
                "HOME_ADDR_CITY": "Las Vegas",
                "HOME_ADDR_COUNTRY": "US",
                "HOME_ADDR_LINE1": "111 First St",
                "HOME_ADDR_LINE2": "",
                "HOME_ADDR_LINE3": "",
                "HOME_ADDR_POSTAL_CODE": "89111",
                "HOME_ADDR_STATE": "NV",
                "LOAD_ID": "sample_person.csv",
                "MAIL_ADDR_CITY": "Las Vegas",
                "MAIL_ADDR_COUNTRY": "US",
                "MAIL_ADDR_LINE1": "PO Box 111",
                "MAIL_ADDR_LINE2": "",
                "MAIL_ADDR_LINE3": "",
                "MAIL_ADDR_POSTAL_CODE": "89111",
                "MAIL_ADDR_STATE": "NV",
                "NIN_COUNTRY": "",
                "NIN_NUMBER": "",
                "PASSPORT_COUNTRY": "US",
                "PASSPORT_NUMBER": "PP11111",
                "PRIMARY_NAME_FIRST": "Robert",
                "PRIMARY_NAME_LAST": "Jones",
                "PRIMARY_NAME_MIDDLE": "M",
                "PRIMARY_NAME_PREFIX": "Mr",
                "PRIMARY_NAME_SUFFIX": "Jr",
                "RECORD_ID": "1001",
                "SOCIAL_HANDLE": "@bobjones27",
                "SOCIAL_NETWORK": "twitter",
                "SSN_NUMBER": "311-11-1111",
                "WORK_PHONE_NUMBER": "800-201-2001",
                "ENTITY_KEY": "DF3B1BE391A2BBDBA920EC75D0A8009A1CEEA347",
                "ENTITY_NAME": "Mr Robert M Jones Jr",
                "MATCH_KEY": "",
                "MATCH_SCORE": "",
                "ERRULE_CODE": "",
                "REF_SCORE": 0,
                "MATCH_LEVEL": 0
              },
              "NAME_DATA": [
                "PRIMARY: Jones Robert M Mr Jr"
              ],
              "ATTRIBUTE_DATA": [
                "DOB: 1/2/1981",
                "GENDER: M"
              ],
              "IDENTIFIER_DATA": [
                "DRLIC: DL11111 NV",
                "EMAIL_ADDR: bob@jonesfamily.com",
                "LOGIN_ID: twitter @bobjones27",
                "PASSPORT: PP11111 US",
                "SSN: 311-11-1111"
              ],
              "ADDRESS_DATA": [
                "HOME: 111 First St Las Vegas NV 89111 US",
                "MAIL: PO Box 111 Las Vegas NV 89111 US"
              ],
              "PHONE_DATA": [
                "CELL: 702-222-2222",
                "WORK: 800-201-2001"
              ],
              "RELATIONSHIP_DATA": [],
              "ENTITY_DATA": [],
              "OTHER_DATA": []
            },
            {
              "JSON_DATA": {
                "CELL_PHONE_NUMBER": "",
                "DATA_SOURCE": "PEOPLE",
                "DATE_OF_BIRTH": "2/1/1981",
                "DRIVERS_LICENSE_NUMBER": "",
                "DRIVERS_LICENSE_STATE": "",
                "DSRC_ACTION": "A",
                "EMAIL_ADDRESS": "",
                "ENTITY_TYPE": "PEOPLE",
                "GENDER": "M",
                "HOME_ADDR_CITY": "Las Vegas",
                "HOME_ADDR_COUNTRY": "",
                "HOME_ADDR_LINE1": "111 1st St",
                "HOME_ADDR_LINE2": "",
                "HOME_ADDR_LINE3": "",
                "HOME_ADDR_POSTAL_CODE": "89222",
                "HOME_ADDR_STATE": "NV",
                "LOAD_ID": "sample_person.csv",
                "MAIL_ADDR_CITY": "",
                "MAIL_ADDR_COUNTRY": "",
                "MAIL_ADDR_LINE1": "",
                "MAIL_ADDR_LINE2": "",
                "MAIL_ADDR_LINE3": "",
                "MAIL_ADDR_POSTAL_CODE": "",
                "MAIL_ADDR_STATE": "",
                "NIN_COUNTRY": "",
                "NIN_NUMBER": "",
                "PASSPORT_COUNTRY": "",
                "PASSPORT_NUMBER": "",
                "PRIMARY_NAME_FIRST": "Bobby",
                "PRIMARY_NAME_LAST": "Jones",
                "PRIMARY_NAME_MIDDLE": "",
                "PRIMARY_NAME_PREFIX": "",
                "PRIMARY_NAME_SUFFIX": "",
                "RECORD_ID": "1002",
                "SOCIAL_HANDLE": "",
                "SOCIAL_NETWORK": "",
                "SSN_NUMBER": "",
                "WORK_PHONE_NUMBER": "",
                "ENTITY_KEY": "FF1C69034FA4B3D82193A42843937478EBA2CB61",
                "ENTITY_NAME": "Bobby Jones",
                "MATCH_KEY": "+NAME+DOB+GENDER+ADDRESS",
                "MATCH_SCORE": "14",
                "ERRULE_CODE": "CNAME_CFF_CEXCL",
                "REF_SCORE": 8,
                "MATCH_LEVEL": 1
              },
              "NAME_DATA": [
                "PRIMARY: Jones Bobby"
              ],
              "ATTRIBUTE_DATA": [
                "DOB: 2/1/1981",
                "GENDER: M"
              ],
              "IDENTIFIER_DATA": [],
              "ADDRESS_DATA": [
                "HOME: 111 1st St Las Vegas NV 89222"
              ],
              "PHONE_DATA": [],
              "RELATIONSHIP_DATA": [],
              "ENTITY_DATA": [],
              "OTHER_DATA": []
            }
          ]
        },
        {
          "ENTITY_ID": 3,
          "LENS_ID": 1,
          "MATCH_LEVEL": 3,
          "MATCH_KEY": "+PASSPORT",
          "MATCH_SCORE": "3",
          "ERRULE_CODE": "SF1E",
          "REF_SCORE": 6,
          "FEATURES": {
            "ADDRESS": [
              {
                "FEAT_DESC": "333 3RD ST LAS VEGAS NV 89333",
                "LIB_FEAT_ID": 32,
                "UTYPE_CODE": "HOME",
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "333 3RD ST LAS VEGAS NV 89333",
                    "LIB_FEAT_ID": 32
                  }
                ]
              }
            ],
            "NAME": [
              {
                "FEAT_DESC": "MARTIN JONZE",
                "LIB_FEAT_ID": 31,
                "UTYPE_CODE": "PRIMARY",
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "MARTIN JONZE",
                    "LIB_FEAT_ID": 31
                  }
                ]
              }
            ],
            "NATIONAL_ID": [
              {
                "FEAT_DESC": "11111111",
                "LIB_FEAT_ID": 33,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "11111111",
                    "LIB_FEAT_ID": 33
                  }
                ]
              }
            ],
            "PASSPORT": [
              {
                "FEAT_DESC": "PP11111 US",
                "LIB_FEAT_ID": 10,
                "FEAT_DESC_VALUES": [
                  {
                    "FEAT_DESC": "PP11111 US",
                    "LIB_FEAT_ID": 10
                  }
                ]
              }
            ]
          },
          "RECORDS": [
            {
              "JSON_DATA": {
                "CELL_PHONE_NUMBER": "",
                "DATA_SOURCE": "PEOPLE",
                "DATE_OF_BIRTH": "",
                "DRIVERS_LICENSE_NUMBER": "",
                "DRIVERS_LICENSE_STATE": "",
                "DSRC_ACTION": "A",
                "EMAIL_ADDRESS": "",
                "ENTITY_TYPE": "PEOPLE",
                "GENDER": "",
                "HOME_ADDR_CITY": "Las Vegas",
                "HOME_ADDR_COUNTRY": "",
                "HOME_ADDR_LINE1": "333 3rd St",
                "HOME_ADDR_LINE2": "",
                "HOME_ADDR_LINE3": "",
                "HOME_ADDR_POSTAL_CODE": "89333",
                "HOME_ADDR_STATE": "NV",
                "LOAD_ID": "sample_person.csv",
                "MAIL_ADDR_CITY": "",
                "MAIL_ADDR_COUNTRY": "",
                "MAIL_ADDR_LINE1": "",
                "MAIL_ADDR_LINE2": "",
                "MAIL_ADDR_LINE3": "",
                "MAIL_ADDR_POSTAL_CODE": "",
                "MAIL_ADDR_STATE": "",
                "NIN_COUNTRY": "CA",
                "NIN_NUMBER": "11111111",
                "PASSPORT_COUNTRY": "US",
                "PASSPORT_NUMBER": "PP11111",
                "PRIMARY_NAME_FIRST": "Martin",
                "PRIMARY_NAME_LAST": "Jonze",
                "PRIMARY_NAME_MIDDLE": "",
                "PRIMARY_NAME_PREFIX": "",
                "PRIMARY_NAME_SUFFIX": "",
                "RECORD_ID": "1003",
                "SOCIAL_HANDLE": "",
                "SOCIAL_NETWORK": "",
                "SSN_NUMBER": "",
                "WORK_PHONE_NUMBER": "",
                "ENTITY_KEY": "2BEEAB3DFA2BBA2935B55BB6BF3A129A98AF4250",
                "ENTITY_NAME": "Martin Jonze",
                "MATCH_KEY": "",
                "MATCH_SCORE": "",
                "ERRULE_CODE": "",
                "REF_SCORE": 0,
                "MATCH_LEVEL": 0
              },
              "NAME_DATA": [
                "PRIMARY: Jonze Martin"
              ],
              "ATTRIBUTE_DATA": [],
              "IDENTIFIER_DATA": [
                "NATIONAL_ID: 11111111 CA",
                "PASSPORT: PP11111 US"
              ],
              "ADDRESS_DATA": [
                "HOME: 333 3rd St Las Vegas NV 89333"
              ],
              "PHONE_DATA": [],
              "RELATIONSHIP_DATA": [],
              "ENTITY_DATA": [],
              "OTHER_DATA": []
            }
          ]
        }
      ]
    }
    
    

    Entity searching is a key component for interactive use of Entity Resolution intelligence. The core Senzing engine provides real-time search capabilities that are easily accessed via the Senzing API. Senzing offers three primary methods for entity searching, all of which can be called as many times as desired and from multiple threads at the same time (and all of which return "0" upon success) .

    Use getEntityByEntityID() to retrieve entity data based on the ID of a resolved identity. This function accepts the following parameters as input:

    Use getEntityByRecordID() to retrieve entity data based on the record ID of a particular data record. This function accepts the following parameters as input:

    Finally, use searchByAttributes() to retrieve entity data based on a user-specified set of entity attributes. This function accepts the following parameters as input:

    Process

    The process() and processWithResponse() functions are low level functions only intended for special circumstances as directed by Senzing Support and as such will not be documented here. In general, please use addRecord(), deleteRecord(), and/or updateRecord() instead.

    Reporting

    Exporting entity data from resolved entities is one of the core purposes of Senzing software. In just a few short steps, the Senzing engine allows users to export entity data in either JSON or CSV format.

    Export JSON Entity Report

    Example code:

        #define a flag
        flag = 0x1
    
        #exportJSONEntityReport
        exportHandle = engine.exportJSONEntityReport(flag)
    
        #fetchNext
        response = engine.fetchNext(exportHandle)
        print response
    
        #closeExport
        engine.closeExport(exportHandle)
    
    
        /** define a flag */
        int flag = 0x1;
    
        /** exportJSONEntityReport */
        long exportHandle = engine.exportJSONEntityReport(flag);
    
        /** fetchNext */
        String response = engine.fetchNext(exportHandle);
        System.out.println(response);
    
        /** closeExport */
        engine.closeExport(exportHandle);
    
    
        /** define a flag */
        const int flag = 0x1;
    
        /** exportJSONEntityReport */
        ExportHandle exportHandle = G2_exportJSONEntityReport(flag);
    
        /** fetchNext */
        char response[64*1028];
    
        while (NULL != G2_fetchNext(exportHandle, response, sizeof(response))) {
            printf("Fetched: %s\n", response);
        }
    
        /** closeExport */
        G2_closeExport(exportHandle);
    
    

    Example output:

    {"RESOLVED_ENTITY":{"ENTITY_ID":1,"LENS_ID":1,"RECORDS":[{"JSON_DATA":{"NAME_TYPE":"PRIMARY","NAME_FIRST":"JOE","NAME_MIDDLE":"H","NAME_LAST":"SMITH","ADDR_TYPE":"HOME","ADDR_LINE1":"653 STATE ROUTE 7","ADDR_CITY":"FRESNO","ADDR_STATE":"CA","ADDR_POSTAL_CODE":"55073","DATE_OF_BIRTH":"1965-05-23","SSN_NUMBER":"345678999","DATA_SOURCE":"TEST","ENTITY_TYPE":"TEST","DSRC_ACTION":"A","LOAD_ID":"","LENS":"DEFAULT","RECORD_ID":"RECORD1","ENTITY_KEY":"E37AAD09DA421DEF77DAD493BA0430AA307BA997","ENTITY_NAME":"JOE H SMITH","MATCH_KEY":"","MATCH_SCORE":"","ERRULE_CODE":"","REF_SCORE":0,"MATCH_LEVEL":0},"NAME_DATA":["PRIMARY: SMITH JOE H"],"ATTRIBUTE_DATA":["DOB: 1965-05-23"],"IDENTIFIER_DATA":["SSN: 345678999"],"ADDRESS_DATA":["HOME: 653 STATE ROUTE 7 FRESNO CA 55073"],"PHONE_DATA":[],"RELATIONSHIP_DATA":[],"ENTITY_DATA":[],"OTHER_DATA":["LENS: DEFAULT"]},{"JSON_DATA":{"NAME_TYPE":"PRIMARY","NAME_FIRST":"JOSEPH","NAME_LAST":"SMITH","ADDR_TYPE":"HOME","ADDR_LINE1":"653 STATE ROUTE 7","ADDR_CITY":"FRESNO","ADDR_STATE":"CA","ADDR_POSTAL_CODE":"55073-1234","DATE_OF_BIRTH":"1965-05-23","SSN_NUMBER":"345678999","DATA_SOURCE":"TEST","ENTITY_TYPE":"TEST","DSRC_ACTION":"A","LOAD_ID":"","LENS":"DEFAULT","RECORD_ID":"RECORD2","ENTITY_KEY":"D66C1742ADA5BB5A4545834AF223DD075B7E4E9E","ENTITY_NAME":"JOSEPH SMITH","MATCH_KEY":"+NAME+DOB+ADDRESS+SSN","MATCH_SCORE":"17","ERRULE_CODE":"SF1_PNAME_CFF_CSTAB","REF_SCORE":10,"MATCH_LEVEL":1},"NAME_DATA":["PRIMARY: SMITH JOSEPH"],"ATTRIBUTE_DATA":["DOB: 1965-05-23"],"IDENTIFIER_DATA":["SSN: 345678999"],"ADDRESS_DATA":["HOME: 653 STATE ROUTE 7 FRESNO CA 55073-1234"],"PHONE_DATA":[],"RELATIONSHIP_DATA":[],"ENTITY_DATA":[],"OTHER_DATA":["LENS: DEFAULT"]}]}}
    
    

    There are three steps to exporting resolved entity data from the G2Engine object in JSON format. First, use the exportJSONEntityReport() method to generate a long integer, referred to here as an 'exportHandle'. The exportJSONEntityReport() method accepts one parameter as input:

    Second, use the fetchNext() method to read the exportHandle and export a row of JSON output containing the entity data for a single resolved entity. Note that successive calls of fetchNext() will export successive rows of entity data. The fetchNext() method accepts the following parameters as input:

    Finally, use the closeExport() method to close the exportHandle and clean up system resources. This should always be called once you are finished exporting resolved entity data. The closeExport() method accepts one parameter as input:

    Export CSV Entity Report

    Example code:

        #define a flag
        flag = 0x1
    
        #exportCSVEntityReport
        exportHandle = engine.exportCSVEntityReport(flag)
    
        #fetchNext
        response = engine.fetchNext(exportHandle)
        print response
    
        #closeExport currently unavailable in Python
    
    
        /** define a flag */
        int flag = 0x1;
    
        /** exportCSVEntityReport */
        long exportHandle = engine.exportCSVEntityReport(flag);
    
        /** fetchNext */
        String response = engine.fetchNext(exportHandle);
        System.out.println(response);
    
        /** closeExport */
        engine.closeExport(exportHandle);
    
    
        /** define a flag */
        const int flag = 0x1;
    
        /** exportJSONEntityReport */
        ExportHandle exportHandle = G2_exportCSVEntityReport(flag);
    
        /** fetchNext */
        char response[64*1028];
    
        while (NULL != G2_fetchNext(exportHandle, response, sizeof(response))) {
            printf("Fetched: %s\n", response);
        }
    
        /** closeExport */
        G2_closeExport(exportHandle);
    
    

    Example response:

    1,"JOE H SMITH",0,0,"","TEST","RECORD1","{""NAME_TYPE"":""PRIMARY"",""NAME_FIRST"":""JOE"",""NAME_MIDDLE"":""H"",""NAME_LAST"":""SMITH"",""ADDR_TYPE"":""HOME"",""ADDR_LINE1"":""653 STATE ROUTE 7"",""ADDR_CITY"":""FRESNO"",""ADDR_STATE"":""CA"",""ADDR_POSTAL_CODE"":""55073"",""DATE_OF_BIRTH"":""1965-05-23"",""SSN_NUMBER"":""345678999"",""DATA_SOURCE"":""TEST"",""ENTITY_TYPE"":""TEST"",""DSRC_ACTION"":""A"",""LOAD_ID"":"""",""LENS"":""DEFAULT"",""RECORD_ID"":""RECORD1""}"
    
    

    There are three steps to exporting resolved entity data from the G2Engine object in CSV format. First, use the exportCSVEntityReport() method to generate a long integer, referred to here as an 'exportHandle'. The exportCSVEntityReport() method accepts one parameter as input:

    Second, use the fetchNext() method to read the exportHandle and export a row of CSV output containing the entity data for a single resolved entity. Note that the first call of fetchNext() may yield a header row, and that successive calls of fetchNext() will export successive rows of entity data. The fetchNext() method accepts the following parameters as input:

    Finally, use the closeExport() method to close the exportHandle and clean up system resources. This should always be called once you are finished exporting resolved entity data. The closeExport() method accepts one parameter as input:

    Entity Export Flags

    The Senzing engine allows you to specify which kinds of entity matches to export. In particular, you can choose from five different integer 'flags' to input into exportJSONEntityReport() or exportCSVEntityReport(). Each flag indicates a different category of entity match details to include in your export:

    Flag Meaning
    0x1 Include all entity data in the export (recommended)
    0x4 Include "RESOLVED" matches
    0x8 Include "POSSIBLY SAME" matches
    0x16 Include "POSSIBLY RELATED" matches
    0x32 Include "NAME ONLY" matches
    0x64 Include "DISCLOSED RELATIONSHIP" matches

    Finding Connections

    Finding connections between resolved entities is one of the core purposes of Senzing software. In just a few short steps, the Senzing engine allows users to find complicated relationship chains.

    Finding Paths

    Example code:

        #define search variables
        entityID1 = 10
        entityID2 = 13
        maxDegree = 3
    
        #find the path by entity ID
        response = engine.findPathByEntityID(entityID1,entityID2,maxDegree);
    
        #print the results
        print response
    
        #define search variables
        dataSourceCode1 = "PEOPLE"
        recordID1 = "1502"
        dataSourceCode2 = "PEOPLE"
        recordID2 = "1505"
        maxDegree = 3
    
        #find the path by record ID
        response = engine.findPathByRecordID(dataSourceCode1,recordID1,dataSourceCode2,recordID2,maxDegree);
    
        #print the results
        print response
    
        /** define search variables */
        long entityID1 = 10;
        long entityID2 = 13;
        int maxDegree = 3;
    
        /** buffer response variables */
        StringBuffer response = new StringBuffer();
    
        /** find the path by entity ID */
        int ret_code = engine.findPathByEntityID(entityID1,entityID2,maxDegree,response);
    
        /** print the results */
        System.out.println("Path result document: " + response.toString());
    
        /** define search variables */
        String dataSourceCode1 = new String("PEOPLE");
        String recordID1 = new String("1502");
        String dataSourceCode2 = new String("PEOPLE");
        String recordID2 = new String("1505");
    
        /** find the path by record ID */
        ret_code = engine.findPathByRecordID(dataSourceCode1,recordID1,dataSourceCode2,recordID2,maxDegree,response);
    
        /** print the results */
        System.out.println("Path result document: " + response.toString());
    
        /** define search variables */
        const long long entityID1 = 10;
        const long long entityID2 = 13;
        const int maxDegree = 3;
    
        /** buffer response variables */
        char *response = NULL;
        size_t bufSize = 0;
    
        /** find the path by entity ID */
        int ret_code = G2_findPathByEntityID(entityID1,entityID2,maxDegree,&response,&bufSize,realloc);
    
        /** print the results */
        printf("Path result document: %s\n", response);
    
        /** define search variables */
        const char* dataSourceCode1 = "PEOPLE";
        const char* recordID1 = "1502";
        const char* dataSourceCode2 = "PEOPLE";
        const char* recordID2 = "1505";
    
        /** find the path by record ID */
        ret_code = G2_findPathByRecordID(dataSourceCode1,recordID1,dataSourceCode2,recordID2,maxDegree,&response,&bufSize,realloc);
    
        /** print the results */
        printf("Path result document: %s\n", response);
    

    Example output:

    {
        "ENTITY_PATHS": [{
            "START_ENTITY_ID": 10,
            "END_ENTITY_ID": 13,
            "ENTITIES": [10,
            11,
            12,
            13]
        }],
        "ENTITIES": [{
            "RESOLVED_ENTITY": {
                "ENTITY_ID": 10,
                "LENS_ID": 1,
                "ENTITY_NAME": "",
                "FEATURES": {
                    "DRLIC": [{
                        "FEAT_DESC": "DL5559999 NV",
                        "LIB_FEAT_ID": 60,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "DL5559999 NV",
                            "LIB_FEAT_ID": 60
                        }]
                    }],
                    "PASSPORT": [{
                        "FEAT_DESC": "PP4444777 US",
                        "LIB_FEAT_ID": 57,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "PP4444777 US",
                            "LIB_FEAT_ID": 57
                        }]
                    }]
                },
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                "RECORDS": [{
                    "JSON_DATA": {
                        "CELL_PHONE_NUMBER": "",
                        "DATA_SOURCE": "PEOPLE",
                        "DATE_OF_BIRTH": "",
                        "DRIVERS_LICENSE_NUMBER": "DL5559999",
                        "DRIVERS_LICENSE_STATE": "NV",
                        "DSRC_ACTION": "A",
                        "EMAIL_ADDRESS": "",
                        "ENTITY_TYPE": "PEOPLE",
                        "GENDER": "",
                        "HOME_ADDR_CITY": "",
                        "HOME_ADDR_COUNTRY": "",
                        "HOME_ADDR_LINE1": "",
                        "HOME_ADDR_LINE2": "",
                        "HOME_ADDR_LINE3": "",
                        "HOME_ADDR_POSTAL_CODE": "",
                        "HOME_ADDR_STATE": "",
                        "LOAD_ID": "sample_person.csv",
                        "MAIL_ADDR_CITY": "",
                        "MAIL_ADDR_COUNTRY": "",
                        "MAIL_ADDR_LINE1": "",
                        "MAIL_ADDR_LINE2": "",
                        "MAIL_ADDR_LINE3": "",
                        "MAIL_ADDR_POSTAL_CODE": "",
                        "MAIL_ADDR_STATE": "",
                        "NIN_COUNTRY": "",
                        "NIN_NUMBER": "",
                        "PASSPORT_COUNTRY": "US",
                        "PASSPORT_NUMBER": "PP4444777",
                        "PRIMARY_NAME_FIRST": "",
                        "PRIMARY_NAME_LAST": "",
                        "PRIMARY_NAME_MIDDLE": "",
                        "PRIMARY_NAME_PREFIX": "",
                        "PRIMARY_NAME_SUFFIX": "",
                        "RECORD_ID": "1502",
                        "SOCIAL_HANDLE": "",
                        "SOCIAL_NETWORK": "",
                        "SSN_NUMBER": "",
                        "WORK_PHONE_NUMBER": ""
                    },
                    "DATA_SOURCE": "PEOPLE",
                    "ENTITY_TYPE": "PEOPLE",
                    "ENTITY_KEY": "B191ABC8BD8592B55A1791E79B16ACA6B9F8603B",
                    "ENTITY_NAME": "",
                    "RECORD_ID": "1502",
                    "MATCH_KEY": "",
                    "MATCH_SCORE": "",
                    "ERRULE_CODE": "",
                    "REF_SCORE": 0,
                    "MATCH_LEVEL": 0,
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "NAME_DATA": [],
                    "ATTRIBUTE_DATA": [],
                    "IDENTIFIER_DATA": ["DRLIC: DL5559999 NV",
                    "PASSPORT: PP4444777 US"],
                    "ADDRESS_DATA": [],
                    "PHONE_DATA": [],
                    "RELATIONSHIP_DATA": [],
                    "ENTITY_DATA": [],
                    "OTHER_DATA": []
                }]
            },
            "RELATED_ENTITIES": [{
                "ENTITY_ID": 9,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+PASSPORT-DRLIC",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            },
            {
                "ENTITY_ID": 11,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+DRLIC-PASSPORT",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            }]
        },
        {
            "RESOLVED_ENTITY": {
                "ENTITY_ID": 11,
                "LENS_ID": 1,
                "ENTITY_NAME": "",
                "FEATURES": {
                    "DRLIC": [{
                        "FEAT_DESC": "DL5559999 NV",
                        "LIB_FEAT_ID": 60,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "DL5559999 NV",
                            "LIB_FEAT_ID": 60
                        }]
                    }],
                    "PASSPORT": [{
                        "FEAT_DESC": "PP9984564 US",
                        "LIB_FEAT_ID": 63,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "PP9984564 US",
                            "LIB_FEAT_ID": 63
                        }]
                    }],
                    "SSN": [{
                        "FEAT_DESC": "425-23-3242",
                        "LIB_FEAT_ID": 62,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "425-23-3242",
                            "LIB_FEAT_ID": 62
                        }]
                    }]
                },
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                "RECORDS": [{
                    "JSON_DATA": {
                        "CELL_PHONE_NUMBER": "",
                        "DATA_SOURCE": "PEOPLE",
                        "DATE_OF_BIRTH": "",
                        "DRIVERS_LICENSE_NUMBER": "DL5559999",
                        "DRIVERS_LICENSE_STATE": "NV",
                        "DSRC_ACTION": "A",
                        "EMAIL_ADDRESS": "",
                        "ENTITY_TYPE": "PEOPLE",
                        "GENDER": "",
                        "HOME_ADDR_CITY": "",
                        "HOME_ADDR_COUNTRY": "",
                        "HOME_ADDR_LINE1": "",
                        "HOME_ADDR_LINE2": "",
                        "HOME_ADDR_LINE3": "",
                        "HOME_ADDR_POSTAL_CODE": "",
                        "HOME_ADDR_STATE": "",
                        "LOAD_ID": "sample_person.csv",
                        "MAIL_ADDR_CITY": "",
                        "MAIL_ADDR_COUNTRY": "",
                        "MAIL_ADDR_LINE1": "",
                        "MAIL_ADDR_LINE2": "",
                        "MAIL_ADDR_LINE3": "",
                        "MAIL_ADDR_POSTAL_CODE": "",
                        "MAIL_ADDR_STATE": "",
                        "NIN_COUNTRY": "",
                        "NIN_NUMBER": "",
                        "PASSPORT_COUNTRY": "US",
                        "PASSPORT_NUMBER": "PP9984564",
                        "PRIMARY_NAME_FIRST": "",
                        "PRIMARY_NAME_LAST": "",
                        "PRIMARY_NAME_MIDDLE": "",
                        "PRIMARY_NAME_PREFIX": "",
                        "PRIMARY_NAME_SUFFIX": "",
                        "RECORD_ID": "1503",
                        "SOCIAL_HANDLE": "",
                        "SOCIAL_NETWORK": "",
                        "SSN_NUMBER": "425-23-3242",
                        "WORK_PHONE_NUMBER": ""
                    },
                    "DATA_SOURCE": "PEOPLE",
                    "ENTITY_TYPE": "PEOPLE",
                    "ENTITY_KEY": "B879D5E07F5DEEA0170274F8EE4F4D7F2A73D8D4",
                    "ENTITY_NAME": "",
                    "RECORD_ID": "1503",
                    "MATCH_KEY": "",
                    "MATCH_SCORE": "",
                    "ERRULE_CODE": "",
                    "REF_SCORE": 0,
                    "MATCH_LEVEL": 0,
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "NAME_DATA": [],
                    "ATTRIBUTE_DATA": [],
                    "IDENTIFIER_DATA": ["DRLIC: DL5559999 NV",
                    "PASSPORT: PP9984564 US",
                    "SSN: 425-23-3242"],
                    "ADDRESS_DATA": [],
                    "PHONE_DATA": [],
                    "RELATIONSHIP_DATA": [],
                    "ENTITY_DATA": [],
                    "OTHER_DATA": []
                }]
            },
            "RELATED_ENTITIES": [{
                "ENTITY_ID": 10,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+DRLIC-PASSPORT",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            },
            {
                "ENTITY_ID": 12,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+PASSPORT-DRLIC",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            },
            {
                "ENTITY_ID": 15,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+SSN-DRLIC-PASSPORT",
                "MATCH_SCORE": "4",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "COMPANIES",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            }]
        },
        {
            "RESOLVED_ENTITY": {
                "ENTITY_ID": 12,
                "LENS_ID": 1,
                "ENTITY_NAME": "",
                "FEATURES": {
                    "DRLIC": [{
                        "FEAT_DESC": "DL7837747 NV",
                        "LIB_FEAT_ID": 65,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "DL7837747 NV",
                            "LIB_FEAT_ID": 65
                        }]
                    }],
                    "PASSPORT": [{
                        "FEAT_DESC": "PP9984564 US",
                        "LIB_FEAT_ID": 63,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "PP9984564 US",
                            "LIB_FEAT_ID": 63
                        }]
                    }]
                },
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                "RECORDS": [{
                    "JSON_DATA": {
                        "CELL_PHONE_NUMBER": "",
                        "DATA_SOURCE": "PEOPLE",
                        "DATE_OF_BIRTH": "",
                        "DRIVERS_LICENSE_NUMBER": "DL7837747",
                        "DRIVERS_LICENSE_STATE": "NV",
                        "DSRC_ACTION": "A",
                        "EMAIL_ADDRESS": "",
                        "ENTITY_TYPE": "PEOPLE",
                        "GENDER": "",
                        "HOME_ADDR_CITY": "",
                        "HOME_ADDR_COUNTRY": "",
                        "HOME_ADDR_LINE1": "",
                        "HOME_ADDR_LINE2": "",
                        "HOME_ADDR_LINE3": "",
                        "HOME_ADDR_POSTAL_CODE": "",
                        "HOME_ADDR_STATE": "",
                        "LOAD_ID": "sample_person.csv",
                        "MAIL_ADDR_CITY": "",
                        "MAIL_ADDR_COUNTRY": "",
                        "MAIL_ADDR_LINE1": "",
                        "MAIL_ADDR_LINE2": "",
                        "MAIL_ADDR_LINE3": "",
                        "MAIL_ADDR_POSTAL_CODE": "",
                        "MAIL_ADDR_STATE": "",
                        "NIN_COUNTRY": "",
                        "NIN_NUMBER": "",
                        "PASSPORT_COUNTRY": "US",
                        "PASSPORT_NUMBER": "PP9984564",
                        "PRIMARY_NAME_FIRST": "",
                        "PRIMARY_NAME_LAST": "",
                        "PRIMARY_NAME_MIDDLE": "",
                        "PRIMARY_NAME_PREFIX": "",
                        "PRIMARY_NAME_SUFFIX": "",
                        "RECORD_ID": "1504",
                        "SOCIAL_HANDLE": "",
                        "SOCIAL_NETWORK": "",
                        "SSN_NUMBER": "",
                        "WORK_PHONE_NUMBER": ""
                    },
                    "DATA_SOURCE": "PEOPLE",
                    "ENTITY_TYPE": "PEOPLE",
                    "ENTITY_KEY": "D2F995CC4222EB3B3AE1E61C446DA8554DE28D89",
                    "ENTITY_NAME": "",
                    "RECORD_ID": "1504",
                    "MATCH_KEY": "",
                    "MATCH_SCORE": "",
                    "ERRULE_CODE": "",
                    "REF_SCORE": 0,
                    "MATCH_LEVEL": 0,
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "NAME_DATA": [],
                    "ATTRIBUTE_DATA": [],
                    "IDENTIFIER_DATA": ["DRLIC: DL7837747 NV",
                    "PASSPORT: PP9984564 US"],
                    "ADDRESS_DATA": [],
                    "PHONE_DATA": [],
                    "RELATIONSHIP_DATA": [],
                    "ENTITY_DATA": [],
                    "OTHER_DATA": []
                }]
            },
            "RELATED_ENTITIES": [{
                "ENTITY_ID": 11,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+PASSPORT-DRLIC",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            },
            {
                "ENTITY_ID": 13,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+DRLIC-PASSPORT",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            }]
        },
        {
            "RESOLVED_ENTITY": {
                "ENTITY_ID": 13,
                "LENS_ID": 1,
                "ENTITY_NAME": "",
                "FEATURES": {
                    "DRLIC": [{
                        "FEAT_DESC": "DL7837747 NV",
                        "LIB_FEAT_ID": 65,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "DL7837747 NV",
                            "LIB_FEAT_ID": 65
                        }]
                    }],
                    "PASSPORT": [{
                        "FEAT_DESC": "PP9683646 US",
                        "LIB_FEAT_ID": 67,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "PP9683646 US",
                            "LIB_FEAT_ID": 67
                        }]
                    }]
                },
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                "RECORDS": [{
                    "JSON_DATA": {
                        "CELL_PHONE_NUMBER": "",
                        "DATA_SOURCE": "PEOPLE",
                        "DATE_OF_BIRTH": "",
                        "DRIVERS_LICENSE_NUMBER": "DL7837747",
                        "DRIVERS_LICENSE_STATE": "NV",
                        "DSRC_ACTION": "A",
                        "EMAIL_ADDRESS": "",
                        "ENTITY_TYPE": "PEOPLE",
                        "GENDER": "",
                        "HOME_ADDR_CITY": "",
                        "HOME_ADDR_COUNTRY": "",
                        "HOME_ADDR_LINE1": "",
                        "HOME_ADDR_LINE2": "",
                        "HOME_ADDR_LINE3": "",
                        "HOME_ADDR_POSTAL_CODE": "",
                        "HOME_ADDR_STATE": "",
                        "LOAD_ID": "sample_person.csv",
                        "MAIL_ADDR_CITY": "",
                        "MAIL_ADDR_COUNTRY": "",
                        "MAIL_ADDR_LINE1": "",
                        "MAIL_ADDR_LINE2": "",
                        "MAIL_ADDR_LINE3": "",
                        "MAIL_ADDR_POSTAL_CODE": "",
                        "MAIL_ADDR_STATE": "",
                        "NIN_COUNTRY": "",
                        "NIN_NUMBER": "",
                        "PASSPORT_COUNTRY": "US",
                        "PASSPORT_NUMBER": "PP9683646",
                        "PRIMARY_NAME_FIRST": "",
                        "PRIMARY_NAME_LAST": "",
                        "PRIMARY_NAME_MIDDLE": "",
                        "PRIMARY_NAME_PREFIX": "",
                        "PRIMARY_NAME_SUFFIX": "",
                        "RECORD_ID": "1505",
                        "SOCIAL_HANDLE": "",
                        "SOCIAL_NETWORK": "",
                        "SSN_NUMBER": "",
                        "WORK_PHONE_NUMBER": ""
                    },
                    "DATA_SOURCE": "PEOPLE",
                    "ENTITY_TYPE": "PEOPLE",
                    "ENTITY_KEY": "42BC48A37138228ACDF30D34A9B84CD7FA3294F0",
                    "ENTITY_NAME": "",
                    "RECORD_ID": "1505",
                    "MATCH_KEY": "",
                    "MATCH_SCORE": "",
                    "ERRULE_CODE": "",
                    "REF_SCORE": 0,
                    "MATCH_LEVEL": 0,
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "NAME_DATA": [],
                    "ATTRIBUTE_DATA": [],
                    "IDENTIFIER_DATA": ["DRLIC: DL7837747 NV",
                    "PASSPORT: PP9683646 US"],
                    "ADDRESS_DATA": [],
                    "PHONE_DATA": [],
                    "RELATIONSHIP_DATA": [],
                    "ENTITY_DATA": [],
                    "OTHER_DATA": []
                }]
            },
            "RELATED_ENTITIES": [{
                "ENTITY_ID": 12,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+DRLIC-PASSPORT",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            },
            {
                "ENTITY_ID": 14,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+PASSPORT-DRLIC",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            }]
        }]
    }
    

    The FindPathByEntityID() and FindPathByRecordID() functions can be used to find single relationship paths between two entities. Paths are found using known relationships with other entities.

    Entities can be searched for by either Entity ID or by Record ID, depending on which function is chosen.

    These functions have the following parameters:

    They also have various arguments used to return response documents

    The functions return a JSON document that identifies the path between the entities, and the information on the entities in question.

    Finding Paths with Exclusions

    Example code:

        #define search variables
        entityID1 = 10
        entityID2 = 13
        maxDegree = 4
        excludedEntities = "{\"ENTITIES\":[{\"ENTITY_ID\":\"27\"}]}"
        flags = 0
    
        #find the path by entity ID
        response = engine.findPathExcludingByEntityID(entityID1,entityID2,maxDegree,excludedEntities,flags);
    
        #print the results
        print response
    
        #define search variables
        dataSourceCode1 = "PEOPLE"
        recordID1 = "1502"
        dataSourceCode2 = "PEOPLE"
        recordID2 = "1505"
        excludedRecords = "{\"RECORDS\":[{\"RECORD_ID\":\"1537\",\"DATA_SOURCE\":\"PEOPLE\"}]}"
    
        #find the path by record ID
        response = engine.findPathExcludingByRecordID(dataSourceCode1,recordID1,dataSourceCode2,recordID2,maxDegree,excludedRecords,flags);
    
        #print the results
        print response
    
        /** define search variables */
        long entityID1 = 10;
        long entityID2 = 13;
        int maxDegree = 4;
        String excludedEntities = new String("{\"ENTITIES\":[{\"ENTITY_ID\":\"27\"}]}");
        int flags = 0;
    
        /** buffer response variables */
        StringBuffer response = new StringBuffer();
    
        /** find the path by entity ID */
        int ret_code = engine.findPathExcludingByEntityID(entityID1,entityID2,maxDegree,excludedEntities,flags,response);
    
        /** print the results */
        System.out.println("Path result document: " + response.toString());
    
        /** define search variables */
        String dataSourceCode1 = new String("PEOPLE");
        String recordID1 = new String("1502");
        String dataSourceCode2 = new String("PEOPLE");
        String recordID2 = new String("1505");
        String excludedRecords = new String("{\"RECORDS\":[{\"RECORD_ID\":\"1537\",\"DATA_SOURCE\":\"PEOPLE\"}]}");
    
        /** find the path by record ID */
        ret_code = engine.findPathExcludingByRecordID(dataSourceCode1,recordID1,dataSourceCode2,recordID2,maxDegree,excludedRecords,flags,response);
    
        /** print the results */
        System.out.println("Path result document: " + response.toString());
    
        /** define search variables */
        const long long entityID1 = 10;
        const long long entityID2 = 13;
        const int maxDegree = 4;
        const char* excludedEntities = "{\"ENTITIES\":[{\"ENTITY_ID\":\"27\"}]}";
        int flags = 0;
    
        /** buffer response variables */
        char *response = NULL;
        size_t bufSize = 0;
    
        /** find the path by entity ID */
        int ret_code = G2_findPathExcludingByEntityID(entityID1,entityID2,maxDegree,excludedEntities,flags,&response,&bufSize,realloc);
    
        /** print the results */
        printf("Path result document: %s\n", response);
    
        /** define search variables */
        const char* dataSourceCode1 = "PEOPLE";
        const char* recordID1 = "1502";
        const char* dataSourceCode2 = "PEOPLE";
        const char* recordID2 = "1505";
        const char* excludedRecords = "{\"RECORDS\":[{\"RECORD_ID\":\"1537\",\"DATA_SOURCE\":\"PEOPLE\"}]}";
    
        /** find the path by record ID */
        ret_code = G2_findPathExcludingByRecordID(dataSourceCode1,recordID1,dataSourceCode2,recordID2,maxDegree,excludedRecords,flags,&response,&bufSize,realloc);
    
        /** print the results */
        printf("Path result document: %s\n", response);
    

    The FindPathExcludingByEntityID() and FindPathExcludingByRecordID() functions can be used to find single relationship paths between two entities. Paths are found using known relationships with other entities. In addition, it will find paths that exclude certain entities from being on the path.

    Entities can be searched for by either Entity ID or by Record ID, depending on which function is chosen. Additionally, entities to be excluded can also be specified by either Entity ID or by Record ID.

    When excluding entities, the user may choose to either (a) strictly exclude the entities, or (b) prefer to exclude the entities, but still include them if no other path is found. By default, entities will be strictly excluded. A "preferred exclude" may be done by specifying the appropriate flag.

    These functions have the following parameters:

    They also have various arguments used to return response documents

    Finding Path Flags

    Flag Meaning
    0x1 Excluded entities are still allowed, but not preferred

    The functions return a JSON document that identifies the path between the entities, and the information on the entities in question. The document format is identical to the FindPathByEntityID() and FindPathByRecordID() functions.

    Finding Paths with Required Sources

    Example code:

        #define search variables
        entityID1 = 10
        entityID2 = 13
        maxDegree = 4
        excludedEntities = "{\"ENTITIES\":[{\"ENTITY_ID\":\"27\"}]}"
        requiredDsrcs = "{\"DATA_SOURCES\":[\"PEOPLE\"]}"
        flags = 0
    
        #find the path by entity ID
        response = engine.findPathIncludingSourceByEntityID(entityID1,entityID2,maxDegree,excludedEntities,requiredDsrcs,flags);
    
        #print the results
        print response
    
        #define search variables
        dataSourceCode1 = "PEOPLE"
        recordID1 = "1502"
        dataSourceCode2 = "PEOPLE"
        recordID2 = "1505"
        excludedRecords = "{\"RECORDS\":[{\"RECORD_ID\":\"1537\",\"DATA_SOURCE\":\"PEOPLE\"}]}"
    
        #find the path by record ID
        response = engine.findPathIncludingSourceByRecordID(dataSourceCode1,recordID1,dataSourceCode2,recordID2,maxDegree,excludedRecords,requiredDsrcs,flags);
    
        #print the results
        print response
    
        /** define search variables */
        long entityID1 = 10;
        long entityID2 = 13;
        int maxDegree = 4;
        String excludedEntities = new String("{\"ENTITIES\":[{\"ENTITY_ID\":\"27\"}]}");
        String requiredDsrcs = new String("{\"DATA_SOURCES\":[\"PEOPLE\"]}");
        int flags = 0;
    
        /** buffer response variables */
        StringBuffer response = new StringBuffer();
    
        /** find the path by entity ID */
        int ret_code = engine.findPathIncludingSourceByEntityID(entityID1,entityID2,maxDegree,excludedEntities,requiredDsrcs,flags,response);
    
        /** print the results */
        System.out.println("Path result document: " + response.toString());
    
        /** define search variables */
        String dataSourceCode1 = new String("PEOPLE");
        String recordID1 = new String("1502");
        String dataSourceCode2 = new String("PEOPLE");
        String recordID2 = new String("1505");
        String excludedRecords = new String("{\"RECORDS\":[{\"RECORD_ID\":\"1537\",\"DATA_SOURCE\":\"PEOPLE\"}]}");
    
        /** find the path by record ID */
        ret_code = engine.findPathIncludingSourceByRecordID(dataSourceCode1,recordID1,dataSourceCode2,recordID2,maxDegree,excludedRecords,requiredDsrcs,flags,response);
    
        /** print the results */
        System.out.println("Path result document: " + response.toString());
    
        /** define search variables */
        const long long entityID1 = 10;
        const long long entityID2 = 13;
        const int maxDegree = 4;
        const char* excludedEntities = "{\"ENTITIES\":[{\"ENTITY_ID\":\"27\"}]}";
        const char* requiredDsrcs = "{\"DATA_SOURCES\":[\"PEOPLE\"]}";
        int flags = 0;
    
        /** buffer response variables */
        char *response = NULL;
        size_t bufSize = 0;
    
        /** find the path by entity ID */
        int ret_code = G2_findPathIncludingSourceByEntityID(entityID1,entityID2,maxDegree,excludedEntities,requiredDsrcs,flags,&response,&bufSize,realloc);
    
        /** print the results */
        printf("Path result document: %s\n", response);
    
        /** define search variables */
        const char* dataSourceCode1 = "PEOPLE";
        const char* recordID1 = "1502";
        const char* dataSourceCode2 = "PEOPLE";
        const char* recordID2 = "1505";
        const char* excludedRecords = "{\"RECORDS\":[{\"RECORD_ID\":\"1537\",\"DATA_SOURCE\":\"PEOPLE\"}]}";
    
        /** find the path by record ID */
        ret_code = G2_findPathIncludingSourceByRecordID(dataSourceCode1,recordID1,dataSourceCode2,recordID2,maxDegree,excludedRecords,requiredDsrcs,flags,&response,&bufSize,realloc);
    
        /** print the results */
        printf("Path result document: %s\n", response);
    

    The FindPathIncludingSourceByEntityID() and FindPathIncludingSourceByRecordID() functions can be used to find single relationship paths between two entities. In addition, one of the enties along the path must include a specified data source.

    Entities can be searched for by either Entity ID or by Record ID, depending on which function is chosen. The required data source or sources are specified by a json document list.

    Specific entities may also be excluded, using the same methodology as the FindPathExcludingByEntityID() and FindPathExcludingByRecordID() functions use.

    These functions have the following parameters:

    They also have various arguments used to return response documents

    Finding Path Flags

    Flag Meaning
    0x1 Excluded entities are still allowed, but not preferred

    The functions return a JSON document that identifies the path between the entities, and the information on the entities in question. The document format is identical to the FindPathByEntityID() and FindPathByRecordID() functions.

    Finding Networks

    Example code:

        #define search variables
        entityList = "{\"ENTITIES\":[{\"ENTITY_ID\":\"10\"},{\"ENTITY_ID\":\"15\"},{\"ENTITY_ID\":\"13\"}]}"
        maxDegree = 2
        buildOutDegree = 1
        maxEntities = 12
    
        #find the network by entity ID
        response = engine.findNetworkByEntityID(entityList,maxDegree,buildOutDegree,maxEntities);
    
        #print the results
        print response
    
        #define search variables
        recordList = "{\"RECORDS\":[{\"RECORD_ID\":\"1502\",\"DATA_SOURCE\":\"PEOPLE\"},{\"RECORD_ID\":\"1507\",\"DATA_SOURCE\":\"PEOPLE\"},{\"RECORD_ID\":\"1505\",\"DATA_SOURCE\":\"PEOPLE\"}]}"
    
        #find the network by record ID
        response = engine.findNetworkByRecordID(recordList,maxDegree,buildOutDegree,maxEntities);
    
        #print the results
        print response
    
        /** define search variables */
        String entityList = new String("{\"ENTITIES\":[{\"ENTITY_ID\":\"10\"},{\"ENTITY_ID\":\"15\"},{\"ENTITY_ID\":\"13\"}]}");
        int maxDegree = 2;
        int buildOutDegree = 1;
        int maxEntities = 12;
    
        /** buffer response variables */
        StringBuffer response = new StringBuffer();
    
        /** find the network by entity ID */
        int ret_code = engine.findNetworkByEntityID(entityList,maxDegree,buildOutDegree,maxEntities,response);
    
        /** print the results */
        System.out.println("Network result document: " + response.toString());
    
        /** define search variables */
        String recordList = new String("{\"RECORDS\":[{\"RECORD_ID\":\"1502\",\"DATA_SOURCE\":\"PEOPLE\"},{\"RECORD_ID\":\"1507\",\"DATA_SOURCE\":\"PEOPLE\"},{\"RECORD_ID\":\"1505\",\"DATA_SOURCE\":\"PEOPLE\"}]}");
    
        /** find the network by record ID */
        ret_code = engine.findPathNetworkRecordID(recordList,maxDegree,buildOutDegree,maxEntities,response);
    
        /** print the results */
        System.out.println("Network result document: " + response.toString());
    
        /** define search variables */
        const char* entityList = "{\"ENTITIES\":[{\"ENTITY_ID\":\"10\"},{\"ENTITY_ID\":\"15\"},{\"ENTITY_ID\":\"13\"}]}"
        int maxDegree = 2;
        int buildOutDegree = 1;
        int maxEntities = 12;
    
        /** buffer response variables */
        char *response = NULL;
        size_t bufSize = 0;
    
        /** find the network by entity ID */
        int ret_code = G2_findPathNetworkEntityID(entityList,maxDegree,buildOutDegree,maxEntities,&response,&bufSize,realloc);
    
        /** print the results */
        printf("Network result document: %s\n", response);
    
        /** define search variables */
        const char* recordList = "{\"RECORDS\":[{\"RECORD_ID\":\"1502\",\"DATA_SOURCE\":\"PEOPLE\"},{\"RECORD_ID\":\"1507\",\"DATA_SOURCE\":\"PEOPLE\"},{\"RECORD_ID\":\"1505\",\"DATA_SOURCE\":\"PEOPLE\"}]}"
    
        /** find the network by record ID */
        ret_code = G2_findNetworkByRecordID(recordList,maxDegree,buildOutDegree,maxEntities,&response,&bufSize,realloc);
    
        /** print the results */
        printf("Network result document: %s\n", response);
    

    Example output:

    {
        "ENTITY_PATHS": [{
            "START_ENTITY_ID": 10,
            "END_ENTITY_ID": 13,
            "ENTITIES": []
        },
        {
            "START_ENTITY_ID": 10,
            "END_ENTITY_ID": 15,
            "ENTITIES": [10,
            11,
            15]
        },
        {
            "START_ENTITY_ID": 13,
            "END_ENTITY_ID": 15,
            "ENTITIES": [13,
            14,
            15]
        }],
        "ENTITIES": [{
            "RESOLVED_ENTITY": {
                "ENTITY_ID": 9,
                "LENS_ID": 1,
                "ENTITY_NAME": "",
                "FEATURES": {
                    "DRLIC": [{
                        "FEAT_DESC": "DL5473526 NV",
                        "LIB_FEAT_ID": 56,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "DL5473526 NV",
                            "LIB_FEAT_ID": 56
                        }]
                    }],
                    "PASSPORT": [{
                        "FEAT_DESC": "PP4444777 US",
                        "LIB_FEAT_ID": 57,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "PP4444777 US",
                            "LIB_FEAT_ID": 57
                        }]
                    }]
                },
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                "RECORDS": [{
                    "JSON_DATA": {
                        "CELL_PHONE_NUMBER": "",
                        "DATA_SOURCE": "PEOPLE",
                        "DATE_OF_BIRTH": "",
                        "DRIVERS_LICENSE_NUMBER": "DL5473526",
                        "DRIVERS_LICENSE_STATE": "NV",
                        "DSRC_ACTION": "A",
                        "EMAIL_ADDRESS": "",
                        "ENTITY_TYPE": "PEOPLE",
                        "GENDER": "",
                        "HOME_ADDR_CITY": "",
                        "HOME_ADDR_COUNTRY": "",
                        "HOME_ADDR_LINE1": "",
                        "HOME_ADDR_LINE2": "",
                        "HOME_ADDR_LINE3": "",
                        "HOME_ADDR_POSTAL_CODE": "",
                        "HOME_ADDR_STATE": "",
                        "LOAD_ID": "sample_person.csv",
                        "MAIL_ADDR_CITY": "",
                        "MAIL_ADDR_COUNTRY": "",
                        "MAIL_ADDR_LINE1": "",
                        "MAIL_ADDR_LINE2": "",
                        "MAIL_ADDR_LINE3": "",
                        "MAIL_ADDR_POSTAL_CODE": "",
                        "MAIL_ADDR_STATE": "",
                        "NIN_COUNTRY": "",
                        "NIN_NUMBER": "",
                        "PASSPORT_COUNTRY": "US",
                        "PASSPORT_NUMBER": "PP4444777",
                        "PRIMARY_NAME_FIRST": "",
                        "PRIMARY_NAME_LAST": "",
                        "PRIMARY_NAME_MIDDLE": "",
                        "PRIMARY_NAME_PREFIX": "",
                        "PRIMARY_NAME_SUFFIX": "",
                        "RECORD_ID": "1501",
                        "SOCIAL_HANDLE": "",
                        "SOCIAL_NETWORK": "",
                        "SSN_NUMBER": "",
                        "WORK_PHONE_NUMBER": ""
                    },
                    "DATA_SOURCE": "PEOPLE",
                    "ENTITY_TYPE": "PEOPLE",
                    "ENTITY_KEY": "1CD1FE71E3BDDB38AD33626561E2617605BAAE5A",
                    "ENTITY_NAME": "",
                    "RECORD_ID": "1501",
                    "MATCH_KEY": "",
                    "MATCH_SCORE": "",
                    "ERRULE_CODE": "",
                    "REF_SCORE": 0,
                    "MATCH_LEVEL": 0,
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "NAME_DATA": [],
                    "ATTRIBUTE_DATA": [],
                    "IDENTIFIER_DATA": ["DRLIC: DL5473526 NV",
                    "PASSPORT: PP4444777 US"],
                    "ADDRESS_DATA": [],
                    "PHONE_DATA": [],
                    "RELATIONSHIP_DATA": [],
                    "ENTITY_DATA": [],
                    "OTHER_DATA": []
                }]
            },
            "RELATED_ENTITIES": [{
                "ENTITY_ID": 10,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+PASSPORT-DRLIC",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            }]
        },
        {
            "RESOLVED_ENTITY": {
                "ENTITY_ID": 10,
                "LENS_ID": 1,
                "ENTITY_NAME": "",
                "FEATURES": {
                    "DRLIC": [{
                        "FEAT_DESC": "DL5559999 NV",
                        "LIB_FEAT_ID": 60,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "DL5559999 NV",
                            "LIB_FEAT_ID": 60
                        }]
                    }],
                    "PASSPORT": [{
                        "FEAT_DESC": "PP4444777 US",
                        "LIB_FEAT_ID": 57,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "PP4444777 US",
                            "LIB_FEAT_ID": 57
                        }]
                    }]
                },
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                "RECORDS": [{
                    "JSON_DATA": {
                        "CELL_PHONE_NUMBER": "",
                        "DATA_SOURCE": "PEOPLE",
                        "DATE_OF_BIRTH": "",
                        "DRIVERS_LICENSE_NUMBER": "DL5559999",
                        "DRIVERS_LICENSE_STATE": "NV",
                        "DSRC_ACTION": "A",
                        "EMAIL_ADDRESS": "",
                        "ENTITY_TYPE": "PEOPLE",
                        "GENDER": "",
                        "HOME_ADDR_CITY": "",
                        "HOME_ADDR_COUNTRY": "",
                        "HOME_ADDR_LINE1": "",
                        "HOME_ADDR_LINE2": "",
                        "HOME_ADDR_LINE3": "",
                        "HOME_ADDR_POSTAL_CODE": "",
                        "HOME_ADDR_STATE": "",
                        "LOAD_ID": "sample_person.csv",
                        "MAIL_ADDR_CITY": "",
                        "MAIL_ADDR_COUNTRY": "",
                        "MAIL_ADDR_LINE1": "",
                        "MAIL_ADDR_LINE2": "",
                        "MAIL_ADDR_LINE3": "",
                        "MAIL_ADDR_POSTAL_CODE": "",
                        "MAIL_ADDR_STATE": "",
                        "NIN_COUNTRY": "",
                        "NIN_NUMBER": "",
                        "PASSPORT_COUNTRY": "US",
                        "PASSPORT_NUMBER": "PP4444777",
                        "PRIMARY_NAME_FIRST": "",
                        "PRIMARY_NAME_LAST": "",
                        "PRIMARY_NAME_MIDDLE": "",
                        "PRIMARY_NAME_PREFIX": "",
                        "PRIMARY_NAME_SUFFIX": "",
                        "RECORD_ID": "1502",
                        "SOCIAL_HANDLE": "",
                        "SOCIAL_NETWORK": "",
                        "SSN_NUMBER": "",
                        "WORK_PHONE_NUMBER": ""
                    },
                    "DATA_SOURCE": "PEOPLE",
                    "ENTITY_TYPE": "PEOPLE",
                    "ENTITY_KEY": "B191ABC8BD8592B55A1791E79B16ACA6B9F8603B",
                    "ENTITY_NAME": "",
                    "RECORD_ID": "1502",
                    "MATCH_KEY": "",
                    "MATCH_SCORE": "",
                    "ERRULE_CODE": "",
                    "REF_SCORE": 0,
                    "MATCH_LEVEL": 0,
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "NAME_DATA": [],
                    "ATTRIBUTE_DATA": [],
                    "IDENTIFIER_DATA": ["DRLIC: DL5559999 NV",
                    "PASSPORT: PP4444777 US"],
                    "ADDRESS_DATA": [],
                    "PHONE_DATA": [],
                    "RELATIONSHIP_DATA": [],
                    "ENTITY_DATA": [],
                    "OTHER_DATA": []
                }]
            },
            "RELATED_ENTITIES": [{
                "ENTITY_ID": 9,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+PASSPORT-DRLIC",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            },
            {
                "ENTITY_ID": 11,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+DRLIC-PASSPORT",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            }]
        },
        {
            "RESOLVED_ENTITY": {
                "ENTITY_ID": 11,
                "LENS_ID": 1,
                "ENTITY_NAME": "",
                "FEATURES": {
                    "DRLIC": [{
                        "FEAT_DESC": "DL5559999 NV",
                        "LIB_FEAT_ID": 60,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "DL5559999 NV",
                            "LIB_FEAT_ID": 60
                        }]
                    }],
                    "PASSPORT": [{
                        "FEAT_DESC": "PP9984564 US",
                        "LIB_FEAT_ID": 63,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "PP9984564 US",
                            "LIB_FEAT_ID": 63
                        }]
                    }],
                    "SSN": [{
                        "FEAT_DESC": "425-23-3242",
                        "LIB_FEAT_ID": 62,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "425-23-3242",
                            "LIB_FEAT_ID": 62
                        }]
                    }]
                },
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                "RECORDS": [{
                    "JSON_DATA": {
                        "CELL_PHONE_NUMBER": "",
                        "DATA_SOURCE": "PEOPLE",
                        "DATE_OF_BIRTH": "",
                        "DRIVERS_LICENSE_NUMBER": "DL5559999",
                        "DRIVERS_LICENSE_STATE": "NV",
                        "DSRC_ACTION": "A",
                        "EMAIL_ADDRESS": "",
                        "ENTITY_TYPE": "PEOPLE",
                        "GENDER": "",
                        "HOME_ADDR_CITY": "",
                        "HOME_ADDR_COUNTRY": "",
                        "HOME_ADDR_LINE1": "",
                        "HOME_ADDR_LINE2": "",
                        "HOME_ADDR_LINE3": "",
                        "HOME_ADDR_POSTAL_CODE": "",
                        "HOME_ADDR_STATE": "",
                        "LOAD_ID": "sample_person.csv",
                        "MAIL_ADDR_CITY": "",
                        "MAIL_ADDR_COUNTRY": "",
                        "MAIL_ADDR_LINE1": "",
                        "MAIL_ADDR_LINE2": "",
                        "MAIL_ADDR_LINE3": "",
                        "MAIL_ADDR_POSTAL_CODE": "",
                        "MAIL_ADDR_STATE": "",
                        "NIN_COUNTRY": "",
                        "NIN_NUMBER": "",
                        "PASSPORT_COUNTRY": "US",
                        "PASSPORT_NUMBER": "PP9984564",
                        "PRIMARY_NAME_FIRST": "",
                        "PRIMARY_NAME_LAST": "",
                        "PRIMARY_NAME_MIDDLE": "",
                        "PRIMARY_NAME_PREFIX": "",
                        "PRIMARY_NAME_SUFFIX": "",
                        "RECORD_ID": "1503",
                        "SOCIAL_HANDLE": "",
                        "SOCIAL_NETWORK": "",
                        "SSN_NUMBER": "425-23-3242",
                        "WORK_PHONE_NUMBER": ""
                    },
                    "DATA_SOURCE": "PEOPLE",
                    "ENTITY_TYPE": "PEOPLE",
                    "ENTITY_KEY": "B879D5E07F5DEEA0170274F8EE4F4D7F2A73D8D4",
                    "ENTITY_NAME": "",
                    "RECORD_ID": "1503",
                    "MATCH_KEY": "",
                    "MATCH_SCORE": "",
                    "ERRULE_CODE": "",
                    "REF_SCORE": 0,
                    "MATCH_LEVEL": 0,
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "NAME_DATA": [],
                    "ATTRIBUTE_DATA": [],
                    "IDENTIFIER_DATA": ["DRLIC: DL5559999 NV",
                    "PASSPORT: PP9984564 US",
                    "SSN: 425-23-3242"],
                    "ADDRESS_DATA": [],
                    "PHONE_DATA": [],
                    "RELATIONSHIP_DATA": [],
                    "ENTITY_DATA": [],
                    "OTHER_DATA": []
                }]
            },
            "RELATED_ENTITIES": [{
                "ENTITY_ID": 10,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+DRLIC-PASSPORT",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            },
            {
                "ENTITY_ID": 12,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+PASSPORT-DRLIC",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            },
            {
                "ENTITY_ID": 15,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+SSN-DRLIC-PASSPORT",
                "MATCH_SCORE": "4",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            }]
        },
        {
            "RESOLVED_ENTITY": {
                "ENTITY_ID": 12,
                "LENS_ID": 1,
                "ENTITY_NAME": "",
                "FEATURES": {
                    "DRLIC": [{
                        "FEAT_DESC": "DL7837747 NV",
                        "LIB_FEAT_ID": 65,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "DL7837747 NV",
                            "LIB_FEAT_ID": 65
                        }]
                    }],
                    "PASSPORT": [{
                        "FEAT_DESC": "PP9984564 US",
                        "LIB_FEAT_ID": 63,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "PP9984564 US",
                            "LIB_FEAT_ID": 63
                        }]
                    }]
                },
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                "RECORDS": [{
                    "JSON_DATA": {
                        "CELL_PHONE_NUMBER": "",
                        "DATA_SOURCE": "PEOPLE",
                        "DATE_OF_BIRTH": "",
                        "DRIVERS_LICENSE_NUMBER": "DL7837747",
                        "DRIVERS_LICENSE_STATE": "NV",
                        "DSRC_ACTION": "A",
                        "EMAIL_ADDRESS": "",
                        "ENTITY_TYPE": "PEOPLE",
                        "GENDER": "",
                        "HOME_ADDR_CITY": "",
                        "HOME_ADDR_COUNTRY": "",
                        "HOME_ADDR_LINE1": "",
                        "HOME_ADDR_LINE2": "",
                        "HOME_ADDR_LINE3": "",
                        "HOME_ADDR_POSTAL_CODE": "",
                        "HOME_ADDR_STATE": "",
                        "LOAD_ID": "sample_person.csv",
                        "MAIL_ADDR_CITY": "",
                        "MAIL_ADDR_COUNTRY": "",
                        "MAIL_ADDR_LINE1": "",
                        "MAIL_ADDR_LINE2": "",
                        "MAIL_ADDR_LINE3": "",
                        "MAIL_ADDR_POSTAL_CODE": "",
                        "MAIL_ADDR_STATE": "",
                        "NIN_COUNTRY": "",
                        "NIN_NUMBER": "",
                        "PASSPORT_COUNTRY": "US",
                        "PASSPORT_NUMBER": "PP9984564",
                        "PRIMARY_NAME_FIRST": "",
                        "PRIMARY_NAME_LAST": "",
                        "PRIMARY_NAME_MIDDLE": "",
                        "PRIMARY_NAME_PREFIX": "",
                        "PRIMARY_NAME_SUFFIX": "",
                        "RECORD_ID": "1504",
                        "SOCIAL_HANDLE": "",
                        "SOCIAL_NETWORK": "",
                        "SSN_NUMBER": "",
                        "WORK_PHONE_NUMBER": ""
                    },
                    "DATA_SOURCE": "PEOPLE",
                    "ENTITY_TYPE": "PEOPLE",
                    "ENTITY_KEY": "D2F995CC4222EB3B3AE1E61C446DA8554DE28D89",
                    "ENTITY_NAME": "",
                    "RECORD_ID": "1504",
                    "MATCH_KEY": "",
                    "MATCH_SCORE": "",
                    "ERRULE_CODE": "",
                    "REF_SCORE": 0,
                    "MATCH_LEVEL": 0,
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "NAME_DATA": [],
                    "ATTRIBUTE_DATA": [],
                    "IDENTIFIER_DATA": ["DRLIC: DL7837747 NV",
                    "PASSPORT: PP9984564 US"],
                    "ADDRESS_DATA": [],
                    "PHONE_DATA": [],
                    "RELATIONSHIP_DATA": [],
                    "ENTITY_DATA": [],
                    "OTHER_DATA": []
                }]
            },
            "RELATED_ENTITIES": [{
                "ENTITY_ID": 11,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+PASSPORT-DRLIC",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            },
            {
                "ENTITY_ID": 13,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+DRLIC-PASSPORT",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            }]
        },
        {
            "RESOLVED_ENTITY": {
                "ENTITY_ID": 13,
                "LENS_ID": 1,
                "ENTITY_NAME": "",
                "FEATURES": {
                    "DRLIC": [{
                        "FEAT_DESC": "DL7837747 NV",
                        "LIB_FEAT_ID": 65,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "DL7837747 NV",
                            "LIB_FEAT_ID": 65
                        }]
                    }],
                    "PASSPORT": [{
                        "FEAT_DESC": "PP9683646 US",
                        "LIB_FEAT_ID": 67,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "PP9683646 US",
                            "LIB_FEAT_ID": 67
                        }]
                    }]
                },
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                "RECORDS": [{
                    "JSON_DATA": {
                        "CELL_PHONE_NUMBER": "",
                        "DATA_SOURCE": "PEOPLE",
                        "DATE_OF_BIRTH": "",
                        "DRIVERS_LICENSE_NUMBER": "DL7837747",
                        "DRIVERS_LICENSE_STATE": "NV",
                        "DSRC_ACTION": "A",
                        "EMAIL_ADDRESS": "",
                        "ENTITY_TYPE": "PEOPLE",
                        "GENDER": "",
                        "HOME_ADDR_CITY": "",
                        "HOME_ADDR_COUNTRY": "",
                        "HOME_ADDR_LINE1": "",
                        "HOME_ADDR_LINE2": "",
                        "HOME_ADDR_LINE3": "",
                        "HOME_ADDR_POSTAL_CODE": "",
                        "HOME_ADDR_STATE": "",
                        "LOAD_ID": "sample_person.csv",
                        "MAIL_ADDR_CITY": "",
                        "MAIL_ADDR_COUNTRY": "",
                        "MAIL_ADDR_LINE1": "",
                        "MAIL_ADDR_LINE2": "",
                        "MAIL_ADDR_LINE3": "",
                        "MAIL_ADDR_POSTAL_CODE": "",
                        "MAIL_ADDR_STATE": "",
                        "NIN_COUNTRY": "",
                        "NIN_NUMBER": "",
                        "PASSPORT_COUNTRY": "US",
                        "PASSPORT_NUMBER": "PP9683646",
                        "PRIMARY_NAME_FIRST": "",
                        "PRIMARY_NAME_LAST": "",
                        "PRIMARY_NAME_MIDDLE": "",
                        "PRIMARY_NAME_PREFIX": "",
                        "PRIMARY_NAME_SUFFIX": "",
                        "RECORD_ID": "1505",
                        "SOCIAL_HANDLE": "",
                        "SOCIAL_NETWORK": "",
                        "SSN_NUMBER": "",
                        "WORK_PHONE_NUMBER": ""
                    },
                    "DATA_SOURCE": "PEOPLE",
                    "ENTITY_TYPE": "PEOPLE",
                    "ENTITY_KEY": "42BC48A37138228ACDF30D34A9B84CD7FA3294F0",
                    "ENTITY_NAME": "",
                    "RECORD_ID": "1505",
                    "MATCH_KEY": "",
                    "MATCH_SCORE": "",
                    "ERRULE_CODE": "",
                    "REF_SCORE": 0,
                    "MATCH_LEVEL": 0,
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "NAME_DATA": [],
                    "ATTRIBUTE_DATA": [],
                    "IDENTIFIER_DATA": ["DRLIC: DL7837747 NV",
                    "PASSPORT: PP9683646 US"],
                    "ADDRESS_DATA": [],
                    "PHONE_DATA": [],
                    "RELATIONSHIP_DATA": [],
                    "ENTITY_DATA": [],
                    "OTHER_DATA": []
                }]
            },
            "RELATED_ENTITIES": [{
                "ENTITY_ID": 12,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+DRLIC-PASSPORT",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            },
            {
                "ENTITY_ID": 14,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+PASSPORT-DRLIC",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            }]
        },
        {
            "RESOLVED_ENTITY": {
                "ENTITY_ID": 14,
                "LENS_ID": 1,
                "ENTITY_NAME": "",
                "FEATURES": {
                    "DRLIC": [{
                        "FEAT_DESC": "DL5463473 NV",
                        "LIB_FEAT_ID": 69,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "DL5463473 NV",
                            "LIB_FEAT_ID": 69
                        }]
                    }],
                    "PASSPORT": [{
                        "FEAT_DESC": "PP9683646 US",
                        "LIB_FEAT_ID": 67,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "PP9683646 US",
                            "LIB_FEAT_ID": 67
                        }]
                    }]
                },
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                "RECORDS": [{
                    "JSON_DATA": {
                        "CELL_PHONE_NUMBER": "",
                        "DATA_SOURCE": "PEOPLE",
                        "DATE_OF_BIRTH": "",
                        "DRIVERS_LICENSE_NUMBER": "DL5463473",
                        "DRIVERS_LICENSE_STATE": "NV",
                        "DSRC_ACTION": "A",
                        "EMAIL_ADDRESS": "",
                        "ENTITY_TYPE": "PEOPLE",
                        "GENDER": "",
                        "HOME_ADDR_CITY": "",
                        "HOME_ADDR_COUNTRY": "",
                        "HOME_ADDR_LINE1": "",
                        "HOME_ADDR_LINE2": "",
                        "HOME_ADDR_LINE3": "",
                        "HOME_ADDR_POSTAL_CODE": "",
                        "HOME_ADDR_STATE": "",
                        "LOAD_ID": "sample_person.csv",
                        "MAIL_ADDR_CITY": "",
                        "MAIL_ADDR_COUNTRY": "",
                        "MAIL_ADDR_LINE1": "",
                        "MAIL_ADDR_LINE2": "",
                        "MAIL_ADDR_LINE3": "",
                        "MAIL_ADDR_POSTAL_CODE": "",
                        "MAIL_ADDR_STATE": "",
                        "NIN_COUNTRY": "",
                        "NIN_NUMBER": "",
                        "PASSPORT_COUNTRY": "US",
                        "PASSPORT_NUMBER": "PP9683646",
                        "PRIMARY_NAME_FIRST": "",
                        "PRIMARY_NAME_LAST": "",
                        "PRIMARY_NAME_MIDDLE": "",
                        "PRIMARY_NAME_PREFIX": "",
                        "PRIMARY_NAME_SUFFIX": "",
                        "RECORD_ID": "1506",
                        "SOCIAL_HANDLE": "",
                        "SOCIAL_NETWORK": "",
                        "SSN_NUMBER": "",
                        "WORK_PHONE_NUMBER": ""
                    },
                    "DATA_SOURCE": "PEOPLE",
                    "ENTITY_TYPE": "PEOPLE",
                    "ENTITY_KEY": "A8766D53B07C82C649EBFED73E80184762A7552C",
                    "ENTITY_NAME": "",
                    "RECORD_ID": "1506",
                    "MATCH_KEY": "",
                    "MATCH_SCORE": "",
                    "ERRULE_CODE": "",
                    "REF_SCORE": 0,
                    "MATCH_LEVEL": 0,
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "NAME_DATA": [],
                    "ATTRIBUTE_DATA": [],
                    "IDENTIFIER_DATA": ["DRLIC: DL5463473 NV",
                    "PASSPORT: PP9683646 US"],
                    "ADDRESS_DATA": [],
                    "PHONE_DATA": [],
                    "RELATIONSHIP_DATA": [],
                    "ENTITY_DATA": [],
                    "OTHER_DATA": []
                }]
            },
            "RELATED_ENTITIES": [{
                "ENTITY_ID": 13,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+PASSPORT-DRLIC",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            },
            {
                "ENTITY_ID": 15,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+DRLIC-PASSPORT",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            }]
        },
        {
            "RESOLVED_ENTITY": {
                "ENTITY_ID": 15,
                "LENS_ID": 1,
                "ENTITY_NAME": "",
                "FEATURES": {
                    "DRLIC": [{
                        "FEAT_DESC": "DL5463473 NV",
                        "LIB_FEAT_ID": 69,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "DL5463473 NV",
                            "LIB_FEAT_ID": 69
                        }]
                    }],
                    "PASSPORT": [{
                        "FEAT_DESC": "PP3242342 US",
                        "LIB_FEAT_ID": 71,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "PP3242342 US",
                            "LIB_FEAT_ID": 71
                        }]
                    }],
                    "SSN": [{
                        "FEAT_DESC": "425-23-3242",
                        "LIB_FEAT_ID": 62,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "425-23-3242",
                            "LIB_FEAT_ID": 62
                        }]
                    }]
                },
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                "RECORDS": [{
                    "JSON_DATA": {
                        "CELL_PHONE_NUMBER": "",
                        "DATA_SOURCE": "PEOPLE",
                        "DATE_OF_BIRTH": "",
                        "DRIVERS_LICENSE_NUMBER": "DL5463473",
                        "DRIVERS_LICENSE_STATE": "NV",
                        "DSRC_ACTION": "A",
                        "EMAIL_ADDRESS": "",
                        "ENTITY_TYPE": "PEOPLE",
                        "GENDER": "",
                        "HOME_ADDR_CITY": "",
                        "HOME_ADDR_COUNTRY": "",
                        "HOME_ADDR_LINE1": "",
                        "HOME_ADDR_LINE2": "",
                        "HOME_ADDR_LINE3": "",
                        "HOME_ADDR_POSTAL_CODE": "",
                        "HOME_ADDR_STATE": "",
                        "LOAD_ID": "sample_person.csv",
                        "MAIL_ADDR_CITY": "",
                        "MAIL_ADDR_COUNTRY": "",
                        "MAIL_ADDR_LINE1": "",
                        "MAIL_ADDR_LINE2": "",
                        "MAIL_ADDR_LINE3": "",
                        "MAIL_ADDR_POSTAL_CODE": "",
                        "MAIL_ADDR_STATE": "",
                        "NIN_COUNTRY": "",
                        "NIN_NUMBER": "",
                        "PASSPORT_COUNTRY": "US",
                        "PASSPORT_NUMBER": "PP3242342",
                        "PRIMARY_NAME_FIRST": "",
                        "PRIMARY_NAME_LAST": "",
                        "PRIMARY_NAME_MIDDLE": "",
                        "PRIMARY_NAME_PREFIX": "",
                        "PRIMARY_NAME_SUFFIX": "",
                        "RECORD_ID": "1507",
                        "SOCIAL_HANDLE": "",
                        "SOCIAL_NETWORK": "",
                        "SSN_NUMBER": "425-23-3242",
                        "WORK_PHONE_NUMBER": ""
                    },
                    "DATA_SOURCE": "PEOPLE",
                    "ENTITY_TYPE": "PEOPLE",
                    "ENTITY_KEY": "FA6D9C0B42C552FB36605EF21605679078192EEA",
                    "ENTITY_NAME": "",
                    "RECORD_ID": "1507",
                    "MATCH_KEY": "",
                    "MATCH_SCORE": "",
                    "ERRULE_CODE": "",
                    "REF_SCORE": 0,
                    "MATCH_LEVEL": 0,
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "NAME_DATA": [],
                    "ATTRIBUTE_DATA": [],
                    "IDENTIFIER_DATA": ["DRLIC: DL5463473 NV",
                    "PASSPORT: PP3242342 US",
                    "SSN: 425-23-3242"],
                    "ADDRESS_DATA": [],
                    "PHONE_DATA": [],
                    "RELATIONSHIP_DATA": [],
                    "ENTITY_DATA": [],
                    "OTHER_DATA": []
                }]
            },
            "RELATED_ENTITIES": [{
                "ENTITY_ID": 11,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+SSN-DRLIC-PASSPORT",
                "MATCH_SCORE": "4",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            },
            {
                "ENTITY_ID": 14,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+DRLIC-PASSPORT",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            },
            {
                "ENTITY_ID": 16,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+PASSPORT-DRLIC",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            }]
        },
        {
            "RESOLVED_ENTITY": {
                "ENTITY_ID": 16,
                "LENS_ID": 1,
                "ENTITY_NAME": "",
                "FEATURES": {
                    "DRLIC": [{
                        "FEAT_DESC": "DL0045747 NV",
                        "LIB_FEAT_ID": 73,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "DL0045747 NV",
                            "LIB_FEAT_ID": 73
                        }]
                    }],
                    "PASSPORT": [{
                        "FEAT_DESC": "PP3242342 US",
                        "LIB_FEAT_ID": 71,
                        "FEAT_DESC_VALUES": [{
                            "FEAT_DESC": "PP3242342 US",
                            "LIB_FEAT_ID": 71
                        }]
                    }]
                },
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                "RECORDS": [{
                    "JSON_DATA": {
                        "CELL_PHONE_NUMBER": "",
                        "DATA_SOURCE": "PEOPLE",
                        "DATE_OF_BIRTH": "",
                        "DRIVERS_LICENSE_NUMBER": "DL0045747",
                        "DRIVERS_LICENSE_STATE": "NV",
                        "DSRC_ACTION": "A",
                        "EMAIL_ADDRESS": "",
                        "ENTITY_TYPE": "PEOPLE",
                        "GENDER": "",
                        "HOME_ADDR_CITY": "",
                        "HOME_ADDR_COUNTRY": "",
                        "HOME_ADDR_LINE1": "",
                        "HOME_ADDR_LINE2": "",
                        "HOME_ADDR_LINE3": "",
                        "HOME_ADDR_POSTAL_CODE": "",
                        "HOME_ADDR_STATE": "",
                        "LOAD_ID": "sample_person.csv",
                        "MAIL_ADDR_CITY": "",
                        "MAIL_ADDR_COUNTRY": "",
                        "MAIL_ADDR_LINE1": "",
                        "MAIL_ADDR_LINE2": "",
                        "MAIL_ADDR_LINE3": "",
                        "MAIL_ADDR_POSTAL_CODE": "",
                        "MAIL_ADDR_STATE": "",
                        "NIN_COUNTRY": "",
                        "NIN_NUMBER": "",
                        "PASSPORT_COUNTRY": "US",
                        "PASSPORT_NUMBER": "PP3242342",
                        "PRIMARY_NAME_FIRST": "",
                        "PRIMARY_NAME_LAST": "",
                        "PRIMARY_NAME_MIDDLE": "",
                        "PRIMARY_NAME_PREFIX": "",
                        "PRIMARY_NAME_SUFFIX": "",
                        "RECORD_ID": "1508",
                        "SOCIAL_HANDLE": "",
                        "SOCIAL_NETWORK": "",
                        "SSN_NUMBER": "",
                        "WORK_PHONE_NUMBER": ""
                    },
                    "DATA_SOURCE": "PEOPLE",
                    "ENTITY_TYPE": "PEOPLE",
                    "ENTITY_KEY": "D06ECE67E582F2FFE6F8FC0F850CB21A7CFF54AB",
                    "ENTITY_NAME": "",
                    "RECORD_ID": "1508",
                    "MATCH_KEY": "",
                    "MATCH_SCORE": "",
                    "ERRULE_CODE": "",
                    "REF_SCORE": 0,
                    "MATCH_LEVEL": 0,
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "NAME_DATA": [],
                    "ATTRIBUTE_DATA": [],
                    "IDENTIFIER_DATA": ["DRLIC: DL0045747 NV",
                    "PASSPORT: PP3242342 US"],
                    "ADDRESS_DATA": [],
                    "PHONE_DATA": [],
                    "RELATIONSHIP_DATA": [],
                    "ENTITY_DATA": [],
                    "OTHER_DATA": []
                }]
            },
            "RELATED_ENTITIES": [{
                "ENTITY_ID": 15,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+PASSPORT-DRLIC",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            },
            {
                "ENTITY_ID": 17,
                "LENS_ID": 1,
                "MATCH_LEVEL": 2,
                "MATCH_KEY": "+DRLIC-PASSPORT",
                "MATCH_SCORE": "3",
                "ERRULE_CODE": "SF1E",
                "REF_SCORE": 6,
                "IS_DISCLOSED": 0,
                "IS_AMBIGUOUS": 0,
                "ENTITY_NAME": "",
                "RECORD_SUMMARY": [{
                    "DATA_SOURCE": "PEOPLE",
                    "RECORD_COUNT": 1,
                    "FIRST_SEEN_DT": "2018-11-02 05:04:36.813",
                    "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
                }],
                "LAST_SEEN_DT": "2018-11-02 05:04:36.813"
            }]
        }]
    }
    

    The FindNetworkByEntityID() and FindNetworkByRecordID() functions can be used to find all entities surrounding a requested set of entities. This includes the requested entities, paths between them, and relations to other nearby entities.

    Entities can be searched for by either Entity ID or by Record ID, depending on which function is chosen.

    These functions have the following parameters:

    They also have various arguments used to return response documents

    The functions return a JSON document that identifies the path between the each set of search entities (if the path exists), and the information on the entities in question (search entities, path entities, and build-out entities.

    Data Repository

    Purge

    Example code:

        engine.purgeRepository()
    
    
    /** purgeRepository */
        int ret = engine.purgeRepository();
    
        System.out.println("PURGED Repository");
    
    
      int ret = G2_purgeRepository();
    
    

    To purge the G2 repository, use the aptly named purgeRepository() method.

    Exceptions

    Get Last Exception

    Example code:

        # getLastException
        ret = engine.getLastException()
    
        # getLastExceptionCode
        ret2 = engine.getLastExceptionCode()
    
    
    
    /** get last exception */
        string ret = engine.getLastException();
    
    /** get last exception code */
        int ret2 = engine.getLastExceptionCode();
    
    
        char *response = NULL;
        size_t bufSize = 0;
    
        //getLastException
        int ret = G2Engine_getLastException(response, bufSize);
    
        //getLastExceptionCode
        int ret2 = G2Engine_getLastExceptionCode();
    
    

    Both the getLastException() and the getLastExceptionCode() methods retrieve the last exception thrown in G2Engine -- the former returns the exception as a string, and the latter as an integer.

    (Note: when using C, getLastException() accepts the following two parameters as input:

    Clear Last Exception

    Example code:

        # clearLastException
        engine.clearLastException()
    
    
    /** clear last exception */
        engine.clearLastException();
    
    
        G2Engine_clearLastException();
    
    

    The clearLastException() method clears the last exception thrown in G2Engine.

    G2Config

    Config

    The G2Config API is used to create a new JSON configuration from the default template or manipulate a JSON configuration that it is provided. The API read/writes a JSON string but that string would typically be read/written from/to a g2config.json file that the G2 engine reads during the init(...) call.

    Initialization

    Example code:

    from G2Config import G2Config
    
    #----------------------------------------
    if __name__ == '__main__':
        moduleName = "pyG2"
        iniFilename = "G2Module.ini"
        verboseLogging = False
    
        # Create the G2Config object with the G2Module.ini once per process
        engine = G2Config()
    
        # Initialize the G2Config object once per process. This will take a few seconds.
        ret = engine.init(moduleName, iniFilename, verboseLogging)
    
    
    import com.senzing.g2.engine.G2Engine;
    import com.senzing.g2.engine.G2JNI;
    import com.senzing.g2.engine.G2Config;
    import com.senzing.g2.engine.G2ConfigJNI;
    
    //...
    
        String G2_MODULE_NAME = "EngineSample";
        String iniFilename = "/opt/senzing/g2/python/G2Module.ini";
        boolean USE_VERBOSE_LOGGING = false;
    
    //...
    
        G2Config engine = new G2ConfigJNI();
        int ret = engine.init(G2_MODULE_NAME, iniFilename, USE_VERBOSE_LOGGING);
    
    
    #include "libg2config.h"
    #include <stdio.h>
    #include <stdlib.h>
    
    int main(int argc, char *argsz[])
    
    {
        const char *moduleName = "g2config";
        const char *iniFilename = "/opt/senzing/g2/python/G2Module.ini";
        const int verboseLogging = 0;
    
        int ret = G2Config_init(moduleName, iniFilename, verboseLogging);
    
    }
    
    

    To start using G2Config, you must first create and initialize the G2Config object -- this should be done once per process and prior to any other calls. Create a new instance of the G2Config object and assign it to a variable. Then, call the init() method to initialize the object. The init() method returns 0 upon success, and it accepts three parameters:

    Uninitialization

    Example code:

        # Uninitialize
        engine.destroy()
    
    
    /** destroy */
        int destroyResult = engine.destroy();
    
    
        int ret = G2Config_destroy();
    
    

    The destroy() method will destroy and perform cleanup for the G2Config object. This method should be called once at the end of every process, once all other calls are complete.

    Create

    Example code:

        # Create
        configHandle = engine.create()
    
    
    /** create */
        long configHandle = engine.create();
    
    
        // Create
        ConfigHandle configHandle = G2Config_create();
    
    

    The create() method creates a stock Senzing JSON config from the template in %SUPPORTPATH%/g2config.json. Importantly, the create() method returns a long integer referred to here as a 'configHandle'. This 'configHandle' is a handle referring to the created Senzing configuration, and can be used to represent said Senzing configuration in later function calls (as will be shown below).

    Load

    Example code:

        # load
        jsonConfig = ""
        configHandle =  engine.load(jsonConfig)
    
    
    /** load */
        String jsonConfig = "";
        long configHandle =  engine.load(jsonConfig);
    
    
        const char *jsonConfig = "";
        ConfigHandle configHandle = G2Config_load(jsonConfig);
    
    

    The load() method initializes the G2Config object from a JSON string. Any time you need to edit an existing configuration from an existing repository, you will want to use this method to be able to modify it. Just as with create(), the load() method returns a 'configHandle', a long integer which can be used to refer to the loaded configuration in future function calls.

    The load() method accepts one parameter:

    Save

    Example code:

        configHandle = engine.create()
        response = bytearray("")
    
        # save 
        ret = engine.save(configHandle, response)
    
    
    //...
        long configHandle = engine.create();
        StringBuffer response = new StringBuffer();
    
    //...
    
    /** save */ 
        int ret = engine.save(configHandle, response );
    
    
        ConfigHandle configHandle = G2Config_create();
    
        char *response = NULL;
        size_t bufSize = 0;
    
        int ret = G2Config_save(configHandle, &response, &bufSize, realloc);
    
    

    The save() method saves the G2Config object into a JSON string. A program would typically save this into a file that is referenced in the G2 INI (e.g. G2Module.ini) as the G2CONFIGFILE. The save() method returns 0 upon success, and it accepts the following parameters:

    Close

    Example code:

    
        configHandle = engine.create()
    
        # close
        engine.close(configHandle)
    
    
    //...
        long configHandle = engine.create();
    
    //...
    /** close */
        engine.close(configHandle);
    
    
        ConfigHandle configHandle = G2Config_create();
    
    //...code body here...
    
        //Close config handle
        G2Config_close(configHandle);
    
    

    The close() method cleans up the G2Config object pointed to by the given configHandle -- this should always be called once at the end of every process. The close() method accepts one parameter:

    Add Data Source

    Example code:

    
        configHandle = engine.create()
        dataSourceCode = "CUSTOMER"
    
        # add data source
        ret = engine.addDataSource(configHandle,dataSourceCode)
    
        # add data source with ID
        id = 0
        ret2 = engine.addDataSourceWithID(configHandle,dataSourceCode, id)
    
        # once finished, clean up resources
        engine.close(configHandle)
    
    
    //...
        long configHandle = engine.create();
        String code = "CUSTOMER";
    
    //...
    /** add data source */
        int ret = engine.addDataSource(configHandle, code);
    
    /** add data source with ID */
        int id = 0;
        int ret2 = engine.addDataSourceWithID(configHandle, code, id);
    
    
        ConfigHandle configHandle = G2Config_create();
        const char *dataSourceCode = "TEST";
        const int id = 1;
    
        //Add data source
        int ret = G2Config_addDataSource(configHandle, dataSourceCode);
    
        //Add data source with id
        int ret2 = G2Config_addDataSourceWithID(configHandle, dataSourceCode, id);
    
    

    The addDataSource() method adds a data source with the given code (e.g. CUSTOMER, WATCHLIST, etc) to the configuration and automatically assigns an appropriate unique ID. The addDataSource() method accepts two parameters:

    The addDataSourceWithID() method is like the addDataSource() method, except that addDataSourceWithID() allows the user to specify which unique ID gets assigned above. If the id can't be assigned, the method will error. The addDataSourceWithID() method accepts three parameters:

    Importantly, the addDataSourceWithID() method should only be used when an external system wants to manage the IDs, as reuse of the IDs will cause data integrity issues. The Senzing Workbench uses this mechanism, as it desires to maintain consistent IDs across multiple projects for potential future capabilities.

    List Data Sources

    Example code:

    
        configHandle = engine.create()
    
        #List data sources
        response = bytearray("")
        ret = engine.listDataSources(configHandle, response)
        print str(response)
    
    
    //...
        long configHandle = engine.create();
    
    //...
    /** list data sources */
        StringBuffer response = new StringBuffer();
        int ret = engine.listDataSources(configHandle, response);
    
        System.out.println(response.toString());
    
    
    //...
        ConfigHandle configHandle = G2Config_create();
        char *response = NULL;
        size_t bufSize = 0;
        const char *dataSourceCode = "TEST";
    
        int ret = G2Config_listDataSources(configHandle, &response, &bufSize, realloc);
        printf("%s\n", response);
    
    

    Example response:

    {"DSRC_CODE":["TEST","SEARCH","PEOPLE","COMPANIES","CUSTOMER"]}
    
    

    The listDataSources() method returns a list of the G2Config object's current data sources as a JSON document to a user-designated string. The listDataSources() method returns a 0 upon success, and fails otherwise. The listDataSources() method accepts the following parameters:

    Get Last Exception

    Example code:

        # getLastException
        ret = engine.getLastException()
    
        # getLastExceptionCode
        ret2 = engine.getLastExceptionCode()
    
    
    
    /** get last exception */
        string ret = engine.getLastException();
    
    /** get last exception code */
        int ret2 = engine.getLastExceptionCode();
    
    
        char *response = NULL;
        size_t bufSize = 0;
    
        //getLastException
        int ret = G2Config_getLastException(response, bufSize);
    
        //getLastExceptionCode
        int ret2 = G2Config_getLastExceptionCode();
    
    

    Both the getLastException() and the getLastExceptionCode() methods retrieve the last exception thrown in G2Config -- the former returns the exception as a string, and the latter as an integer.

    (Note: when using C, getLastException() accepts the following two parameters as input:

    Clear Last Exception

    Example code:

        # clearLastException
        engine.clearLastException()
    
    
    /** clear last exception */
        engine.clearLastException();
    
    
        G2Config_clearLastException();
    
    

    The clearLastException() method clears the last exception thrown in G2Config.

    G2Product

    Product

    The G2Product API is used to check version and license information.

    Initialization

    Example code:

    from G2Product import G2Product
    
    #----------------------------------------
    if __name__ == '__main__':
        moduleName = "pyG2"
        iniFilename = "G2Module.ini"
        verboseLogging = False
    
        # Create the G2Product object with the G2Module.ini once per process
        engine = G2Product()
    
        # Initialize the G2Product object once per process. This will take a few seconds.
        ret = engine.init(moduleName, iniFilename, verboseLogging)
    
    
    import com.senzing.g2.engine.G2Engine;
    import com.senzing.g2.engine.G2JNI;
    import com.senzing.g2.engine.G2Product;
    import com.senzing.g2.engine.G2ProductJNI;
    
    //...
    
        String G2_MODULE_NAME = "EngineSample";
        String iniFilename = "/opt/senzing/g2/python/G2Module.ini";
        boolean USE_VERBOSE_LOGGING = false;
    
    //...
    
        G2Product engine = new G2ProductJNI();
        int ret = engine.init(G2_MODULE_NAME, iniFilename, USE_VERBOSE_LOGGING);
    
    
    #include "libg2product.h"
    #include <stdio.h>
    #include <stdlib.h>
    
    int main(int argc, char *argsz[])
    
    {
        const char *moduleName = "g2product";
        const char *iniFilename = "/opt/senzing/g2/python/G2Module.ini";
        const int verboseLogging = 0;
    
        int ret = G2Product_init(moduleName, iniFilename, verboseLogging);
    
    }
    
    

    To start using G2Product, you must first create and initialize the G2Product object -- this should be done once per process and prior to any other calls. Create a new instance of the G2Product object and assign it to a variable. Then, call the init() method to initialize the object. The init() method returns 0 upon success, and it accepts three parameters:

    Uninitialization

    Example code:

        # Uninitialize
        engine.destroy()
    
    
    /** destroy */
        int destroyResult = engine.destroy();
    
    
        int ret = G2Product_destroy();
    
    

    The destroy() method will destroy and perform cleanup for the G2Product object. This method should be called once at the end of every process, once all other calls are complete.

    Version Info

    Example code:

         # Retrieve version details
         ret = engine.version()
         print ret
    
    
    /** version */
        System.out.println("VERSION: " + engine.version());
        System.out.println("");
    
    
        printf("VERSION: %s\n", G2Product_version());
    
    

    Example response:

    VERSION: {"VERSION":"SENZ_2018_06_25","BUILD_DATE":"2018-06-25","COMPATIBILITY_VERSION":{"CONFIG_VERSION":2}}
    
    

    Call version() to retrieve your Senzing engine version details. The call will return a JSON document containing all relevant version information.

    License Info

    Example code:

         # Retrieve license details
         ret = engine.license()
         print "LICENSE: "+ret
    
    
    /** license */
        System.out.println("LICENSE: " + engine.license());
        System.out.println("");
    
    
        printf("LICENSE: %s\n", G2Product_license());
    
    

    Example response:

    LICENSE: {"customer":"","contract":"","issueDate":"2018-06-19","licenseType":"EVAL","licenseLevel":"","billing":"","expireDate":"2018-12-19","recordLimit":10000}
    
    

    Call license() to retrieve your Senzing engine license details. The call will return a JSON document containing all relevant license information.

    License Validation

    Example code:

         # Retrieve license details
         licenseFilePath = "/opt/senzing/g2/data/g2.lic"
         returnCode = engine.validateLicenseFile(licenseFilePath)
         if returnCode == 0:
              print "License validated."
         else:
              print "License validation failed."
    
    
    /** license */
        String licenseFilePath = new String("/opt/senzing/g2/data/g2.lic");
        int returnCode = engine.validateLicenseFile(licenseFilePath);
        if (returnCode == 0)
            System.out.println("License validated.");
        else
            System.out.println("License validation failed.");
    
    
        const char* licenseFilePath = "/opt/senzing/g2/data/g2.lic";
        int returnCode = G2Product_validateLicenseFile(licenseFilePath);
        if (returnCode == 0)
            printf("License validated.");
        else
            printf("License validation failed.");
    
    

    Call validateLicenseFile() to validate your Senzing engine license file. The call will return 0 if the license file is valid.

    Get Last Exception

    Example code:

        # getLastException
        ret = engine.getLastException()
    
        # getLastExceptionCode
        ret2 = engine.getLastExceptionCode()
    
    
    
    /** get last exception */
        string ret = engine.getLastException();
    
    /** get last exception code */
        int ret2 = engine.getLastExceptionCode();
    
    
        char *response = NULL;
        size_t bufSize = 0;
    
        //getLastException
        int ret = G2Product_getLastException(response, bufSize);
    
        //getLastExceptionCode
        int ret2 = G2Product_getLastExceptionCode();
    
    

    Both the getLastException() and the getLastExceptionCode() methods retrieve the last exception thrown in G2Product -- the former returns the exception as a string, and the latter as an integer.

    (Note: when using C, getLastException() accepts the following two parameters as input:

    Clear Last Exception

    Example code:

        # clearLastException
        engine.clearLastException()
    
    
    /** clear last exception */
        engine.clearLastException();
    
    
        G2Product_clearLastException();
    
    

    The clearLastException() method clears the last exception thrown in G2Config.

    G2Audit

    The G2Audit API allows you to pull data reporting data back on how one data source is related to another. Once you are done loading one or more data sources, use this API to query information that can be useful for reporting, browsing, or auditing results.

    The sections below provide an in-depth tutorial for the G2Audit API.

    Initialization

    Example code:

    from G2Audit import G2Audit
    
    #----------------------------------------
    if __name__ == '__main__':
        moduleName = "pyG2"
        iniFilename = "G2Module.ini"
        verboseLogging = False
    
        # Create the G2Audit object with the G2Module.ini once per process
        engine = G2Audit()
    
        # Initialize the G2Audit object once per process. This will take a few seconds.
        ret = engine.init(moduleName, iniFilename, verboseLogging)
    
    
    import com.senzing.g2.engine.G2Engine;
    import com.senzing.g2.engine.G2JNI;
    
    import com.senzing.g2.engine.G2Audit;
    import com.senzing.g2.engine.G2AuditJNI;
    
    //...
    
        String moduleName = "EngineSample";
        String iniFilename = "/opt/senzing/g2/python/G2Module.ini";
        boolean verboseLogging = false;
    
    /** initialize */
    
        G2Audit engine = new G2AuditJNI();
        int ret = engine.init(moduleName, iniFilename, verboseLogging);
    
    
    #include "libg2audit.h"
    #include <stdio.h>
    #include <stdlib.h>
    
    int main(int argc, char *argsz[])
    
    {
        const char *moduleName = "g2audit";
        const char *iniFilename = "/opt/senzing/g2/python/G2Module.ini";
        const int verboseLogging = 0;
    
        int ret = G2Audit_init(moduleName, iniFilename, verboseLogging);
    
    }
    
    

    To start using G2Audit, you must first create and initialize the G2Audit object -- this should be done once per process and prior to any other calls. Create a new instance of the G2Audit object and assign it to a variable. Then, call the init() method to initialize the object. The init() method returns 0 upon success, and it accepts three parameters:

    Uninitialization

    Example code:

        # destroy
        engine.destroy()
    
    
    /** destroy */
        int destroyResult = engine.destroy();
    
    
        int ret = G2Audit_destroy();
    
    

    The destroy() method will destroy and perform cleanup for the G2Audit object. This method should be called once at the end of every process, once all other calls are complete.

    Open New Session

    Example code:

        #openSession
        sessionHandle = engine.openSession()
    
    
    /** create session handle */
        long sessionHandle = engine.openSession();
    
    
       SessionHandle sessionHandle = G2Audit_openSession();
    
    

    The openSession() method returns a long integer referred to here as a 'sessionHandle'. This 'sessionHandle' is a handle referring to your G2Audit object, and can be used to represent said G2Audit object in later function calls (as will be shown below).

    Cancel Session

    Example code:

        #...
        sessionHandle = engine.openSession()
    
        #...body of code here...
    
        #cancelSession
        engine.cancelSession(sessionHandle)
    
    
    //...
        long sessionHandle = engine.openSession();
    
    //...body of code here...
    
    /** cancelSession */
        engine.cancelSession(sessionHandle);
    
    
        G2Audit_cancelSession(sessionHandle);
    
    

    The cancelSession() method will “cancel” the generation of audit data associated with the given sessionHandle. This can be used to abort audit-related operations mid-process in another thread. The cancelSession() method accepts one parameter:

    Close Session

    Example code:

        #...
        sessionHandle = engine.openSession()
    
        #...body of code here...
    
        #closeSession
        engine.closeSession(sessionHandle)
    
    
    //...
        long sessionHandle = engine.openSession();
    
    //...body of code here...
    
    /** closeSession */
        engine.closeSession(sessionHandle);
    
    
        G2Audit_closeSession(sessionHandle);
    
    

    The closeSession() method cleans up the G2Audit object pointed to by the given sessionHandle -- this should always be called once at the end of every process. The closeSession() method accepts one parameter:

    Summary Data

    Example code:

        sessionHandle = engine.openSession()
    
        response = bytearray("")
        response2 = bytearray("")
    
        #getSummaryData
        ret = engine.getSummaryData(sessionHandle, response)
        print "Summary data: "+str(response)
    
        #getSummaryDataDirect
        ret = engine.getSummaryDataDirect(response2)
        print "Summary data: "+str(response2)
    
        #...
    
        #close session when done
        engine.closeSession()
    
    
        long sessionHandle = engine.openSession();
    
        StringBuffer response = new StringBuffer();
        StringBuffer response2 = new StringBuffer();
    
    /** getSummaryData */
        int ret = engine.getSummaryData(sessionHandle, response);
        System.out.println("Summary data: " + response.toString());
    
    /** getSummaryDataDirect */
        int ret2 = engine.getSummaryDataDirect(response2);
        System.out.println("Summary data: " + response2.toString());
    
    //...
    
    /** close session when done */
        engine.closeSession();
    
    
        SessionHandle sessionHandle = G2Audit_openSession();
    
        char *response = NULL;
        char *response2 = NULL;
        size_t bufSize = 0;
    
        //Get summary data
        int ret = G2Audit_getSummaryData(sessionHandle, &response, &bufSize, realloc);
        printf("Summary data: %s\n", response);
    
        //Get summary data direct
        int ret2 = G2Audit_getSummaryDataDirect(&response2, &bufSize, realloc);
        printf("Summary data: %s\n", response2);
    
        //Close session when done
        G2Audit_closeSession(sessionHandle);
    
    

    Example output:

    {"SUMMARY_AUDIT_INFO":{"AUDIT_INFO":[{"FROM_DATA_SOURCE":"TEST","TO_DATA_SOURCE":"TEST","FROM_ENTITY_COUNT":1,"TO_ENTITY_COUNT":1,"FROM_SINGLE_COUNT":0,"TO_SINGLE_COUNT":0,"FROM_RECORD_COUNT":3,"TO_RECORD_COUNT":3,"MATCHED_COUNT":2,"MATCHED_ENTITY_COUNT":1,"POSSIBLE_MATCH_COUNT":0,"DISCOVERED_RELATIONSHIP_COUNT":0,"DISCLOSED_RELATIONSHIP_COUNT":0},{"FROM_DATA_SOURCE":"TEST","TO_DATA_SOURCE":"PEOPLE","FROM_ENTITY_COUNT":1,"TO_ENTITY_COUNT":3,"FROM_SINGLE_COUNT":0,"TO_SINGLE_COUNT":0,"FROM_RECORD_COUNT":3,"TO_RECORD_COUNT":4,"MATCHED_COUNT":0,"MATCHED_ENTITY_COUNT":0,"POSSIBLE_MATCH_COUNT":2,"DISCOVERED_RELATIONSHIP_COUNT":0,"DISCLOSED_RELATIONSHIP_COUNT":0},{"FROM_DATA_SOURCE":"TEST","TO_DATA_SOURCE":"COMPANIES","FROM_ENTITY_COUNT":1,"TO_ENTITY_COUNT":2,"FROM_SINGLE_COUNT":0,"TO_SINGLE_COUNT":0,"FROM_RECORD_COUNT":3,"TO_RECORD_COUNT":4,"MATCHED_COUNT":0,"MATCHED_ENTITY_COUNT":0,"POSSIBLE_MATCH_COUNT":0,"DISCOVERED_RELATIONSHIP_COUNT":0,"DISCLOSED_RELATIONSHIP_COUNT":0},{"FROM_DATA_SOURCE":"PEOPLE","TO_DATA_SOURCE":"TEST","FROM_ENTITY_COUNT":3,"TO_ENTITY_COUNT":1,"FROM_SINGLE_COUNT":0,"TO_SINGLE_COUNT":0,"FROM_RECORD_COUNT":4,"TO_RECORD_COUNT":3,"MATCHED_COUNT":0,"MATCHED_ENTITY_COUNT":0,"POSSIBLE_MATCH_COUNT":2,"DISCOVERED_RELATIONSHIP_COUNT":0,"DISCLOSED_RELATIONSHIP_COUNT":0},{"FROM_DATA_SOURCE":"PEOPLE","TO_DATA_SOURCE":"PEOPLE","FROM_ENTITY_COUNT":3,"TO_ENTITY_COUNT":3,"FROM_SINGLE_COUNT":0,"TO_SINGLE_COUNT":0,"FROM_RECORD_COUNT":4,"TO_RECORD_COUNT":4,"MATCHED_COUNT":1,"MATCHED_ENTITY_COUNT":1,"POSSIBLE_MATCH_COUNT":1,"DISCOVERED_RELATIONSHIP_COUNT":1,"DISCLOSED_RELATIONSHIP_COUNT":0},{"FROM_DATA_SOURCE":"PEOPLE","TO_DATA_SOURCE":"COMPANIES","FROM_ENTITY_COUNT":3,"TO_ENTITY_COUNT":2,"FROM_SINGLE_COUNT":0,"TO_SINGLE_COUNT":0,"FROM_RECORD_COUNT":4,"TO_RECORD_COUNT":4,"MATCHED_COUNT":0,"MATCHED_ENTITY_COUNT":0,"POSSIBLE_MATCH_COUNT":0,"DISCOVERED_RELATIONSHIP_COUNT":1,"DISCLOSED_RELATIONSHIP_COUNT":0},{"FROM_DATA_SOURCE":"COMPANIES","TO_DATA_SOURCE":"TEST","FROM_ENTITY_COUNT":2,"TO_ENTITY_COUNT":1,"FROM_SINGLE_COUNT":0,"TO_SINGLE_COUNT":0,"FROM_RECORD_COUNT":4,"TO_RECORD_COUNT":3,"MATCHED_COUNT":0,"MATCHED_ENTITY_COUNT":0,"POSSIBLE_MATCH_COUNT":0,"DISCOVERED_RELATIONSHIP_COUNT":0,"DISCLOSED_RELATIONSHIP_COUNT":0},{"FROM_DATA_SOURCE":"COMPANIES","TO_DATA_SOURCE":"PEOPLE","FROM_ENTITY_COUNT":2,"TO_ENTITY_COUNT":3,"FROM_SINGLE_COUNT":0,"TO_SINGLE_COUNT":0,"FROM_RECORD_COUNT":4,"TO_RECORD_COUNT":4,"MATCHED_COUNT":0,"MATCHED_ENTITY_COUNT":0,"POSSIBLE_MATCH_COUNT":0,"DISCOVERED_RELATIONSHIP_COUNT":1,"DISCLOSED_RELATIONSHIP_COUNT":0},{"FROM_DATA_SOURCE":"COMPANIES","TO_DATA_SOURCE":"COMPANIES","FROM_ENTITY_COUNT":2,"TO_ENTITY_COUNT":2,"FROM_SINGLE_COUNT":0,"TO_SINGLE_COUNT":0,"FROM_RECORD_COUNT":4,"TO_RECORD_COUNT":4,"MATCHED_COUNT":2,"MATCHED_ENTITY_COUNT":2,"POSSIBLE_MATCH_COUNT":0,"DISCOVERED_RELATIONSHIP_COUNT":0,"DISCLOSED_RELATIONSHIP_COUNT":0}]}}
    
    

    The getSummaryData() method obtains general summary data about your current audit session, and sends this data in JSON form to a user-designated response string. The getSummaryData() method returns "0" upon success, and accepts the following parameters as input:

    Alternatively, the getSummaryDataDirect() method behaves exactly as the previous method, but without the need for a predefined session handle. The getSummaryDataDirect() method returns "0" upon success, and accepts the following parameters as input:

    Used Match Keys

    Example code:

        sessionHandle = engine.openSession()
    
        response = bytearray("")
        fromDataSource = dataSourceCode  #i.e. fromDataSource = "TEST"
        toDataSource = dataSourceCode
        matchLevel = 1
    
        #getUsedMatchKeys
        ret = engine.getUsedMatchKeys(sessionHandle, fromDataSource, toDataSource, matchLevel, response)
        print str(response)
    
        #...
    
        #close session when done
        engine.closeSession()
    
    
        long sessionHandle = engine.openSession();
    
        StringBuffer response = new StringBuffer();
        string fromDataSource = dataSourceCode; //i.e. string fromDataSource = "TEST";
        string toDataSource = dataSourceCode;
        int matchLevel = 1;
    
    /** getUsedMatchKeys */
        int ret = engine.getUsedMatchKeys(sessionHandle, fromDataSource, toDataSource, matchLevel, response);
        System.out.println(response.toString());
    
    //...
    
    /** close session when done */
        engine.closeSession();
    
    
        SessionHandle sessionHandle = G2Audit_openSession();
    
        char *response = NULL;
        size_t bufSize = 0;
        const char *fromDataSource = "TEST";
        const char *toDataSource = "TEST";
        const int match_level = 1;
    
        //getUsedMatchKeys
        int ret = G2Audit_getUsedMatchKeys(sessionHandle, fromDataSource, toDataSource, match_level, &response, &bufSize, realloc);
        printf("Used key data: %s\n", response);
    
        //close session when done
        G2Audit_closeSession(sessionHandle);
    
    

    Example output:

    {"DISTINCT_MATCH_KEY_INFO":{"MATCH_KEY_INFO":[{"MATCH_KEY":"+NAME+DOB+ADDRESS+SSN","COUNT":1},{"MATCH_KEY":"EXACTLY_SAME","COUNT":1}]}}
    
    

    The getUsedMatchKeys() method fetches the usage frequency of different match keys, and returns this information in JSON form to a user-designated string (the method itself returns '0' upon success) . The getUsedMatchKeys() method accepts the following parameters as input:

    Used Principles

    Example code:

        sessionHandle = engine.openSession()
    
        response = bytearray("")
        fromDataSource = dataSourceCode  #i.e. fromDataSource = "TEST"
        toDataSource = dataSourceCode
        matchLevel = 1
    
        #getUsedPrinciples
        ret = engine.getUsedPrinciples(sessionHandle, fromDataSource, toDataSource, matchLevel, response)
        print str(response)
    
        #...
    
        #close session when done
        engine.closeSession()
    
    
        long sessionHandle = engine.openSession();
    
        string fromDataSource = dataSourceCode; //i.e. string fromDataSource = "TEST";
        string toDataSource = dataSourceCode;
        int matchLevel = 1;
        StringBuffer response = new StringBuffer();
    
    /** get used principles */
        int ret = engine.getUsedPrinciples(sessionHandle, fromDataSource, toDataSource, matchLevel, response);
        System.out.println(response.toString());
    
    //...
    
    /** close session when done */
        engine.closeSession(); 
    
    
        SessionHandle sessionHandle = G2Audit_openSession();
    
        char *response = NULL;
        size_t bufSize = 0;
        const char *fromDataSource = "TEST";
        const char *toDataSource = "TEST";
        const int match_level = 1;
    
        //getUsedPrinciples
        int ret = G2Audit_getUsedPrinciples(sessionHandle, fromDataSource, toDataSource, match_level, &response, &bufSize, realloc);
        printf("Used principle data: %s\n", response);
    
        //close session when done
        G2Audit_closeSession(sessionHandle);
    
    

    Example output:

    {"DISTINCT_PRINCIPLE_INFO":{"PRINCIPLE_INFO":[{"PRINCIPLE":"SF1_PNAME_CFF_CSTAB","COUNT":1}]}}
    
    

    The getUsedPrinciples() method fetches the usage frequency of different entity resolution principles, and sends this information in JSON form to a user-designated string (the method itself returns '0' upon success) . The getUsedPrinciples() method accepts the following parameters as input:

    Get Audit Report

    Example code:

        #Preliminary parameters
        sessionHandle = engine.openSession()
        fromDataSource = dataSourceCode #i.e. fromDataSource = "TEST"
        toDataSource = dataSourceCode
        matchLevel = 1
    
        #getAuditReport
        reportHandle = engine.getAuditReport(sessionHandle,fromDataSource, toDataSource, matchLevel)
    
        #fetchNext
        response = engine.fetchNext(reportHandle)
        print "Fetched data: "+response
    
        #...
    
        #closeReport
        engine.closeReport(reportHandle)
    
        #...
    
        #closeSession
        engine.closeSession(sessionHandle)
    
    
    //Preliminary parameters
        long sessionHandle = engine.openSession();
        string fromDataSource = dataSourceCode; //i.e. string fromDataSource = "TEST";
        string toDataSource = dataSourceCode;
        int matchLevel = 1;
    
    //...
    
    /** getAuditReport */
        long reportHandle = engine.getAuditReport(sessionHandle, toDataSource, fromDataSource, match_level);
    
    /** fetchNext */
        String fetched = engine.fetchNext(reportHandle);
        System.out.println("Fetched data: " + fetched);
    
    //...
    
    /** closeReport */
        engine.closeReport(reportHandle);
    
    //...
    
    /** close session when done */
        engine.closeSession();
    
    
        //Preliminary parameter definitions
        SessionHandle sessionHandle = G2Audit_openSession();
        char response[64*1028];
        const char *fromDataSource = "TEST";
        const char *toDataSource = "TEST";
        const int match_level = 1;
    
        //getAuditReport
        ReportHandle reportHandle = G2Audit_getAuditReport(sessionHandle, fromDataSource, toDataSource, match_level);
    
        //fetchNext
        while (NULL != G2Audit_fetchNext(reportHandle, response, sizeof(response))) {
            printf("%s\n",response);
        }
    
        //closeReport
        G2Audit_closeReport(reportHandle);
    
    

    Example output:

    {"AUDIT_PAGE":{"AUDIT_GROUPS":[{"BASE_RECORD":[{"ENTITY_ID":1,"PRINCIPLE":"","MATCH_KEY":"","RECORD_ID":"RECORD1","ENTITY_TYPE":"TEST","DATA_SOURCE":"TEST","MATCH_TYPE":0,"AUDIT_SCORE":"","REF_SCORE":0,"NAME_DATA":["PRIMARY: SMITH JOE H"],"ATTRIBUTE_DATA":["DOB: 1965-05-23"],"IDENTIFIER_DATA":["SSN: 345678999"],"ADDRESS_DATA":["HOME: 653 STATE ROUTE 7 FRESNO CA 55073"],"PHONE_DATA":[],"RELATIONSHIP_DATA":[],"ENTITY_DATA":[],"OTHER_DATA":["LENS: DEFAULT"]}],"AUDIT_RECORD":[{"ENTITY_ID":1,"PRINCIPLE":"SF1_PNAME_CFF_CSTAB","MATCH_KEY":"+NAME+DOB+ADDRESS+SSN","RECORD_ID":"RECORD2","ENTITY_TYPE":"TEST","DATA_SOURCE":"TEST","MATCH_TYPE":1,"AUDIT_SCORE":"17","REF_SCORE":10,"NAME_DATA":["PRIMARY: SMITH JOSEPH"],"ATTRIBUTE_DATA":["DOB: 1965-05-23"],"IDENTIFIER_DATA":["SSN: 345678999"],"ADDRESS_DATA":["HOME: 653 STATE ROUTE 7 FRESNO CA 55073-1234"],"PHONE_DATA":[],"RELATIONSHIP_DATA":[],"ENTITY_DATA":[],"OTHER_DATA":["LENS: DEFAULT"]}],"ECL_RECORD":[],"AUDIT_KEY":"1","AUDIT_NAME":"PRIMARY: SMITH JOSEPH","AUDIT_TYPE":"","FROM_DATA_SOURCE":"TEST","TO_DATA_SOURCE":"TEST"}],"FROM_DATA_SOURCE":"TEST","TO_DATA_SOURCE":"TEST","MATCH_LEVEL":1,"FIRST_RECORD_INDEX":0}}
    
    

    There are three steps to auditing entity data from the G2Audit object. First, use the getAuditReport() method to generate a long integer, referred to here as an 'reportHandle'. The getAuditReport() method accepts four parameter as input:

    Second, use the fetchNext() method to read the reportHandle and export a row of JSON output containing the audit data for a single resolved entity. Note that successive calls of fetchNext() will export successive rows of entity data. The fetchNext() method accepts the following parameters as input:

    Finally, use the closeReport() method to close the reportHandle and clean up system resources. This should always be called once you are finished auditing resolved entity data. The closeReport() method accepts one parameter as input:

    Get Last Exception

    Example code:

        # getLastException
        ret = engine.getLastException()
    
        # getLastExceptionCode
        ret2 = engine.getLastExceptionCode()
    
    
    
    /** get last exception */
        string ret = engine.getLastException();
    
    /** get last exception code */
        int ret2 = engine.getLastExceptionCode();
    
    
        char *response = NULL;
        size_t bufSize = 0;
    
        //getLastException
        int ret = G2Audit_getLastException(response, bufSize);
    
        //getLastExceptionCode
        int ret2 = G2Audit_getLastExceptionCode();
    
    

    Both the getLastException() and the getLastExceptionCode() methods retrieve the last exception thrown in G2Audit -- the former returns the exception as a string, and the latter as an integer.

    (Note: when using C, getLastException() accepts the following two parameters as input:

    Clear Last Exception

    Example code:

        # clearLastException
        engine.clearLastException()
    
    
    /** clear last exception */
        engine.clearLastException();
    
    
        G2Audit_clearLastException();
    
    

    The clearLastException() method clears the last exception thrown in G2Audit.

    Getting Stuff Done

    Adding and Removing Records with the Senzing Engine Interface

    Overview

    This article demonstrates the basic code:

    from G2Engine import G2Engine
    
    #----------------------------------------
    if __name__ == '__main__':
        moduleName = "pyG2",
        iniFilename = "G2Module.ini"
        verboseLogging = False
    
        # Create the G2Engine object with the G2Module.ini once per process
        engine = G2Engine()
    
        # Initialize the G2Engine once per process. This will take a few seconds.
        initRet = engine.init(moduleName, iniFilename, verboseLogging)
    
        dataSourceCode = 'TEST'
        recordID = 'entity_record_id'
        jsonData = '{"NAMES": [{ "NAME_TYPE": "PRIMARY", "NAME_LAST": "Smith", "NAME_FIRST": "John", "NAME_MIDDLE": "M"}], "PASSPORT_NUMBER": "PP11111", "PASSPORT_COUNTRY": "US", "DRIVERS_LICENSE_NUMBER": "DL11111", "SSN_NUMBER": "111-11-1111" }'
        loadID = None
    
        # Add data record(s)
        # Make as many parallel requests as desired.
        ret = engine.addRecord(dataSourceCode,recordID,jsonData,loadID)
    
        jsonData2 =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JOHN\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}"
    
    
        #replaceRecord
        ret = engine.replaceRecord(dataSourceCode, recordID, jsonData2, loadID)
    
    
        #deleteRecord
        ret = engine.deleteRecord(dataSourceCode,recordID, loadID)
    
        #When done with all G2 requests, shut down the G2 Engine */
        engine.destroy()
    
    
    import com.senzing.g2.engine.G2Engine;
    import com.senzing.g2.engine.G2JNI;
    
    //...
    
        String moduleName = "G2JNI";
        String iniFilename = args[0];
        boolean verboseLogging = false;
    
    /** init */    
        G2Engine engine = new G2JNI();
        int initResult = engine.init(moduleName, iniFilename, verboseLogging);
    
        String dataSourceCode = "TEST";
        String recordID = "RECORD3";
        String jsonData =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JANE\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}";
        String loadID = null;
    
    /** addRecord */
        int ret = engine.addRecord(dataSourceCode, recordID, jsonData, loadID);
    
        String jsonData2 =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JOHN\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}";
    
    
    /** replaceRecord */
        ret = engine.replaceRecord(dataSourceCode, recordID, jsonData2, loadID);
    
    
    /** deleteRecord */
        ret = engine.deleteRecord(dataSourceCode,recordID, loadID);
    
    /** When done with all G2 requests, shut down the G2 Engine */
        int destroyResult = engine.destroy();
    
    
    #include "libg2.h"
    #include <stdio.h>
    #include <stdlib.h>
    
    int main(int argc, char *argsz[])
    {
        char *moduleName = "g2module";
        char *iniFilename = "/opt/senzing/g2/python/G2Module.ini";
        bool verboseLogging = false;
    
        //init
        int ret = G2_init(moduleName, iniFilename, verboseLogging);
    
        const char *dataSourceCode = "TEST";
        const char *recordID = "RECORD3";
        const char *jsonData =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JANE\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}";
        const char *loadID = NULL;
    
        //addRecord
        int ret2 = G2_addRecord(dataSourceCode, recordID, jsonData, loadID);
    
        const char *jsonData2 =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JANE\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}";
    
        //replaceRecord
        int ret3 = G2_replaceRecord(dataSourceCode, recordID, jsonData2, loadID);
    
        //deleteRecord
        int ret4 = G2_deleteRecord(dataSourceCode, recordID, loadID);
    
        //When done with all G2 requests, shut down the G2 Engine
        int destroyResult = G2_destroy();
    }
    
    

    Entity data can be easily loaded into the data repository through the use of the G2 engine interface. This allows for a more direct way of adding (or removing) data from an application system.

    There is much background on the core of the JSON messages in the Generic Entity Specification article. This information can help to create the necessary JSON documents for specifying entity attributes.

    With a few function calls, you can add data using a few key fields and a simple JSON document outlining the entity attributes.

    Adding and Removing Records with G2 Engine

    The three core steps for utilizing the G2 Engine to retrieve entity information are:

    1. Create and initialize a new G2Engine object with an arbitrary name and the G2Module.ini that the G2Project.ini points to. There should be one G2Engine object per process.
    2. After the G2Engine object is initialized, addRecord(), replaceRecord(), and deleteRecord() can be called as many times as desired and from multiple threads at the same time.
    3. Once all function calls are complete, call destroy() to clean up resources.

    Functional Parameters

    The functional parameters for the functions to add/remove records are as follows…

    Searching by Entity Attributes with the Senzing Engine Interface

    Overview

    This article demonstrates the basic code:

    from G2Engine import G2Engine
    
    #----------------------------------------
    if __name__ == '__main__':
        moduleName = "pyG2",
        iniFilename = "G2Module.ini"
        verboseLogging = False
    
        # Create the G2Engine object with the G2Module.ini once per process
        engine = G2Engine()
    
        # Initialize the G2Engine once per process. This will take a few seconds.
        initRet = engine.init(moduleName, iniFilename, verboseLogging)
    
        jsonData = '{"NAMES": [{ "NAME_TYPE": "PRIMARY", "NAME_LAST": "Smith", "NAME_FIRST": "John", "NAME_MIDDLE": "M"}], "PASSPORT_NUMBER": "PP11111", "PASSPORT_COUNTRY": "US", "DRIVERS_LICENSE_NUMBER": "DL11111", "SSN_NUMBER": "111-11-1111" }'
    
        response = bytearray("")
    
        #searchByAttributes
        #make as many parallel requests as desired
        ret = engine.searchByAttributes(jsonData,response)
        print str(response)
    
        #When done with all G2 requests, shut down the G2 Engine
        engine.destroy()
    
    
    import com.senzing.g2.engine.G2Engine;
    import com.senzing.g2.engine.G2JNI;
    
    //...
    
        String moduleName = "G2JNI";
        String iniFilename = args[0];
        boolean verboseLogging = false;
    
    /** init */    
        G2Engine engine = new G2JNI();
        int initResult = engine.init(moduleName, iniFilename, verboseLogging);
    
        String jsonData =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JANE\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}";
    
        StringBuffer response = new StringBuffer();
    
    /** searchByAttributes */
    /** make as many parallel requests as desired */
        int ret = engine.searchByAttributes(jsonData, response);
        System.out.println("GET Entity: " + response.toString());
    
    /** When done with all G2 requests, shut down the G2 Engine */
        int destroyResult = engine.destroy();
    
    
    #include "libg2.h"
    #include <stdio.h>
    #include <stdlib.h>
    
    int main(int argc, char *argsz[])
    {
        char *moduleName = "g2module";
        char *iniFilename = "/opt/senzing/g2/python/G2Module.ini";
        bool verboseLogging = false;
    
        //init
        int ret = G2_init(moduleName, iniFilename, verboseLogging);
    
        const char *jsonData =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JANE\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}";
        char *response = NULL;
        size_t bufSize = 0;
    
        //Search by entity attributes
        int ret2 = G2_searchByAttributes(jsonData, &response, &bufSize, realloc);
        printf("RECORD: %s\n", response);
        free(response);
    
        //When done with all G2 requests, shut down the G2 Engine
        int destroyResult = G2_destroy();
    }
    
    
    cd /opt/senzing/g2/python
    python G2Command.py
    searchByAttributes <jsonData> 
    
    

    Entity searching is a key component for interactive use of Entity Resolution intelligence. The core Senzing G2 engine provides real-time search capabilities that are easily accessed via the available G2Engine.py interface. The system can be searched for a profile of attributes.

    There is much background on the core of the JSON messages in the Generic Entity Specification article. This information can help to create the necessary JSON documents for specifying entity attributes.

    With a few function calls, you can search for entities using a simple JSON document outlining the entity attributes.

    Searching for Attributes with the Senzing Engine

    The three core steps for utilizing the G2 Engine to retrieve entity information are:

    1. Create and initialize a new G2Engine object with an arbitrary name and the G2Module.ini that the G2Project.ini points to. There should be one G2Engine object per process.
    2. After the G2Engine object is initialized, searchByAttributes() can be called as many times as desired and from multiple threads at the same time.
    3. Once all function calls are complete, call destroy() to clean up resources.

    Functional Parameters

    The functional parameters for the function to search for attributes are as follows…

    Search Response Messages

    The output message for a search will contain the information on any entities found that match the search criteria. This could be any number of entities, or zero entities if none are found.

    Example output:

    {
    "SEARCH_RESPONSE": {
    "RESOLVED_ENTITY": [{
    "LENS_ID": 1,
    "RES_ENT_ID": 1,
    "MATCH_LEVEL": 2,
    "MATCH_KEY": "+DRLIC+PASSPORT-SSN",
    "MATCH_SCORE": "6",
    "ERRULE_CODE": "SF1",
    "REF_SCORE": 6,
    "MATCH_SCORES": {
    "DRLIC": [{
    "INBOUND_FEAT": "DL11111",
    "CANDIDATE_FEAT": "DL11111",
    "FULL_SCORE": 100
    }],
    "GROUPER_KEY": [{
    "INBOUND_FEAT": "1 2 3 RS-27 ES-35 4D4A29C22CEF36DAD7B8DE1DE9724934EC7AB3CB",
    "CANDIDATE_FEAT": "1 2 1 RS-27 ES-35 6BAA8B13001E779888AA3F00C8E3513E86A81F96",
    "FULL_SCORE": 0
    }],
    "NAME": [{
    "INBOUND_FEAT": "JOHN M SMITH",
    "CANDIDATE_FEAT": "ROBERT M JONES",
    "GNR_FN": 72,
    "GNR_SN": 0,
    "GNR_GN": 67,
    "GENERATION_MATCH": -1,
    "GNR_ON": -1
    }],
    "PASSPORT": [{
    "INBOUND_FEAT": "PP11111 US",
    "CANDIDATE_FEAT": "PP11111 US",
    "FULL_SCORE": 100
    }],
    "SSN": [{
    "INBOUND_FEAT": "111-11-1111",
    "CANDIDATE_FEAT": "222-22-2222",
    "FULL_SCORE": 0
    }]
    },
    "RECORD": [{
    "DATA_SOURCE": "TEST",
    "ENTITY_TYPE": "PERSON",
    "ENTITY_KEY": "24912928B2A701FC8E1380AC47DCC9195FC111C5",
    "ENTITY_NAME": "Robert M Jones",
    "RECORD_ID": "",
    "MATCH_KEY": "",
    "MATCH_SCORE": "",
    "ERRULE_CODE": "",
    "REF_SCORE": 0,
    "MATCH_LEVEL": 0
    }]
    },
    {
    "LENS_ID": 1,
    "RES_ENT_ID": 2,
    "MATCH_LEVEL": 2,
    "MATCH_KEY": "+DRLIC+PASSPORT-SSN",
    "MATCH_SCORE": "6",
    "ERRULE_CODE": "SF1",
    "REF_SCORE": 6,
    "MATCH_SCORES": {
    "DRLIC": [{
    "INBOUND_FEAT": "DL11111",
    "CANDIDATE_FEAT": "DL11111",
    "FULL_SCORE": 100
    }],
    "GROUPER_KEY": [{
    "INBOUND_FEAT": "1 2 3 RS-27 ES-35 4D4A29C22CEF36DAD7B8DE1DE9724934EC7AB3CB",
    "CANDIDATE_FEAT": "1 2 1 RS-27 ES-35 A4964CBA7975CF071C3057F9D0A4B001E3B89C34",
    "FULL_SCORE": 0
    }],
    "NAME": [{
    "INBOUND_FEAT": "JOHN M SMITH",
    "CANDIDATE_FEAT": "ROBERT M JONES",
    "GNR_FN": 72,
    "GNR_SN": 0,
    "GNR_GN": 67,
    "GENERATION_MATCH": -1,
    "GNR_ON": -1
    }],
    "PASSPORT": [{
    "INBOUND_FEAT": "PP11111 US",
    "CANDIDATE_FEAT": "PP11111 US",
    "FULL_SCORE": 100
    }],
    "SSN": [{
    "INBOUND_FEAT": "111-11-1111",
    "CANDIDATE_FEAT": "333-33-3333",
    "FULL_SCORE": 0
    }]
    },
    "RECORD": [{
    "DATA_SOURCE": "TEST",
    "ENTITY_TYPE": "PERSON",
    "ENTITY_KEY": "0AC50DA32F4F1DF374B6DD81BACC19F239CD1208",
    "ENTITY_NAME": "Robert M Jones",
    "RECORD_ID": "",
    "MATCH_KEY": "",
    "MATCH_SCORE": "",
    "ERRULE_CODE": "",
    "REF_SCORE": 0,
    "MATCH_LEVEL": 0
    }]
    }]
    }
    }
    

    Getting Resolved Entities with the Senzing Engine Interface

    Overview

    This article demonstrates the basic code:

    from G2Engine import G2Engine
    
    #----------------------------------------
    if __name__ == '__main__':
        moduleName = "pyG2",
        iniFilename = "G2Module.ini"
        verboseLogging = False
    
        # Create the G2Engine object with the G2Module.ini once per process
        engine = G2Engine()
    
        # Initialize the G2Engine once per process. This will take a few seconds.
        initRet = engine.init(moduleName, iniFilename, verboseLogging)
    
        dataSourceCode = "TEST"
        recordID = "RECORD3"
        jsonData =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JANE\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}"
        loadID = None
    
        #addRecord
        ret = engine.addRecord(dataSourceCode, recordID, jsonData, loadID)
    
        entityID = 1
        response = bytearray("")
    
        #getEntityByEntityID
        ret2 = engine.getEntityByEntityID(entityID, response)
        print "GET Entity: "+str(response)
    
        #getEntityByRecordID
        response = bytearray("")
        ret3 = engine.getEntityByRecordID(dataSourceCode, recordID, response)
        print "GET Entity: "+str(response)
        print ""
    
        #getRecord
        response = bytearray("")
        ret4 = engine.getRecord(dataSourceCode,recordID,response)
        print str(response)
        print ""
    
        #When done with all G2 requests, shut down the G2 Engine
        engine.destroy();
    
    
    import com.senzing.g2.engine.G2Engine;
    import com.senzing.g2.engine.G2JNI;
    
    //...
    
        String moduleName = "G2JNI";
        String iniFilename = args[0];
        boolean verboseLogging = false;
    
    /** init */    
        G2Engine engine = new G2JNI();
        int initResult = engine.init(moduleName, iniFilename, verboseLogging);
    
        String dataSourceCode = "TEST";
        String recordID = "RECORD3";
        String jsonData =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JANE\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}";
        String loadID = null;
    
    /** addRecord */
        int ret = engine.addRecord(dataSourceCode, recordID, jsonData, loadID);
    
        long entityID = 1;
        StringBuffer response = new StringBuffer();
    
    /** getEntityByEntityID */
        int ret2 = engine.getEntityByEntityID(entityID, response);
        System.out.println("GET Entity: " + response.toString());
    
    /** getEntityByRecordID */
        response = new StringBuffer();
        ret = g2.getEntityByRecordID(dataSourceCode,recordID,response);
        System.out.println("GET Entity: " + response.toString());
        System.out.println("");
    
    /** getRecord */
        response = new StringBuffer();
        ret = g2.getRecord(dataSourceCode, recordID, response);
        System.out.println("GET RECORD: " + response.toString());
        System.out.println("");
    
    /** When done with all G2 requests, shut down the G2 Engine */
        int destroyResult = engine.destroy();
    
    
    #include "libg2.h"
    #include <stdio.h>
    #include <stdlib.h>
    
    int main(int argc, char *argsz[])
    {
        char *moduleName = "g2module";
        char *iniFilename = "/opt/senzing/g2/python/G2Module.ini";
        bool verboseLogging = false;
    
        //init
        int ret = G2_init(moduleName, iniFilename, verboseLogging);
    
        const char *dataSourceCode = "TEST";
        const char *recordID = "RECORD3";
        const char *jsonData =  "{\"NAME_TYPE\": \"PRIMARY\", \"NAME_FIRST\": \"JANE\", \"NAME_LAST\": \"SMITH\", \"ADDR_TYPE\": \"HOME\", \"ADDR_LINE1\": \"653 STATE ROUTE 7\", \"ADDR_CITY\": \"FRESNO\", \"ADDR_STATE\": \"CA\", \"ADDR_POSTAL_CODE\": \"55073-1234\"}";
        const char *loadID = NULL;
    
        //addRecord
        int addRet = G2_addRecord(dataSourceCode, recordID, jsonData, loadID);
    
        char *response = NULL;
        size_t bufSize = 0;
        const long long entityID = 4001;
    
        //Get entity by entityID
        int ret1 = G2_getEntityByEntityID(entityID, &response, &bufSize, realloc);
        printf("ENTITY: %s\n", response);
        free(response);
    
        response = NULL;
    
        //Get entity by recordID
        int ret2 = G2_getEntityByRecordID(dataSourceCode,recordID,&response, &bufSize,realloc);
        printf("ENTITY: %s\n", response);
        free(response);
    
        response = NULL;
    
        //Get record
        int ret3 = G2_getRecord(dataSourceCode, recordID, &response, &bufSize, realloc);
        printf("RECORD: %s\n", response);
        free(response);
    
        //When done with all G2 requests, shut down the G2 Engine
        int destroyResult = G2_destroy();
    }
    
    

    Loading data and exporting is the core use case for batch style Entity Resolution. For an interactive use, we also provide methods for retrieving single resolved entities for evaluation. Resolved entities can be retrieved based on entity keys or other identifying information.

    There are a few functions that are used to retrieve entity information, each based on different search criteria. With a few function calls, you can retrieve the entity data in the system quickly and easily. These function calls return the resolved entity data as a set of JSON documents.

    Retrieving Entity Information with the Senzing Engine

    The three core steps for utilizing the G2 Engine to retrieve entity information are:

    1. Create and initialize a new G2Engine object with an arbitrary name and the G2Module.ini that the G2Project.ini points to. There should be one G2Engine object per process.
    2. After the G2Engine object is initialized, call the functions to get the entity data. These can be called as many times as desired and from multiple threads at the same time.
    3. Once all function calls are complete, call destroy() to clean up resources.

    Functional Parameters

    The functional parameters for the functions to retrieve entity records are as follows…

    Response

    If a matching entity is found, the information for that entity will be returned as a JSON document, similar to the format returned by the batch JSON exporter.

    An example document is as follows.

    {
        "RESOLVED_ENTITY": {
            "RESOLVED_ID": 1,
            "LENS_ID": 1,
            "RECORD": [{
                "NAMES": [{
                    "NAME_TYPE": "PRIMARY",
                    "NAME_LAST": "Smith",
                    "NAME_FIRST": "John",
                    "NAME_MIDDLE": "M"
                }],
                "PASSPORT_NUMBER": "PP11111",
                "PASSPORT_COUNTRY": "US",
                "DRIVERS_LICENSE_NUMBER": "DL11111",
                "SSN_NUMBER": "111-11-1111",
                "DATA_SOURCE": "TEST",
                "ENTITY_TYPE": "PERSON",
                "DSRC_ACTION": "A",
                "SOURCE_ID": "observation_source_id",
                "RECORD_ID": "entity_record_id",
                "LENS": "DEFAULT",
                "ENTITY_KEY": "D8250B485CFEC5F5218F60C831CF3160E1DECAE7",
                "ENTITY_NAME": "John M Smith",
                "MATCH_KEY": "",
                "MATCH_SCORE": "",
                "ERRULE_CODE": "",
                "REF_SCORE": 0,
                "MATCH_LEVEL": 0
            }]
        },
        "RELATED_ENTITY": []
    }