SzGrpcEngine Access the Senzing Engine module via gRPC

Hierarchy

  • SzGrpcBase
    • SzGrpcEngine

Implements

  • SzEngine

Properties

grpcConnectionReadyTimeOut: number = DEFAULT_CONNECTION_READY_TIMEOUT
productId: string = "5053"

Methods

  • The addRecord method adds a record into the Senzing repository. Can be called as many times as desired and from multiple threads at the same time.

    Parameters

    • dataSourceCode: string

      Identifies the provenance of the data.

    • recordId: string | number

      The unique identifier within the records of the same data source.

    • recordDefinition: any

      A JSON document containing the record to be added to the Senzing repository.

    • engineFlags: number | BigInt = 0

      Flags used to control information returned. Defaults to 0.

    Returns Promise<string | SzError>

  • The closeExport method closes the exported document created by exportJsonEntityReport. It is part of the export_json_entity_report, fetch_next, close_export lifecycle of a list of sized

    Parameters

    • exportHandle: number

      A handle created by exportJsonEntityReport or exportCsvEntityReport.

    Returns Promise<unknown>

    for better support of async waiting

  • The countRedoRecords method returns the number of records in need of redo-ing.

    Returns Promise<number>

    The number of redo records in Senzing’s redo queue.

  • The deleteRecord method deletes a record from the Senzing repository.

    Parameters

    • dataSourceCode: string

      Identifies the provenance of the data

    • recordId: string

      The unique identifier within the records of the same data source.

    • flags: number | BigInt = 0

      Flags used to control information returned. Defaults to 0.

    Returns Promise<string | SzError>

  • The exportCsvEntityReport method initializes a cursor over a document of exported entities. It is part of the exportCsvEntityReport, fetchNext, closeExport lifecycle of a list of entities to export.

    Returns Promise<unknown>

    still need to work out how to sequentially call the fetchNext after this call. recursive function maybe? promises are async so there's no guarantee that one will finish before the next.

    not yet implemented

  • NOT YET IMPLEMENTED

    Returns Promise<unknown>

  • The exportJsonEntityReport method initializes a cursor over a document of exported entities. It is part of the exportJsonEntityReport, fetchNext, closeExport lifecycle of a list of entities to export.

    Parameters

    • flags: number | BigInt = SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS

    Returns void

    still need to work out how to sequentially call the fetchNext after this call. recursive function maybe? promises are async so there's no guarantee that one will finish before the next.

  • NOT YET IMPLEMENTED

    Parameters

    • flags: number | BigInt = SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS

    Returns Promise<unknown>

    still need to figure out why the stream reader is immediately completing and returning no data. o_O

    tried 3 different ways, none of them are behaving like I would expect.

  • NOT YET IMPLEMENTED

    Parameters

    • exportHandle: number

    Returns Promise<string | SzError>

    still need to work out how to sequentially call this after the exportJsonEntityReport call. recursive function maybe? promises are async so there's no guarantee that one will finish before the next.

  • Parameters

    • entityId: number
    • flags: number | BigInt = SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS

    Returns Promise<string | SzError>

    document method

  • Parameters

    • dataSourceCode: string
    • recordId: string
    • flags: number | BigInt = 0

    Returns Promise<string | SzError>

    document method

  • Finds all entities surrounding a requested set of entities. This includes the requested entities, paths between them, and relations to other nearby entities. Returns a JSON document that identifies the path between the each set of search entities (if the path exists), and the information for the entities in the path.

    Parameters

    • entityIds: string | (string | number)[]

      The entity IDs to find the network between.

    • OptionalmaxDegrees: number

      The maximum number of degrees in paths between search entities.

    • OptionalbuildOutDegrees: number

      The number of degrees of relationships to show around each search entity.

    • OptionalbuildOutMaxEntities: number

      The maximum number of entities to return in the discovered network.

    • flags: number | BigInt = SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS

    Returns Promise<unknown>

    A JSON document.

  • Finds all entities surrounding a requested set of entities by their RECORD_ID values. This includes the requested entities, paths between them, and relations to other nearby entities. Returns a JSON document that identifies the path between the each set of search entities (if the path exists), and the information for the entities in the path.

    Parameters

    • recordKeys: [string, string | number][]

      The data source codes and record IDs to find the network between.

    • OptionalmaxDegrees: number

      The maximum number of degrees in paths between search entities.

    • OptionalbuildOutDegrees: number

      The number of degrees of relationships to show around each search entity.

    • OptionalbuildOutMaxEntities: number

      The maximum number of entities to return in the discovered network.

    • flags: number | BigInt = SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS

      Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.

    Returns Promise<unknown>

    A JSON document.

  • Finds the most efficient relationship between two entities path based on the parameters and returns a JSON document with an ENTITY_PATHS section that details the path between the entities. The ENTITIES sections details information on the entities. Paths are found using known relationships with other entities. Paths are found using known relationships with other entities.

    Parameters

    • startEntityId: number

      The entity ID for the starting entity of the search path.

    • endEntityId: number

      The entity ID for the ending entity of the search path.

    • maxDegrees: number

      The maximum number of degrees in paths between search entities.

    • OptionalavoidEntityIds: number[]

      The entity IDs to avoid when finding a path.

    • OptionalrequiredDataSources: string[]

      The data source code(s) that must be in a path.

    • flags: number | BigInt = SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS

      Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.

    Returns Promise<unknown>

    A JSON document with an ENTITY_PATHS section that details the path between the entities.

    Should accept both entity and record IDs in V4, test

  • Finds the most efficient relationship between two entities path based on the parameters by RECORD_ID values and returns a JSON document with an ENTITY_PATHS section that details the path between the entities. The ENTITIES sections details information on the entities. Paths are found using known relationships with other entities. The entities are identified by starting and ending records.

    Parameters

    • startDataSourceCode: string

      Identifies the provenance of the record for the starting entity of the search path.

    • startRecordId: string

      The unique identifier within the records of the same data source for the starting entity of the search path.

    • endDataSourceCode: string

      Identifies the provenance of the record for the ending entity of the search path.

    • endRecordId: string

      The unique identifier within the records of the same data source for the ending entity of the search path.

    • maxDegrees: number

      The maximum number of degrees in paths between search entities.

    • OptionalavoidRecordKeys: [string, number][]

      The data source codes and record IDs to avoid when finding a path.

    • OptionalrequiredDataSources: string[]

      The data source code(s) that must be in a path.

    • flags: number | BigInt = SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS

      Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.

    Returns Promise<unknown>

    A JSON document.

  • Returns the identifier of the currently active Senzing engine configuration.

    Returns Promise<number | SzError>

    The identifier of the active Senzing Engine configuration.

  • Parameters

    • OptionalsecondsFromNow: number

    Returns Date

  • Returns entity data based on the ID of a resolved identity.

    Parameters

    • entityId: number

      The unique identifier of an entity.

    • flags: number | BigInt = SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS

      Flags used to control information returned. Defaults to SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS.

    Returns Promise<string | SzError>

    A JSON document.

  • Returns entity data based on the ID of a record which is a member of the entity.

    Parameters

    • dataSourceCode: string

      Identifies the provenance of the data.

    • recordId: string

      The unique identifier within the records of the same data source.

    • flags: number | BigInt = SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS

      Flags used to control information returned. Defaults to SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS.

    Returns Promise<string | SzError>

    A JSON document.

  • returns a JSON document of a single record from the Senzing repository. Can be called as many times as desired and from multiple threads at the same time.

    Parameters

    • dataSourceCode: string

      Identifies the provenance of the data.

    • recordId: string

      The unique identifier within the records of the same data source.

    • flags: number | BigInt = SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS

      Flags used to control information returned. Defaults to SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS.

    Returns Promise<string | SzError>

    A JSON document of a single record.

  • The preprocess_record method tests adding a record into the Senzing datastore.

    Parameters

    • recordDefinition: string

      A JSON document containing the record to be tested.

    • flags: number | BigInt = SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS

      Flags used to control information returned. Defaults to 0.

    Returns Promise<string | SzError>

    A JSON document containing metadata as specified by the flags.

  • returns the next internally queued redo record from the Senzing repository. The processRedoRecord method is called to process the redo record retrieved by getRedoRecord.

    Returns Promise<string | SzError>

    A JSON document.

  • The get_stats method retrieves workload statistics for the current process. These statistics will automatically reset after retrieval.

    Returns Promise<string | SzError>

    A JSON document.

  • creates a view of a virtual entity using a list of existing loaded records. The virtual entity is composed of only those records and their features. Entity resolution is not performed.

    Parameters

    • recordKeys: [string, string | number][]

      The data source codes and record IDs identifying records to create the virtual entity from.

    • flags: number | BigInt = SzEngineFlags.SZ_VIRTUAL_ENTITY_DEFAULT_FLAGS

      Flags used to control information returned. Defaults to SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS.

    Returns Promise<string | SzError>

    A JSON document.

  • Determines and details steps-by-step how records resolved to a single entity.

    In most cases, how provides more detailed information than why as the resolution is detailed step-by-step.

    Parameters

    • entityId: number

      The unique identifier of an entity.

    • flags: number | BigInt = SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS

      Flags used to control information returned. Defaults to SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS.

    Returns Promise<string | SzError>

    A JSON document.

  • Initializes high resource consumption components of Senzing used in some functions. If this call is not made, these resources are initialized the first time they are needed and can cause unusually long processing times the first time a function is called that requires these resources. @returns{Promise} for async/sync flow support

    Returns Promise<unknown>

  • Called to process the redo record retrieved by getRedoRecord.

    Parameters

    • redoRecord: string
    • flags: number | BigInt = 0

    Returns Promise<string | SzError>

    A JSON document.

  • The reevaluate_entity method reevaluates the specified entity.

    Parameters

    • entityId: number

      The unique identifier of an entity.

    • flags: number | BigInt = 0

      Flags used to control information returned. Defaults to 0.

    Returns Promise<string | SzError>

  • The reevaluate_record method reevaluates a specific record.

    Parameters

    • dataSourceCode: string

      Identifies the provenance of the data.

    • recordId: string

      The unique identifier within the records of the same data source.

    • flags: number | BigInt = 0

      Flags used to control information returned. Defaults to 0.

    Returns Promise<string | SzError>

    A JSON document. If flags are set to return the WITH_INFO response a JSON document containing the details, otherwise an empty JSON document.

  • Parameters

    • configId: number

    Returns Promise<unknown>

  • The searchByAttributes method retrieves entity data based on a user-specified set of entity attributes.

    Parameters

    • attributes: string | Map<any, any> | { [key: string]: any }

      A JSON document with the attribute data to search for.

    • flags: number | BigInt = SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS

      Defaults to SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS.

    • searchProfile: string = ""

      The name of a configured search profile. Defaults to "SEARCH".

    Returns Promise<string | SzError>

    A JSON document as Promise.

  • Wait for the client to be ready. The callback will be called when the client has successfully connected to the server, and it will be called with an error if the attempt to connect to the server has unrecoverablly failed or if the deadline expires. This function will make the channel start connecting if it has not already done so.

    Parameters

    • deadline: Date
    • cb: (error: null | Error) => void

    Returns any

  • The why_entities method determines why entities did not resolve or why they do relate.

    Parameters

    • entityId1: number

      The entity ID for the starting entity of the search path.

    • entityId2: number

      The entity ID for the ending entity of the search path.

    • flags: number | BigInt = SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS

      Flags used to control information returned. Defaults to SzEngineFlags.SZ_WHY_ENTITY_DEFAULT_FLAGS.

    Returns Promise<unknown>

    A JSON document as Promise.

  • Determines why a record is included in an entity.

    Parameters

    • dataSourceCode: string

      Identifies the provenance of the data.

    • recordId: string

      The unique identifier within the records of the same data source.

    • flags: number | BigInt = SzEngineFlags.SZ_WHY_RECORDS_DEFAULT_FLAGS

      Flags used to control information returned. Defaults to SzEngineFlags.SZ_WHY_ENTITY_DEFAULT_FLAGS.

    Returns Promise<unknown>

    A JSON document as Promise.

  • The why_records determines if any two records can or cannot resolve together, or if they relate.

    Parameters

    • dataSourceCode1: string

      Identifies the provenance of the data.

    • recordId1: string

      The unique identifier within the records of the same data source.

    • dataSourceCode2: string

      Identifies the provenance of the data.

    • recordId2: string

      The unique identifier within the records of the same data source.

    • flags: number | BigInt = SzEngineFlags.SZ_WHY_RECORDS_DEFAULT_FLAGS

      Flags used to control information returned. Defaults to SzEngineFlags.SZ_WHY_ENTITY_DEFAULT_FLAGS

    Returns Promise<unknown>

    A JSON document as Promise.

  • Compares the specified search attribute criteria against the entity identified by the specified entity ID to determine why that entity was or was not included in the results of a #searchByAttributes(String, String, Set) "search by attributes" operation.

    The specified search attributes are treated as a hypothetical single-record entity and the result of this operation is the #whyEntities(long, long, Set) "why analysis" of the entity identified by the specified entity ID against that hypothetical entity. The details included in the response are determined by the specified flags.

    If the specified search profile is null then the default generic thresholds from the default search profile will be used for the search candidate determination. If your search requires different behavior using alternate generic thresholds, please contact support@senzing.com for details on configuring a custom search profile.

    Parameters

    • attributes: string

      The search attributes defining the hypothetical record to match and/or relate to in order to obtain the search results.

    • entityId: number

      The entity ID identifying the entity to analyze against the search attribute criteria.

    • searchProfile: string = ""

      The optional search profile identifier, or null if the default search profile should be used for the search.

    • flags: number | BigInt = SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS

      The optional Set of SzFlag instances belonging to the SzFlagUsageGroup#SZ_WHY_SEARCH_FLAGS group t control how the operation is performed and the content of the response, or null to default to SzFlag#SZ_NO_FLAGS or SzFlag#SZ_WHY_SEARCH_DEFAULT_FLAGS for the default recommended flags.

    Returns Promise<unknown>

    The resulting JSON String describing the result of the why analysis against the search criteria.