senzing package

Submodules

senzing.szabstractfactory module

szabstractfactory_abstract.py is the abstract class for all implementations of szabstractfactory.

class senzing.szabstractfactory.SzAbstractFactory[source]

Bases: ABC

SzAbstractFactory is the definition of the Senzing Python SDK SzAbstractFactory implementations.

abstract create_config() SzConfig[source]

The create_config method creates a new implementation of an SzConfigAbstract object.

Args:

Returns:

A new implementation.

Return type:

SzConfigAbstract

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12except SzError as err:
13    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{}
abstract create_configmanager() SzConfigManager[source]

The create_configmanager method creates a new implementation of an SzConfigManagerAbstract object.

Args:

Returns:

A new implementation.

Return type:

SzConfigManagerAbstract

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_configmanager = sz_abstract_factory.create_configmanager()
12except SzError as err:
13    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{}
abstract create_diagnostic() SzDiagnostic[source]

The create_diagnostic method creates a new implementation of an SzDiagnosticAbstract object.

Args:

Returns:

A new implementation.

Return type:

SzDiagnosticAbstract

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_diagnostic = sz_abstract_factory.create_diagnostic()
12except SzError as err:
13    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{}
abstract create_engine() SzEngine[source]

The create_engine method creates a new implementation of an SzEngineAbstract object.

Args:

Returns:

A new implementation.

Return type:

SzEngineAbstract

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_engine = sz_abstract_factory.create_engine()
12except SzError as err:
13    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{}
abstract create_product() SzProduct[source]

The create_product method creates a new implementation of an SzProductAbstract object.

Args:

Returns:

A new implementation.

Return type:

SzProductAbstract

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_product = sz_abstract_factory.create_product()
12except SzError as err:
13    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{}
help(method_name: str = '') str[source]

Return the help for a particular message.

Parameters:

method_name (str) – The name of the method. (e.g. “init”). If empty, a list of methods and descriptions is returned.

Returns:

The Help information about the requested method

Return type:

str

abstract reinitialize(config_id: int) None[source]

The reinitialize method reinitializes the Senzing objects using a specific configuration identifier. A list of available configuration identifiers can be retrieved using szconfigmanager.get_configs.

Parameters:

config_id (int) – The configuration ID used for the initialization

Raises:
  • TypeError – Incorrect datatype of input parameter.

  • szexception.SzError – config_id does not exist.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    # Using get_active_config_id for demonstrations purposes.
11    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
12    sz_engine = sz_abstract_factory.create_engine()
13    config_id = sz_engine.get_active_config_id()
14    sz_abstract_factory.reinitialize(config_id)
15except SzError as err:
16    print(f"\nFile {__file__}:\nError:\n{err}\n")

senzing.szconfig module

szconfig.py is the abstract class for all implementations of szconfig.

class senzing.szconfig.SzConfig[source]

Bases: ABC

SzConfig is the definition of the Senzing Python SDK that is implemented by packages such as szconfig.py.

abstract add_data_source(config_handle: int, data_source_code: str) str[source]

The add_data_source method adds a data source to an existing in-memory configuration.

Parameters:
  • config_handle (int) – An identifier of an in-memory configuration. Usually created by the create or load methods.

  • data_source_code (str) – Name of data source code to add.

Returns:

A string containing a JSON document listing the newly created data source.

Return type:

str

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5DATA_SOURCE_CODE = "NAME_OF_DATASOURCE"
 6FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 7    # Differs based on which senzing_xxxx package is used.
 8}
 9
10try:
11    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
12    sz_config = sz_abstract_factory.create_config()
13    config_handle = sz_config.create_config()
14    RESULT = sz_config.add_data_source(config_handle, DATA_SOURCE_CODE)
15    sz_config.close_config(config_handle)
16    print(f"\nFile {__file__}:\n{RESULT}\n")
17except SzError as err:
18    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{
4    "DSRC_ID": 1001
5}
abstract close_config(config_handle: int) None[source]

The close_config method cleans up the Senzing SzConfig object pointed to by the config_handle.

Parameters:

config_handle (int) – An identifier of an in-memory configuration. Usually created by the create_config or import_config methods.

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12    config_handle = sz_config.create_config()
13
14    # Do work.
15
16    sz_config.close_config(config_handle)
17except SzError as err:
18    print(f"\nFile {__file__}:\nError:\n{err}\n")
abstract create_config() int[source]

The create_config method creates an in-memory Senzing configuration from the g2config.json template configuration file located in the PIPELINE.RESOURCEPATH path. A handle is returned to identify the in-memory configuration. The handle is used by the add_data_source, list_data_sources, delete_data_source, and export_config methods. The handle is terminated by the close_config method.

Returns:

A pointer to an in-memory Senzing configuration.

Return type:

int

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12    config_handle = sz_config.create_config()
13
14    # Do work.
15
16    sz_config.close_config(config_handle)
17except SzError as err:
18    print(f"\nFile {__file__}:\nError:\n{err}\n")
abstract delete_data_source(config_handle: int, data_source_code: str) None[source]

The delete_data_source method removes a data source from an existing in-memory configuration.

Parameters:
  • config_handle (int) – An identifier of an in-memory configuration. Usually created by the create or load methods.

  • data_source_code (str) – Name of data source code to delete.

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5DATA_SOURCE_CODE = "TEST"
 6FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 7    # Differs based on which senzing_xxxx package is used.
 8}
 9
10try:
11    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
12    sz_config = sz_abstract_factory.create_config()
13    config_handle = sz_config.create_config()
14    sz_config.delete_data_source(config_handle, DATA_SOURCE_CODE)
15    sz_config.close_config(config_handle)
16except SzError as err:
17    print(f"\nFile {__file__}:\nError:\n{err}\n")
abstract export_config(config_handle: int) str[source]

The export_config method creates a JSON string representation of the Senzing SzConfig object.

Parameters:

config_handle (int) – An identifier of an in-memory configuration. Usually created by the create or load methods.

Returns:

A string containing a JSON Document representation of the Senzing SzConfig object.

Return type:

str

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12    config_handle = sz_config.create_config()  # Create first in-memory.
13    CONFIG_DEFINITION = sz_config.export_config(config_handle)  # Save in-memory to string.
14    sz_config.close_config(config_handle)
15    print(f"\nFile {__file__}:\n{CONFIG_DEFINITION}\n")
16except SzError as err:
17    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted and pruned for easier reading.
 2
 3{
 4    "G2_CONFIG": {
 5        "CFG_ATTR": [],
 6        "CFG_CFBOM": [],
 7        "CFG_CFCALL": [],
 8        "CFG_CFRTN": [],
 9        "CFG_CFUNC": [],
10        "CFG_DFBOM": [],
11        "CFG_DFCALL": [],
12        "CFG_DFUNC": [],
13        "CFG_DSRC": [],
14        "CFG_DSRC_INTEREST": [],
15        "CFG_ECLASS": [],
16        "CFG_EFBOM": [],
17        "CFG_EFCALL": [],
18        "CFG_EFUNC": [],
19        "CFG_ERFRAG": [],
20        "CFG_ERRULE": [],
21        "CFG_ETYPE": [],
22        "CFG_FBOM": [],
23        "CFG_FBOVR": []
24        "CFG_FCLASS": [],
25        "CFG_FELEM": [],
26        "CFG_FTYPE": [],
27        "CFG_GENERIC_THRESHOLD": [],
28        "CFG_GPLAN": [],
29        "CFG_LENS": [],
30        "CFG_LENSRL": [],
31        "CFG_RCLASS": [],
32        "CFG_RTYPE": [],
33        "CFG_SFCALL": [],
34        "CFG_SFUNC": [],
35        "SYS_OOM": [],
36        "CONFIG_BASE_VERSION": {
37            "VERSION": "4.0.0",
38            "BUILD_VERSION": "4.0.0.00000",
39            "BUILD_DATE": "2024-01-01",
40            "BUILD_NUMBER": "00000",
41            "COMPATIBILITY_VERSION": {
42                "CONFIG_VERSION": "10"
43            }
44        }
45    }
46}

Create, export, import, and close example

 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12    config_handle_1 = sz_config.create_config()  # Create first in-memory.
13    CONFIG_DEFINITION = sz_config.export_config(config_handle_1)  # Save in-memory to string.
14    config_handle_2 = sz_config.import_config(CONFIG_DEFINITION)  # Create second in-memory.
15    sz_config.close_config(config_handle_1)
16    sz_config.close_config(config_handle_2)
17except SzError as err:
18    print(f"\nFile {__file__}:\nError:\n{err}\n")
abstract get_data_sources(config_handle: int) str[source]

The get_data_sources method returns a JSON document of data sources contained in an in-memory configuration.

Parameters:

config_handle (int) – An identifier of an in-memory configuration. Usually created by the create or load methods.

Returns:

A string containing a JSON document listing all of the data sources.

Return type:

str

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12    config_handle = sz_config.create_config()
13    RESULT = sz_config.get_data_sources(config_handle)
14    sz_config.close_config(config_handle)
15    print(f"\nFile {__file__}:\n{RESULT}\n")
16except SzError as err:
17    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "DATA_SOURCES": [
 5        {
 6            "DSRC_ID": 1,
 7            "DSRC_CODE": "TEST"
 8        },
 9        {
10            "DSRC_ID": 2,
11            "DSRC_CODE": "SEARCH"
12        }
13    ]
14}
help(method_name: str = '') str[source]

Return the help for a particular message.

Parameters:

method_name (str) – The name of the method. (e.g. “init”). If empty, a list of methods and descriptions is returned.

Returns:

The Help information about the requested method

Return type:

str

abstract import_config(config_definition: str) int[source]

The import_config method initializes an in-memory Senzing SzConfig object from a JSON string. A handle is returned to identify the in-memory configuration. The handle is used by the add_data_source, get_data_sources, delete_data_source, and save methods. The handle is terminated by the close method.

Parameters:

config_definition (str) – A JSON document containing the Senzing configuration.

Returns:

An identifier (config_handle) of an in-memory configuration.

Return type:

int

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12    sz_configmanager = sz_abstract_factory.create_configmanager()
13    config_id = sz_configmanager.get_default_config_id()
14    CONFIG_DEFINITION = sz_configmanager.get_config(config_id)
15    config_handle = sz_config.import_config(CONFIG_DEFINITION)
16except SzError as err:
17    print(f"\nFile {__file__}:\nError:\n{err}\n")

Create, save, load, and close

 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12    config_handle_1 = sz_config.create_config()  # Create first in-memory.
13    CONFIG_DEFINITION = sz_config.export_config(config_handle_1)  # Save in-memory to string.
14    config_handle_2 = sz_config.import_config(CONFIG_DEFINITION)  # Create second in-memory.
15    sz_config.close_config(config_handle_1)
16    sz_config.close_config(config_handle_2)
17except SzError as err:
18    print(f"\nFile {__file__}:\nError:\n{err}\n")

senzing.szconfigmanager module

szconfigmanager.py is the abstract class for all implementations of szconfigmanager.

class senzing.szconfigmanager.SzConfigManager[source]

Bases: ABC

SzConfigManager is the definition of the Senzing Python SDK that is implemented by packages such as szconfigmanager.py.

abstract add_config(config_definition: str, config_comment: str) int[source]

The add_config method adds a Senzing configuration JSON document to the Senzing database.

Parameters:
  • config_definition (str) – The Senzing configuration JSON document.

  • config_comment (str) – free-form string of comments describing the configuration document.

Returns:

A configuration identifier.

Return type:

int

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5CONFIG_COMMENT = "Just an empty example"
 6FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 7    # Differs based on which senzing_xxxx package is used.
 8}
 9
10try:
11    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
12    sz_config = sz_abstract_factory.create_config()
13    sz_configmanager = sz_abstract_factory.create_configmanager()
14    config_handle = sz_config.create_config()
15    CONFIG_DEFINITION = sz_config.export_config(config_handle)
16    config_id = sz_configmanager.add_config(CONFIG_DEFINITION, CONFIG_COMMENT)
17except SzError as err:
18    print(f"\nFile {__file__}:\nError:\n{err}\n")
abstract get_config(config_id: int) str[source]

The get_config method retrieves a specific Senzing configuration JSON document from the Senzing database.

Parameters:

config_id (int) – The configuration identifier of the desired Senzing Engine configuration JSON document to retrieve.

Returns:

A JSON document containing the Senzing configuration.

Return type:

str

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_configmanager = sz_abstract_factory.create_configmanager()
12    config_id = sz_configmanager.get_default_config_id()
13    CONFIG_DEFINITION = sz_configmanager.get_config(config_id)
14    print(f"\nFile {__file__}:\n{CONFIG_DEFINITION}\n")
15except SzError as err:
16    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted and pruned for easier reading.
  2
  3{
  4    "G2_CONFIG": {
  5        "CFG_ATTR": [
  6            {
  7                "ATTR_ID": 1001,
  8                "ATTR_CODE": "DATA_SOURCE",
  9                "ATTR_CLASS": "OBSERVATION",
 10                "FTYPE_CODE": null,
 11                "FELEM_CODE": null,
 12                "FELEM_REQ": "Yes",
 13                "DEFAULT_VALUE": null,
 14                "INTERNAL": "No"
 15            }
 16        ],
 17        "CFG_CFBOM": [
 18            {
 19                "CFCALL_ID": 1,
 20                "FTYPE_ID": 1,
 21                "FELEM_ID": 2,
 22                "EXEC_ORDER": 1
 23            }
 24        ],
 25        "CFG_CFCALL": [
 26            {
 27                "CFCALL_ID": 1,
 28                "FTYPE_ID": 1,
 29                "CFUNC_ID": 2
 30            }
 31        ],
 32        "CFG_CFRTN": [
 33            {
 34                "CFRTN_ID": 1,
 35                "CFUNC_ID": 1,
 36                "FTYPE_ID": 0,
 37                "CFUNC_RTNVAL": "FULL_SCORE",
 38                "EXEC_ORDER": 1,
 39                "SAME_SCORE": 100,
 40                "CLOSE_SCORE": 90,
 41                "LIKELY_SCORE": 80,
 42                "PLAUSIBLE_SCORE": 70,
 43                "UN_LIKELY_SCORE": 60
 44            }
 45        ],
 46        "CFG_CFUNC": [
 47            {
 48                "CFUNC_ID": 1,
 49                "CFUNC_CODE": "STR_COMP",
 50                "CFUNC_DESC": "String comparison",
 51                "CONNECT_STR": "g2StringComp",
 52                "ANON_SUPPORT": "Yes",
 53                "LANGUAGE": null
 54            }
 55        ],
 56        "CFG_DFBOM": [
 57            {
 58                "DFCALL_ID": 1,
 59                "FTYPE_ID": 1,
 60                "FELEM_ID": 2,
 61                "EXEC_ORDER": 1
 62            }
 63        ],
 64        "CFG_DFCALL": [
 65            {
 66                "DFCALL_ID": 1,
 67                "FTYPE_ID": 1,
 68                "DFUNC_ID": 5
 69            }
 70        ],
 71        "CFG_DFUNC": [
 72            {
 73                "DFUNC_ID": 1,
 74                "DFUNC_CODE": "FELEM_STRICT_SUBSET",
 75                "DFUNC_DESC": "Strict subset of felems",
 76                "CONNECT_STR": "g2StrictSubsetFelems",
 77                "ANON_SUPPORT": "Yes",
 78                "LANGUAGE": null
 79            }
 80        ],
 81        "CFG_DSRC": [
 82            {
 83                "DSRC_ID": 1,
 84                "DSRC_CODE": "TEST",
 85                "DSRC_DESC": "Test",
 86                "RETENTION_LEVEL": "Remember"
 87            }
 88        ],
 89        "CFG_DSRC_INTEREST": [],
 90        "CFG_EFBOM": [
 91            {
 92                "EFCALL_ID": 1,
 93                "FTYPE_ID": 6,
 94                "FELEM_ID": 60,
 95                "EXEC_ORDER": 1,
 96                "FELEM_REQ": "Yes"
 97            }
 98        ],
 99        "CFG_EFCALL": [
100            {
101                "EFCALL_ID": 1,
102                "FTYPE_ID": 6,
103                "FELEM_ID": -1,
104                "EFUNC_ID": 4,
105                "EXEC_ORDER": 1,
106                "EFEAT_FTYPE_ID": -1,
107                "IS_VIRTUAL": "No"
108            }
109        ],
110        "CFG_EFUNC": [
111            {
112                "EFUNC_ID": 1,
113                "EFUNC_CODE": "EXPRESS_BOM",
114                "EFUNC_DESC": "General BOM Hasher",
115                "CONNECT_STR": "g2GenericHasher",
116                "LANGUAGE": null
117            }
118        ],
119        "CFG_ERFRAG": [
120            {
121                "ERFRAG_ID": 10,
122                "ERFRAG_CODE": "TRUSTED_ID",
123                "ERFRAG_DESC": "TRUSTED_ID",
124                "ERFRAG_SOURCE": "./SCORES/TRUSTED_ID[./FULL_SCORE=100]",
125                "ERFRAG_DEPENDS": null
126            }
127        ],
128        "CFG_ERRULE": [
129            {
130                "ERRULE_ID": 100,
131                "ERRULE_CODE": "SAME_A1",
132                "RESOLVE": "Yes",
133                "RELATE": "No",
134                "RTYPE_ID": 1,
135                "QUAL_ERFRAG_CODE": "SAME_A1",
136                "DISQ_ERFRAG_CODE": null,
137                "ERRULE_TIER": 10
138            }
139        ],
140        "CFG_FBOM": [
141            {
142                "FTYPE_ID": 1,
143                "FELEM_ID": 2,
144                "EXEC_ORDER": 1,
145                "DISPLAY_LEVEL": 1,
146                "DISPLAY_DELIM": null,
147                "DERIVED": "No"
148            }
149        ],
150        "CFG_FBOVR": [
151            {
152                "FTYPE_ID": 5,
153                "UTYPE_CODE": "BUSINESS",
154                "FTYPE_FREQ": "FF",
155                "FTYPE_EXCL": "Yes",
156                "FTYPE_STAB": "No"
157            }
158        ],
159        "CFG_FCLASS": [
160            {
161                "FCLASS_ID": 1,
162                "FCLASS_CODE": "NAME",
163                "FCLASS_DESC": "Name"
164            }
165        ],
166        "CFG_FELEM": [
167            {
168                "FELEM_ID": 2,
169                "FELEM_CODE": "FULL_NAME",
170                "FELEM_DESC": "Full name",
171                "DATA_TYPE": "string"
172            }
173        ],
174        "CFG_FTYPE": [
175            {
176                "FTYPE_ID": 1,
177                "FTYPE_CODE": "NAME",
178                "FTYPE_DESC": "Name",
179                "FCLASS_ID": 1,
180                "FTYPE_FREQ": "NAME",
181                "FTYPE_EXCL": "No",
182                "FTYPE_STAB": "No",
183                "PERSIST_HISTORY": "Yes",
184                "USED_FOR_CAND": "No",
185                "DERIVED": "No",
186                "RTYPE_ID": 0,
187                "ANONYMIZE": "No",
188                "VERSION": 2,
189                "SHOW_IN_MATCH_KEY": "Yes"
190            }
191        ],
192        "CFG_GENERIC_THRESHOLD": [
193            {
194                "GPLAN_ID": 1,
195                "BEHAVIOR": "NAME",
196                "FTYPE_ID": 0,
197                "CANDIDATE_CAP": 10,
198                "SCORING_CAP": -1,
199                "SEND_TO_REDO": "Yes"
200            }
201        ],
202        "CFG_GPLAN": [
203            {
204                "GPLAN_ID": 1,
205                "GPLAN_CODE": "INGEST",
206                "GPLAN_DESC": "Standard Ingestion"
207            }
208        ],
209        "CFG_RCLASS": [
210            {
211                "RCLASS_ID": 1,
212                "RCLASS_CODE": "DERIVED",
213                "RCLASS_DESC": "Derived",
214                "IS_DISCLOSED": "No"
215            }
216        ],
217        "CFG_RTYPE": [
218            {
219                "RTYPE_ID": 1,
220                "RTYPE_CODE": "RESOLVED",
221                "RTYPE_DESC": "Resolved",
222                "RCLASS_ID": 1,
223                "BREAK_RES": "No"
224            }
225        ],
226        "CFG_SFCALL": [
227            {
228                "SFCALL_ID": 1,
229                "FTYPE_ID": 1,
230                "FELEM_ID": -1,
231                "SFUNC_ID": 1,
232                "EXEC_ORDER": 1
233            }
234        ],
235        "CFG_SFUNC": [
236            {
237                "SFUNC_ID": 1,
238                "SFUNC_CODE": "PARSE_NAME",
239                "SFUNC_DESC": "Parse name",
240                "CONNECT_STR": "g2ParseName",
241                "LANGUAGE": null
242            }
243        ],
244        "SYS_OOM": [
245            {
246                "OOM_TYPE": "RF",
247                "OOM_LEVEL": "SYSDEFAULT",
248                "FTYPE_ID": 0,
249                "THRESH1_CNT": 100,
250                "THRESH1_OOM": 10,
251                "NEXT_THRESH": 1000
252            }
253        ],
254        "CONFIG_BASE_VERSION": {
255            "VERSION": "4.0.0",
256            "BUILD_VERSION": "4.0.0.24103",
257            "BUILD_DATE": "2024-04-12",
258            "BUILD_NUMBER": "24103",
259            "COMPATIBILITY_VERSION": {
260                "CONFIG_VERSION": "11"
261            }
262        }
263    }
264}
abstract get_configs() str[source]

The get_configs method retrieves a list of Senzing configurations from the Senzing database.

Returns:

A JSON document containing Senzing configurations.

Return type:

str

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_configmanager = sz_abstract_factory.create_configmanager()
12    CONFIG_LIST = sz_configmanager.get_configs()
13    print(f"\nFile {__file__}:\n{CONFIG_LIST}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "CONFIGS": [
 5        {
 6            "CONFIG_ID": 41320074,
 7            "CONFIG_COMMENTS": "Default Senzing configuration",
 8            "SYS_CREATE_DT": "YYYY-MM-DD HH:MM:SS.mmm"
 9        },
10        {
11            "CONFIG_ID": 490826130,
12            "CONFIG_COMMENTS": "Test",
13            "SYS_CREATE_DT": "YYYY-MM-DD HH:MM:SS.mmm"
14        }
15    ]
16}
abstract get_default_config_id() int[source]

The get_default_config_id method retrieves from the Senzing database the configuration identifier of the default Senzing configuration.

Returns:

A configuration identifier which identifies the current configuration in use.

Return type:

int

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_configmanager = sz_abstract_factory.create_configmanager()
12    CONFIG_ID = sz_configmanager.get_default_config_id()
13    print(f"\nFile {__file__}:\n{CONFIG_ID}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")
help(method_name: str = '') str[source]

Return the help for a particular message.

Parameters:

method_name (str) – The name of the method. (e.g. “init”). If empty, a list of methods and descriptions is returned.

Returns:

The Help information about the requested method

Return type:

str

abstract replace_default_config_id(current_default_config_id: int, new_default_config_id: int) None[source]

The replace_default_config_id method replaces the old configuration identifier with a new configuration identifier in the Senzing database. It is like a “compare-and-swap” instruction to serialize concurrent editing of configuration. If current_default_config_id is no longer the “current configuration identifier”, the operation will fail. To simply set the default configuration ID, use set_default_config_id.

Parameters:
  • current_default_config_id (int) – The configuration identifier to replace.

  • new_default_config_id (int) – The configuration identifier to use as the default.

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3import time
 4
 5from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 6
 7CONFIG_COMMENT = "Just an example"
 8DATA_SOURCE_CODE = f"REPLACE_DEFAULT_CONFIG_ID_{time.time()}"
 9FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
10    # Differs based on which senzing_xxxx package is used.
11}
12
13try:
14    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
15    sz_config = sz_abstract_factory.create_config()
16    sz_configmanager = sz_abstract_factory.create_configmanager()
17    current_default_config_id = sz_configmanager.get_default_config_id()
18
19    # Create a new config.
20
21    CURRENT_CONFIG_DEFINITION = sz_configmanager.get_config(current_default_config_id)
22    current_config_handle = sz_config.import_config(CURRENT_CONFIG_DEFINITION)
23    sz_config.add_data_source(current_config_handle, DATA_SOURCE_CODE)
24    NEW_CONFIG_DEFINITION = sz_config.export_config(current_config_handle)
25    new_default_config_id = sz_configmanager.add_config(NEW_CONFIG_DEFINITION, CONFIG_COMMENT)
26
27    # Replace default config id.
28
29    sz_configmanager.replace_default_config_id(current_default_config_id, new_default_config_id)
30except SzError as err:
31    print(f"\nFile {__file__}:\nError:\n{err}\n")
abstract set_default_config_id(config_id: int) None[source]

The set_default_config_id method replaces and sets a new configuration identifier in the Senzing database. To serialize modifying of the configuration identifier, see replace_default_config_id.

Parameters:

config_id (int) – The configuration identifier of the Senzing Engine configuration to use as the default.

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3import time
 4
 5from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 6
 7CONFIG_COMMENT = "Just an example"
 8DATA_SOURCE_CODE = f"REPLACE_DEFAULT_CONFIG_ID_{time.time()}"
 9FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
10    # Differs based on which senzing_xxxx package is used.
11}
12
13try:
14    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
15    sz_config = sz_abstract_factory.create_config()
16    sz_configmanager = sz_abstract_factory.create_configmanager()
17    old_config_id = sz_configmanager.get_default_config_id()
18
19    # Create a new config.
20
21    OLD_CONFIG_DEFINITION = sz_configmanager.get_config(old_config_id)
22    old_config_handle = sz_config.import_config(OLD_CONFIG_DEFINITION)
23    sz_config.add_data_source(old_config_handle, DATA_SOURCE_CODE)
24    NEW_CONFIG_DEFINITION = sz_config.export_config(old_config_handle)
25    config_id = sz_configmanager.add_config(NEW_CONFIG_DEFINITION, CONFIG_COMMENT)
26
27    # Set default config id.
28
29    sz_configmanager.set_default_config_id(config_id)
30except SzError as err:
31    print(f"\nFile {__file__}:\nError:\n{err}\n")

senzing.szdiagnostic module

TODO: szdiagnostic.py

class senzing.szdiagnostic.SzDiagnostic[source]

Bases: ABC

Senzing diagnostic module access library

abstract check_datastore_performance(seconds_to_run: int) str[source]

The check_datastore_performance method performs inserts to determine rate of insertion.

Parameters:

seconds_to_run (int) – Duration of the test in seconds.

Returns:

A string containing a JSON document.

Return type:

str

Raises:
  • TypeError – Incorrect datatype of input parameter.

  • szexception.SzError

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8SECONDS_TO_RUN = 3
 9
10try:
11    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
12    sz_diagnostic = sz_abstract_factory.create_diagnostic()
13    RESULT = sz_diagnostic.check_datastore_performance(SECONDS_TO_RUN)
14    print(f"\nFile {__file__}:\n{RESULT}\n")
15except SzError as err:
16    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{
4    "numRecordsInserted": 0,
5    "insertTime": 0
6}
abstract get_datastore_info() str[source]

The get_datastore_info method returns a JSON document with details of the datastore currently in use by Senzing.

Raises:

szexception.SzError

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_diagnostic = sz_abstract_factory.create_diagnostic()
12    RESULT = sz_diagnostic.get_datastore_info()
13    print(f"\nFile {__file__}:\n{RESULT}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "dataStores": [
 5        {
 6            "id": "CORE",
 7            "type": "sqlite3",
 8            "location": "/tmp/sqlite/G2C.db"
 9        }
10    ]
11}
abstract get_feature(feature_id: int) str[source]

Warning: The get_feature method is an experimental method that returns diagnostic information of a feature. Not recommended for use.

Parameters:

feature_id (int) – The identifier of the feature to describe.

Returns:

A string containing a JSON document

Return type:

str

help(method_name: str = '') str[source]

Return the help for a particular message.

Parameters:

method_name (str) – The name of the method. (e.g. “init”). If empty, a list of methods and descriptions is returned.

Returns:

The Help information about the requested method

Return type:

str

abstract purge_repository() None[source]

Warning: The purge_repository method removes every record in the Senzing repository.

Before calling purge_repository all other instances of the Senzing API MUST be destroyed or shutdown.

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_diagnostic = sz_abstract_factory.create_diagnostic()
12    # WARNING
13    # WARNING - This will remove all loaded and entity resolved data from the Senzing repository, use with caution!
14    # WARNING
15    sz_diagnostic.purge_repository()
16except SzError as err:
17    print(f"\nFile {__file__}:\nError:\n{err}\n")

senzing.szengine module

TODO: szengine.py

class senzing.szengine.SzEngine[source]

Bases: ABC

Senzing engine module access library

abstract add_record(data_source_code: str, record_id: str, record_definition: str, flags: int = 0) str[source]

The add_record 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:
  • data_source_code (str) – Identifies the provenance of the data.

  • record_id (str) – The unique identifier within the records of the same data source.

  • record_definition (str) – A JSON document containing the record to be added to the Senzing repository.

  • flags (int, optional) – Flags used to control information returned. Defaults to 0.

Returns:

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

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10DATA_SOURCE_CODE = "TEST"
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_WITH_INFO
15RECORD_DEFINITION = (
16    "{"
17    '"RECORD_TYPE": "PERSON",'
18    '"PRIMARY_NAME_LAST": "Smith",'
19    '"PRIMARY_NAME_FIRST": "Robert",'
20    '"DATE_OF_BIRTH": "12/11/1978",'
21    '"ADDR_TYPE": "MAILING",'
22    '"ADDR_LINE1": "123 Main Street, Las Vegas NV 89132",'
23    '"PHONE_TYPE": "HOME",'
24    '"PHONE_NUMBER": "702-919-1300",'
25    '"EMAIL_ADDRESS": "bsmith@work.com",'
26    '"DATE": "1/2/18",'
27    '"STATUS": "Active",'
28    '"AMOUNT": "100"'
29    "}"
30)
31RECORD_ID = "1"
32
33try:
34    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
35    sz_engine = sz_abstract_factory.create_engine()
36    RESULT = sz_engine.add_record(DATA_SOURCE_CODE, RECORD_ID, RECORD_DEFINITION, FLAGS)
37    print(f"\nFile {__file__}:\n{RESULT}\n")
38except SzError as err:
39    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "DATA_SOURCE": "TEST",
 5    "RECORD_ID": "1",
 6    "AFFECTED_ENTITIES": [
 7        {
 8            "ENTITY_ID": 1
 9        },
10        {
11            "ENTITY_ID": 35
12        }
13    ],
14    "INTERESTING_ENTITIES": {
15        "ENTITIES": []
16    }
17}
abstract close_export(export_handle: int) None[source]

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

Parameters:

export_handle (int) – A handle created by export_json_entity_report or export_csv_entity_report.

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
11    # Differs based on which senzing_xxxx package is used.
12}
13FLAGS = SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS
14
15try:
16    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
17    sz_engine = sz_abstract_factory.create_engine()
18    export_handle = sz_engine.export_json_entity_report(FLAGS)
19    RESULT = ""
20    while True:
21        FRAGMENT = sz_engine.fetch_next(export_handle)
22        if len(FRAGMENT) == 0:
23            break
24        RESULT += FRAGMENT
25    sz_engine.close_export(export_handle)
26    print(f"\nFile {__file__}:\n{RESULT}\n")
27except SzError as err:
28    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1{"RESOLVED_ENTITY":{"ENTITY_ID":1,"ENTITY_NAME":"","FEATURES":{},"RECORD_SUMMARY":[{"DATA_SOURCE":"TEST","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"TEST","RECORD_ID":"2","INTERNAL_ID":1,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:38:57Z","LAST_SEEN_DT":"2024-10-25T17:38:57Z"}]},"RELATED_ENTITIES":[]}
2{"RESOLVED_ENTITY":{"ENTITY_ID":35,"ENTITY_NAME":"Robert Smith","FEATURES":{"ADDRESS":[{"FEAT_DESC":"1515 Adela Lane Las Vegas NV 89111","LIB_FEAT_ID":22,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"1515 Adela Lane Las Vegas NV 89111","LIB_FEAT_ID":22}]},{"FEAT_DESC":"123 Main Street, Las Vegas NV 89132","LIB_FEAT_ID":3,"USAGE_TYPE":"MAILING","FEAT_DESC_VALUES":[{"FEAT_DESC":"123 Main Street, Las Vegas NV 89132","LIB_FEAT_ID":3}]}],"DOB":[{"FEAT_DESC":"12/11/1978","LIB_FEAT_ID":2,"FEAT_DESC_VALUES":[{"FEAT_DESC":"12/11/1978","LIB_FEAT_ID":2},{"FEAT_DESC":"11/12/1978","LIB_FEAT_ID":21}]}],"EMAIL":[{"FEAT_DESC":"bsmith@work.com","LIB_FEAT_ID":5,"FEAT_DESC_VALUES":[{"FEAT_DESC":"bsmith@work.com","LIB_FEAT_ID":5}]}],"NAME":[{"FEAT_DESC":"Robert Smith","LIB_FEAT_ID":1,"USAGE_TYPE":"PRIMARY","FEAT_DESC_VALUES":[{"FEAT_DESC":"Robert Smith","LIB_FEAT_ID":1},{"FEAT_DESC":"Bob J Smith","LIB_FEAT_ID":38},{"FEAT_DESC":"Bob Smith","LIB_FEAT_ID":20}]}],"PHONE":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4}]},{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4}]}],"RECORD_TYPE":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10,"FEAT_DESC_VALUES":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"CUSTOMERS","RECORD_COUNT":3}],"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1001","INTERNAL_ID":35,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"},{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1002","INTERNAL_ID":36,"MATCH_KEY":"+NAME+DOB+PHONE","MATCH_LEVEL_CODE":"RESOLVED","ERRULE_CODE":"CNAME_CFF_CEXCL","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"},{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1003","INTERNAL_ID":37,"MATCH_KEY":"+NAME+DOB+EMAIL","MATCH_LEVEL_CODE":"RESOLVED","ERRULE_CODE":"SF1_PNAME_CSTAB","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"}]},"RELATED_ENTITIES":[]}
3{"RESOLVED_ENTITY":{"ENTITY_ID":38,"ENTITY_NAME":"Edward Kusha","FEATURES":{"ADDRESS":[{"FEAT_DESC":"1304 Poppy Hills Dr Blacklick OH 43004","LIB_FEAT_ID":46,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"1304 Poppy Hills Dr Blacklick OH 43004","LIB_FEAT_ID":46}]}],"DOB":[{"FEAT_DESC":"3/1/1970","LIB_FEAT_ID":45,"FEAT_DESC_VALUES":[{"FEAT_DESC":"3/1/1970","LIB_FEAT_ID":45}]}],"EMAIL":[{"FEAT_DESC":"Kusha123@hmail.com","LIB_FEAT_ID":48,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Kusha123@hmail.com","LIB_FEAT_ID":48}]}],"NAME":[{"FEAT_DESC":"Edward Kusha","LIB_FEAT_ID":44,"USAGE_TYPE":"PRIMARY","FEAT_DESC_VALUES":[{"FEAT_DESC":"Edward Kusha","LIB_FEAT_ID":44}]}],"RECORD_TYPE":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10,"FEAT_DESC_VALUES":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10}]}],"SSN":[{"FEAT_DESC":"294-66-9999","LIB_FEAT_ID":47,"FEAT_DESC_VALUES":[{"FEAT_DESC":"294-66-9999","LIB_FEAT_ID":47}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"CUSTOMERS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1009","INTERNAL_ID":38,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"}]},"RELATED_ENTITIES":[]}
abstract count_redo_records() int[source]

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

Returns:

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

Return type:

int

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_engine = sz_abstract_factory.create_engine()
12    RESULT = sz_engine.count_redo_records()
13    print(f"\nFile {__file__}:\n{RESULT}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

12
abstract delete_record(data_source_code: str, record_id: str, flags: int = 0) str[source]

The delete_record method deletes a record from the Senzing repository. Can be called as many times as desired and from multiple threads at the same time.

Parameters:
  • data_source_code (str) – Identifies the provenance of the data.

  • record_id (str) – The unique identifier within the records of the same data source.

  • flags (int, optional) – Flags used to control information returned. Defaults to 0.

Returns:

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

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10DATA_SOURCE_CODE = "TEST"
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_WITH_INFO
15RECORD_ID = "1"
16
17try:
18    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
19    sz_engine = sz_abstract_factory.create_engine()
20    RESULT = sz_engine.delete_record(DATA_SOURCE_CODE, RECORD_ID, FLAGS)
21    print(f"\nFile {__file__}:\n{RESULT}\n")
22except SzError as err:
23    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "DATA_SOURCE": "TEST",
 5    "RECORD_ID": "1",
 6    "AFFECTED_ENTITIES": [
 7        {
 8            "ENTITY_ID": 35
 9        }
10    ],
11    "INTERESTING_ENTITIES": {
12        "ENTITIES": []
13    }
14}
abstract export_csv_entity_report(csv_column_list: str, flags: int = <SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS: 3734497>) int[source]

Warning: export_csv_entity_report is not recommended for large systems as it does not scale. It is recommended larger systems implement real-time replication to a data warehouse.

The export_csv_entity_report method initializes a cursor over a document of exported entities. It is part of the export_csv_entity_report, fetch_next, close_export lifecycle of a list of entities to export.

Available CSV columns: RESOLVED_ENTITY_ID, RESOLVED_ENTITY_NAME, RELATED_ENTITY_ID, MATCH_LEVEL,

MATCH_LEVEL_CODE, MATCH_KEY, MATCH_KEY_DETAILS,I S_DISCLOSED, IS_AMBIGUOUS, DATA_SOURCE, RECORD_ID, JSON_DATA, FIRST_SEEN_DT, LAST_SEEN_DT, UNMAPPED_DATA, ERRULE_CODE, RELATED_ENTITY_NAME

Suggested CSV columns: RESOLVED_ENTITY_ID, RELATED_ENTITY_ID, RESOLVED_ENTITY_NAME, MATCH_LEVEL,

MATCH_KEY, DATA_SOURCE, RECORD_ID

Parameters:
  • csv_column_list (str) – A comma-separated list of column names for the CSV export.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS.

Returns:

A handle that identifies the document to be scrolled through using fetch_next.

Return type:

int

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10CSV_COLUMN_LIST = (
11    "RESOLVED_ENTITY_ID,RELATED_ENTITY_ID,RESOLVED_ENTITY_NAME,MATCH_LEVEL,MATCH_KEY,DATA_SOURCE,RECORD_ID"
12)
13FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
14    # Differs based on which senzing_xxxx package is used.
15}
16FLAGS = SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS
17
18try:
19    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
20    sz_engine = sz_abstract_factory.create_engine()
21    export_handle = sz_engine.export_csv_entity_report(CSV_COLUMN_LIST, FLAGS)
22    RESULT = ""
23    while True:
24        FRAGMENT = sz_engine.fetch_next(export_handle)
25        if len(FRAGMENT) == 0:
26            break
27        RESULT += FRAGMENT
28    sz_engine.close_export(export_handle)
29    print(f"\nFile {__file__}:\n{RESULT}\n")
30except SzError as err:
31    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1RESOLVED_ENTITY_ID,RESOLVED_ENTITY_NAME,RELATED_ENTITY_ID,MATCH_LEVEL,MATCH_KEY,DATA_SOURCE,RECORD_ID
21,"",0,0,"","TEST","2"
335,"Robert Smith",0,0,"","CUSTOMERS","1001"
435,"Robert Smith",0,1,"+NAME+DOB+PHONE","CUSTOMERS","1002"
535,"Robert Smith",0,1,"+NAME+DOB+EMAIL","CUSTOMERS","1003"
638,"Edward Kusha",0,0,"","CUSTOMERS","1009"
abstract export_json_entity_report(flags: int = <SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS: 3734497>) int[source]

Warning: export_json_entity_report is not recommended for large systems as it does not scale. It is recommended larger systems implement real-time replication to a data warehouse.

The export_json_entity_report method initializes a cursor over a document of exported entities. It is part of the export_json_entity_report, fetch_next, close_export lifecycle of a list of entities to export.

Parameters:

flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS.

Returns:

A handle that identifies the document to be scrolled through using fetch_next.

Return type:

int

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
11    # Differs based on which senzing_xxxx package is used.
12}
13FLAGS = SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS
14
15try:
16    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
17    sz_engine = sz_abstract_factory.create_engine()
18    export_handle = sz_engine.export_json_entity_report(FLAGS)
19    RESULT = ""
20    while True:
21        FRAGMENT = sz_engine.fetch_next(export_handle)
22        if len(FRAGMENT) == 0:
23            break
24        RESULT += FRAGMENT
25    sz_engine.close_export(export_handle)
26    print(f"\nFile {__file__}:\n{RESULT}\n")
27except SzError as err:
28    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1{"RESOLVED_ENTITY":{"ENTITY_ID":1,"ENTITY_NAME":"","FEATURES":{},"RECORD_SUMMARY":[{"DATA_SOURCE":"TEST","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"TEST","RECORD_ID":"2","INTERNAL_ID":1,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:38:57Z","LAST_SEEN_DT":"2024-10-25T17:38:57Z"}]},"RELATED_ENTITIES":[]}
2{"RESOLVED_ENTITY":{"ENTITY_ID":35,"ENTITY_NAME":"Robert Smith","FEATURES":{"ADDRESS":[{"FEAT_DESC":"1515 Adela Lane Las Vegas NV 89111","LIB_FEAT_ID":22,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"1515 Adela Lane Las Vegas NV 89111","LIB_FEAT_ID":22}]},{"FEAT_DESC":"123 Main Street, Las Vegas NV 89132","LIB_FEAT_ID":3,"USAGE_TYPE":"MAILING","FEAT_DESC_VALUES":[{"FEAT_DESC":"123 Main Street, Las Vegas NV 89132","LIB_FEAT_ID":3}]}],"DOB":[{"FEAT_DESC":"12/11/1978","LIB_FEAT_ID":2,"FEAT_DESC_VALUES":[{"FEAT_DESC":"12/11/1978","LIB_FEAT_ID":2},{"FEAT_DESC":"11/12/1978","LIB_FEAT_ID":21}]}],"EMAIL":[{"FEAT_DESC":"bsmith@work.com","LIB_FEAT_ID":5,"FEAT_DESC_VALUES":[{"FEAT_DESC":"bsmith@work.com","LIB_FEAT_ID":5}]}],"NAME":[{"FEAT_DESC":"Robert Smith","LIB_FEAT_ID":1,"USAGE_TYPE":"PRIMARY","FEAT_DESC_VALUES":[{"FEAT_DESC":"Robert Smith","LIB_FEAT_ID":1},{"FEAT_DESC":"Bob J Smith","LIB_FEAT_ID":38},{"FEAT_DESC":"Bob Smith","LIB_FEAT_ID":20}]}],"PHONE":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4}]},{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4}]}],"RECORD_TYPE":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10,"FEAT_DESC_VALUES":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"CUSTOMERS","RECORD_COUNT":3}],"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1001","INTERNAL_ID":35,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"},{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1002","INTERNAL_ID":36,"MATCH_KEY":"+NAME+DOB+PHONE","MATCH_LEVEL_CODE":"RESOLVED","ERRULE_CODE":"CNAME_CFF_CEXCL","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"},{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1003","INTERNAL_ID":37,"MATCH_KEY":"+NAME+DOB+EMAIL","MATCH_LEVEL_CODE":"RESOLVED","ERRULE_CODE":"SF1_PNAME_CSTAB","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"}]},"RELATED_ENTITIES":[]}
3{"RESOLVED_ENTITY":{"ENTITY_ID":38,"ENTITY_NAME":"Edward Kusha","FEATURES":{"ADDRESS":[{"FEAT_DESC":"1304 Poppy Hills Dr Blacklick OH 43004","LIB_FEAT_ID":46,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"1304 Poppy Hills Dr Blacklick OH 43004","LIB_FEAT_ID":46}]}],"DOB":[{"FEAT_DESC":"3/1/1970","LIB_FEAT_ID":45,"FEAT_DESC_VALUES":[{"FEAT_DESC":"3/1/1970","LIB_FEAT_ID":45}]}],"EMAIL":[{"FEAT_DESC":"Kusha123@hmail.com","LIB_FEAT_ID":48,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Kusha123@hmail.com","LIB_FEAT_ID":48}]}],"NAME":[{"FEAT_DESC":"Edward Kusha","LIB_FEAT_ID":44,"USAGE_TYPE":"PRIMARY","FEAT_DESC_VALUES":[{"FEAT_DESC":"Edward Kusha","LIB_FEAT_ID":44}]}],"RECORD_TYPE":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10,"FEAT_DESC_VALUES":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10}]}],"SSN":[{"FEAT_DESC":"294-66-9999","LIB_FEAT_ID":47,"FEAT_DESC_VALUES":[{"FEAT_DESC":"294-66-9999","LIB_FEAT_ID":47}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"CUSTOMERS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1009","INTERNAL_ID":38,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"}]},"RELATED_ENTITIES":[]}
abstract fetch_next(export_handle: int) str[source]

The fetch_next method is used to scroll through an exported document one entity at a time. Successive calls of fetch_next will export successive rows of entity data until there is no more. It is part of the export_json_entity_report or export_json_entity_report, fetch_next, close_export lifecycle of a list of exported entities.

Parameters:

export_handle (int) – A handle created by export_json_entity_report or export_json_entity_report.

Returns:

TODO:

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
11    # Differs based on which senzing_xxxx package is used.
12}
13FLAGS = SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS
14
15try:
16    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
17    sz_engine = sz_abstract_factory.create_engine()
18    export_handle = sz_engine.export_json_entity_report(FLAGS)
19    RESULT = ""
20    while True:
21        FRAGMENT = sz_engine.fetch_next(export_handle)
22        if len(FRAGMENT) == 0:
23            break
24        RESULT += FRAGMENT
25    sz_engine.close_export(export_handle)
26    print(f"\nFile {__file__}:\n{RESULT}\n")
27except SzError as err:
28    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1{"RESOLVED_ENTITY":{"ENTITY_ID":1,"ENTITY_NAME":"","FEATURES":{},"RECORD_SUMMARY":[{"DATA_SOURCE":"TEST","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"TEST","RECORD_ID":"2","INTERNAL_ID":1,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:38:57Z","LAST_SEEN_DT":"2024-10-25T17:38:57Z"}]},"RELATED_ENTITIES":[]}
2{"RESOLVED_ENTITY":{"ENTITY_ID":35,"ENTITY_NAME":"Robert Smith","FEATURES":{"ADDRESS":[{"FEAT_DESC":"1515 Adela Lane Las Vegas NV 89111","LIB_FEAT_ID":22,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"1515 Adela Lane Las Vegas NV 89111","LIB_FEAT_ID":22}]},{"FEAT_DESC":"123 Main Street, Las Vegas NV 89132","LIB_FEAT_ID":3,"USAGE_TYPE":"MAILING","FEAT_DESC_VALUES":[{"FEAT_DESC":"123 Main Street, Las Vegas NV 89132","LIB_FEAT_ID":3}]}],"DOB":[{"FEAT_DESC":"12/11/1978","LIB_FEAT_ID":2,"FEAT_DESC_VALUES":[{"FEAT_DESC":"12/11/1978","LIB_FEAT_ID":2},{"FEAT_DESC":"11/12/1978","LIB_FEAT_ID":21}]}],"EMAIL":[{"FEAT_DESC":"bsmith@work.com","LIB_FEAT_ID":5,"FEAT_DESC_VALUES":[{"FEAT_DESC":"bsmith@work.com","LIB_FEAT_ID":5}]}],"NAME":[{"FEAT_DESC":"Robert Smith","LIB_FEAT_ID":1,"USAGE_TYPE":"PRIMARY","FEAT_DESC_VALUES":[{"FEAT_DESC":"Robert Smith","LIB_FEAT_ID":1},{"FEAT_DESC":"Bob J Smith","LIB_FEAT_ID":38},{"FEAT_DESC":"Bob Smith","LIB_FEAT_ID":20}]}],"PHONE":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4}]},{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4}]}],"RECORD_TYPE":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10,"FEAT_DESC_VALUES":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"CUSTOMERS","RECORD_COUNT":3}],"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1001","INTERNAL_ID":35,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"},{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1002","INTERNAL_ID":36,"MATCH_KEY":"+NAME+DOB+PHONE","MATCH_LEVEL_CODE":"RESOLVED","ERRULE_CODE":"CNAME_CFF_CEXCL","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"},{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1003","INTERNAL_ID":37,"MATCH_KEY":"+NAME+DOB+EMAIL","MATCH_LEVEL_CODE":"RESOLVED","ERRULE_CODE":"SF1_PNAME_CSTAB","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"}]},"RELATED_ENTITIES":[]}
3{"RESOLVED_ENTITY":{"ENTITY_ID":38,"ENTITY_NAME":"Edward Kusha","FEATURES":{"ADDRESS":[{"FEAT_DESC":"1304 Poppy Hills Dr Blacklick OH 43004","LIB_FEAT_ID":46,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"1304 Poppy Hills Dr Blacklick OH 43004","LIB_FEAT_ID":46}]}],"DOB":[{"FEAT_DESC":"3/1/1970","LIB_FEAT_ID":45,"FEAT_DESC_VALUES":[{"FEAT_DESC":"3/1/1970","LIB_FEAT_ID":45}]}],"EMAIL":[{"FEAT_DESC":"Kusha123@hmail.com","LIB_FEAT_ID":48,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Kusha123@hmail.com","LIB_FEAT_ID":48}]}],"NAME":[{"FEAT_DESC":"Edward Kusha","LIB_FEAT_ID":44,"USAGE_TYPE":"PRIMARY","FEAT_DESC_VALUES":[{"FEAT_DESC":"Edward Kusha","LIB_FEAT_ID":44}]}],"RECORD_TYPE":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10,"FEAT_DESC_VALUES":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10}]}],"SSN":[{"FEAT_DESC":"294-66-9999","LIB_FEAT_ID":47,"FEAT_DESC_VALUES":[{"FEAT_DESC":"294-66-9999","LIB_FEAT_ID":47}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"CUSTOMERS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1009","INTERNAL_ID":38,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"}]},"RELATED_ENTITIES":[]}
abstract find_interesting_entities_by_entity_id(entity_id: int, flags: int = 0) str[source]

TODO: Document find_interesting_entities_by_entity_id()

abstract find_interesting_entities_by_record_id(data_source_code: str, record_id: str, flags: int = 0) str[source]

TODO: Document find_interesting_entities_by_record_id()

abstract find_network_by_entity_id(entity_ids: ~typing.List[int], max_degrees: int, build_out_degrees: int, build_out_max_entities: int, flags: int = <SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS: 8589946880>) str[source]

The find_network_by_entity_id 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:
  • entity_ids (list(int)) – The entity IDs to find the network between.

  • max_degrees (int) – The maximum number of degrees in paths between search entities.

  • build_out_degrees (int) – The number of degrees of relationships to show around each search entity.

  • build_out_max_entities (int) – The maximum number of entities to return in the discovered network.

  • flags (int, optional) – The maximum number of entities to return in the discovered network. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10BUILD_OUT_DEGREES = 1
11ENTITY_LIST = [1, 4]
12FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
13    # Differs based on which senzing_xxxx package is used.
14}
15FLAGS = SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS
16MAX_DEGREES = 2
17MAX_ENTITIES = 10
18
19try:
20    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
21    sz_engine = sz_abstract_factory.create_engine()
22    RESULT = sz_engine.find_network_by_entity_id(ENTITY_LIST, MAX_DEGREES, BUILD_OUT_DEGREES, MAX_ENTITIES, FLAGS)
23    print(f"\nFile {__file__}:\n{RESULT}\n")
24except SzError as err:
25    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "ENTITY_PATHS": [
 5        {
 6            "START_ENTITY_ID": 1,
 7            "END_ENTITY_ID": 35,
 8            "ENTITIES": []
 9        }
10    ],
11    "ENTITY_NETWORK_LINKS": [],
12    "ENTITIES": [
13        {
14            "RESOLVED_ENTITY": {
15                "ENTITY_ID": 1,
16                "ENTITY_NAME": "",
17                "RECORD_SUMMARY": [
18                    {
19                        "DATA_SOURCE": "TEST",
20                        "RECORD_COUNT": 1
21                    }
22                ]
23            }
24        },
25        {
26            "RESOLVED_ENTITY": {
27                "ENTITY_ID": 35,
28                "ENTITY_NAME": "Robert Smith",
29                "RECORD_SUMMARY": [
30                    {
31                        "DATA_SOURCE": "CUSTOMERS",
32                        "RECORD_COUNT": 3
33                    }
34                ]
35            }
36        }
37    ]
38}
abstract find_network_by_record_id(record_keys: ~typing.List[~typing.Tuple[str, str]], max_degrees: int, build_out_degrees: int, build_out_max_entities: int, flags: int = <SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS: 8589946880>) str[source]

The find_network_by_record_id method 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:
  • record_keys (list(tuple(str, str))) – The data source codes and record IDs to find the network between.

  • max_degrees (int) – The maximum number of degrees in paths between search entities.

  • build_out_degrees (int) – The number of degrees of relationships to show around each search entity.

  • build_out_max_entities (int) – The maximum number of entities to return in the discovered network.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10BUILD_OUT_DEGREES = 1
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS
15MAX_DEGREES = 2
16MAX_ENTITIES = 10
17RECORD_LIST = [("CUSTOMERS", "1001"), ("CUSTOMERS", "1009")]
18
19try:
20    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
21    sz_engine = sz_abstract_factory.create_engine()
22    RESULT = sz_engine.find_network_by_record_id(RECORD_LIST, MAX_DEGREES, BUILD_OUT_DEGREES, MAX_ENTITIES, FLAGS)
23    print(f"\nFile {__file__}:\n{RESULT}\n")
24except SzError as err:
25    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "ENTITY_PATHS": [
 5        {
 6            "START_ENTITY_ID": 35,
 7            "END_ENTITY_ID": 38,
 8            "ENTITIES": []
 9        }
10    ],
11    "ENTITY_NETWORK_LINKS": [],
12    "ENTITIES": [
13        {
14            "RESOLVED_ENTITY": {
15                "ENTITY_ID": 35,
16                "ENTITY_NAME": "Robert Smith",
17                "RECORD_SUMMARY": [
18                    {
19                        "DATA_SOURCE": "CUSTOMERS",
20                        "RECORD_COUNT": 3
21                    }
22                ]
23            }
24        },
25        {
26            "RESOLVED_ENTITY": {
27                "ENTITY_ID": 38,
28                "ENTITY_NAME": "Edward Kusha",
29                "RECORD_SUMMARY": [
30                    {
31                        "DATA_SOURCE": "CUSTOMERS",
32                        "RECORD_COUNT": 1
33                    }
34                ]
35            }
36        }
37    ]
38}
abstract find_path_by_entity_id(start_entity_id: int, end_entity_id: int, max_degrees: int, avoid_entity_ids: ~typing.List[int] | None = None, required_data_sources: ~typing.List[str] | None = None, flags: int = <SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS: 1073754112>) str[source]

The find_path_by_entity_id method 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:
  • start_entity_id (int) – The entity ID for the starting entity of the search path.

  • end_entity_id (int) – The entity ID for the ending entity of the search path.

  • max_degrees (int) – The maximum number of degrees in paths between search entities.

  • avoid_entity_ids (list(int), optional) – The entity IDs to avoid when finding a path.

  • required_data_sources (list(str), optional) – The data source code(s) that must be in a path.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.

Returns:

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

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from typing import List
 4
 5from senzing_xxxx import (
 6    SzAbstractFactory,
 7    SzAbstractFactoryParameters,
 8    SzEngineFlags,
 9    SzError,
10)
11
12AVOID_ENTITY_IDS: List[int] = []
13END_ENTITY_ID = 4
14FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
15    # Differs based on which senzing_xxxx package is used.
16}
17FLAGS = SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS
18MAX_DEGREES = 2
19REQUIRED_DATA_SOURCES: List[str] = []
20START_ENTITY_ID = 1
21
22try:
23    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
24    sz_engine = sz_abstract_factory.create_engine()
25    RESULT = sz_engine.find_path_by_entity_id(
26        START_ENTITY_ID,
27        END_ENTITY_ID,
28        MAX_DEGREES,
29        AVOID_ENTITY_IDS,
30        REQUIRED_DATA_SOURCES,
31        FLAGS,
32    )
33    print(f"\nFile {__file__}:\n{RESULT}\n")
34except SzError as err:
35    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "ENTITY_PATHS": [
 5        {
 6            "START_ENTITY_ID": 1,
 7            "END_ENTITY_ID": 35,
 8            "ENTITIES": []
 9        }
10    ],
11    "ENTITY_PATH_LINKS": [],
12    "ENTITIES": [
13        {
14            "RESOLVED_ENTITY": {
15                "ENTITY_ID": 1,
16                "ENTITY_NAME": "",
17                "RECORD_SUMMARY": [
18                    {
19                        "DATA_SOURCE": "TEST",
20                        "RECORD_COUNT": 1
21                    }
22                ]
23            }
24        },
25        {
26            "RESOLVED_ENTITY": {
27                "ENTITY_ID": 35,
28                "ENTITY_NAME": "Robert Smith",
29                "RECORD_SUMMARY": [
30                    {
31                        "DATA_SOURCE": "CUSTOMERS",
32                        "RECORD_COUNT": 3
33                    }
34                ]
35            }
36        }
37    ]
38}
abstract find_path_by_record_id(start_data_source_code: str, start_record_id: str, end_data_source_code: str, end_record_id: str, max_degrees: int, avoid_record_keys: ~typing.List[~typing.Tuple[str, str]] | None = None, required_data_sources: ~typing.List[str] | None = None, flags: int = <SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS: 1073754112>) str[source]

The find_path_by_record_id method 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:
  • start_data_source_code (str) – Identifies the provenance of the record for the starting entity of the search path.

  • start_record_id (str) – The unique identifier within the records of the same data source for the starting entity of the search path.

  • end_data_source_code (str) – Identifies the provenance of the record for the ending entity of the search path.

  • end_record_id (str) – The unique identifier within the records of the same data source for the ending entity of the search path.

  • max_degrees (int) – The maximum number of degrees in paths between search entities.

  • avoid_record_keys (list(tuple(str, str)), optional) – The data source codes and record IDs to avoid when finding a path.

  • required_data_sources (list(str), optional) – The data source code(s) that must be in a path.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from typing import List, Tuple
 4
 5from senzing_xxxx import (
 6    SzAbstractFactory,
 7    SzAbstractFactoryParameters,
 8    SzEngineFlags,
 9    SzError,
10)
11
12AVOID_RECORD_KEYS: List[Tuple[str, str]] = []
13END_DATA_SOURCE_CODE = "CUSTOMERS"
14END_RECORD_ID = "1009"
15FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
16    # Differs based on which senzing_xxxx package is used.
17}
18FLAGS = SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS
19MAX_DEGREES = 2
20REQUIRED_DATA_SOURCES: List[str] = []
21START_DATA_SOURCE_CODE = "CUSTOMERS"
22START_RECORD_ID = "1001"
23
24try:
25    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
26    sz_engine = sz_abstract_factory.create_engine()
27    RESULT = sz_engine.find_path_by_record_id(
28        START_DATA_SOURCE_CODE,
29        START_RECORD_ID,
30        END_DATA_SOURCE_CODE,
31        END_RECORD_ID,
32        MAX_DEGREES,
33        AVOID_RECORD_KEYS,
34        REQUIRED_DATA_SOURCES,
35        FLAGS,
36    )
37    print(f"\nFile {__file__}:\n{RESULT}\n")
38except SzError as err:
39    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "ENTITY_PATHS": [
 5        {
 6            "START_ENTITY_ID": 35,
 7            "END_ENTITY_ID": 38,
 8            "ENTITIES": []
 9        }
10    ],
11    "ENTITY_PATH_LINKS": [],
12    "ENTITIES": [
13        {
14            "RESOLVED_ENTITY": {
15                "ENTITY_ID": 35,
16                "ENTITY_NAME": "Robert Smith",
17                "RECORD_SUMMARY": [
18                    {
19                        "DATA_SOURCE": "CUSTOMERS",
20                        "RECORD_COUNT": 3
21                    }
22                ]
23            }
24        },
25        {
26            "RESOLVED_ENTITY": {
27                "ENTITY_ID": 38,
28                "ENTITY_NAME": "Edward Kusha",
29                "RECORD_SUMMARY": [
30                    {
31                        "DATA_SOURCE": "CUSTOMERS",
32                        "RECORD_COUNT": 1
33                    }
34                ]
35            }
36        }
37    ]
38}
abstract get_active_config_id() int[source]

The get_active_config_id method returns the identifier of the currently active Senzing engine configuration.

Returns:

The identifier of the active Senzing Engine configuration.

Return type:

int

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_engine = sz_abstract_factory.create_engine()
12    RESULT = sz_engine.get_active_config_id()
13    print(f"\nFile {__file__}:\n{RESULT}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

14030462317
abstract get_entity_by_entity_id(entity_id: int, flags: int = <SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS: 3734464>) str[source]

The get_entity_by_entity_id method returns entity data based on the ID of a resolved identity.

Parameters:
  • entity_id (int) – The unique identifier of an entity.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10ENTITY_ID = 1
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS
15
16try:
17    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
18    sz_engine = sz_abstract_factory.create_engine()
19    RESULT = sz_engine.get_entity_by_entity_id(ENTITY_ID, FLAGS)
20    print(f"\nFile {__file__}:\n{RESULT}\n")
21except SzError as err:
22    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "RESOLVED_ENTITY": {
 5        "ENTITY_ID": 1,
 6        "ENTITY_NAME": "",
 7        "FEATURES": {},
 8        "RECORD_SUMMARY": [
 9            {
10                "DATA_SOURCE": "TEST",
11                "RECORD_COUNT": 1
12            }
13        ],
14        "RECORDS": [
15            {
16                "DATA_SOURCE": "TEST",
17                "RECORD_ID": "2",
18                "INTERNAL_ID": 1,
19                "MATCH_KEY": "",
20                "MATCH_LEVEL_CODE": "",
21                "ERRULE_CODE": "",
22                "FIRST_SEEN_DT": "YYYY-MM-DDThh:mm:ssZ",
23                "LAST_SEEN_DT": "YYYY-MM-DDThh:mm:ssZ"
24            }
25        ]
26    },
27    "RELATED_ENTITIES": []
28}
abstract get_entity_by_record_id(data_source_code: str, record_id: str, flags: int = <SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS: 3734464>) str[source]

The get_entity_by_record_id method returns entity data based on the ID of a record which is a member of the entity.

Parameters:
  • data_source_code (str) – Identifies the provenance of the data.

  • record_id (str) – The unique identifier within the records of the same data source.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10DATA_SOURCE_CODE = "CUSTOMERS"
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS
15RECORD_ID = "1001"
16
17try:
18    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
19    sz_engine = sz_abstract_factory.create_engine()
20    RESULT = sz_engine.get_entity_by_record_id(DATA_SOURCE_CODE, RECORD_ID, FLAGS)
21    print(f"\nFile {__file__}:\n{RESULT}\n")
22except SzError as err:
23    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted for easier reading.
  2
  3{
  4    "RESOLVED_ENTITY": {
  5        "ENTITY_ID": 35,
  6        "ENTITY_NAME": "Robert Smith",
  7        "FEATURES": {
  8            "ADDRESS": [
  9                {
 10                    "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 11                    "LIB_FEAT_ID": 22,
 12                    "USAGE_TYPE": "HOME",
 13                    "FEAT_DESC_VALUES": [
 14                        {
 15                            "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 16                            "LIB_FEAT_ID": 22
 17                        }
 18                    ]
 19                },
 20                {
 21                    "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 22                    "LIB_FEAT_ID": 3,
 23                    "USAGE_TYPE": "MAILING",
 24                    "FEAT_DESC_VALUES": [
 25                        {
 26                            "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 27                            "LIB_FEAT_ID": 3
 28                        }
 29                    ]
 30                }
 31            ],
 32            "DOB": [
 33                {
 34                    "FEAT_DESC": "12/11/1978",
 35                    "LIB_FEAT_ID": 2,
 36                    "FEAT_DESC_VALUES": [
 37                        {
 38                            "FEAT_DESC": "12/11/1978",
 39                            "LIB_FEAT_ID": 2
 40                        },
 41                        {
 42                            "FEAT_DESC": "11/12/1978",
 43                            "LIB_FEAT_ID": 21
 44                        }
 45                    ]
 46                }
 47            ],
 48            "EMAIL": [
 49                {
 50                    "FEAT_DESC": "bsmith@work.com",
 51                    "LIB_FEAT_ID": 5,
 52                    "FEAT_DESC_VALUES": [
 53                        {
 54                            "FEAT_DESC": "bsmith@work.com",
 55                            "LIB_FEAT_ID": 5
 56                        }
 57                    ]
 58                }
 59            ],
 60            "NAME": [
 61                {
 62                    "FEAT_DESC": "Robert Smith",
 63                    "LIB_FEAT_ID": 1,
 64                    "USAGE_TYPE": "PRIMARY",
 65                    "FEAT_DESC_VALUES": [
 66                        {
 67                            "FEAT_DESC": "Robert Smith",
 68                            "LIB_FEAT_ID": 1
 69                        },
 70                        {
 71                            "FEAT_DESC": "Bob J Smith",
 72                            "LIB_FEAT_ID": 38
 73                        },
 74                        {
 75                            "FEAT_DESC": "Bob Smith",
 76                            "LIB_FEAT_ID": 20
 77                        }
 78                    ]
 79                }
 80            ],
 81            "PHONE": [
 82                {
 83                    "FEAT_DESC": "702-919-1300",
 84                    "LIB_FEAT_ID": 4,
 85                    "USAGE_TYPE": "HOME",
 86                    "FEAT_DESC_VALUES": [
 87                        {
 88                            "FEAT_DESC": "702-919-1300",
 89                            "LIB_FEAT_ID": 4
 90                        }
 91                    ]
 92                },
 93                {
 94                    "FEAT_DESC": "702-919-1300",
 95                    "LIB_FEAT_ID": 4,
 96                    "USAGE_TYPE": "MOBILE",
 97                    "FEAT_DESC_VALUES": [
 98                        {
 99                            "FEAT_DESC": "702-919-1300",
100                            "LIB_FEAT_ID": 4
101                        }
102                    ]
103                }
104            ],
105            "RECORD_TYPE": [
106                {
107                    "FEAT_DESC": "PERSON",
108                    "LIB_FEAT_ID": 10,
109                    "FEAT_DESC_VALUES": [
110                        {
111                            "FEAT_DESC": "PERSON",
112                            "LIB_FEAT_ID": 10
113                        }
114                    ]
115                }
116            ]
117        },
118        "RECORD_SUMMARY": [
119            {
120                "DATA_SOURCE": "CUSTOMERS",
121                "RECORD_COUNT": 3
122            }
123        ],
124        "RECORDS": [
125            {
126                "DATA_SOURCE": "CUSTOMERS",
127                "RECORD_ID": "1001",
128                "INTERNAL_ID": 35,
129                "MATCH_KEY": "",
130                "MATCH_LEVEL_CODE": "",
131                "ERRULE_CODE": "",
132                "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
133                "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
134            },
135            {
136                "DATA_SOURCE": "CUSTOMERS",
137                "RECORD_ID": "1002",
138                "INTERNAL_ID": 36,
139                "MATCH_KEY": "+NAME+DOB+PHONE",
140                "MATCH_LEVEL_CODE": "RESOLVED",
141                "ERRULE_CODE": "CNAME_CFF_CEXCL",
142                "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
143                "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
144            },
145            {
146                "DATA_SOURCE": "CUSTOMERS",
147                "RECORD_ID": "1003",
148                "INTERNAL_ID": 37,
149                "MATCH_KEY": "+NAME+DOB+EMAIL",
150                "MATCH_LEVEL_CODE": "RESOLVED",
151                "ERRULE_CODE": "SF1_PNAME_CSTAB",
152                "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
153                "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
154            }
155        ]
156    },
157    "RELATED_ENTITIES": []
158}
abstract get_record(data_source_code: str, record_id: str, flags: int = <SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_JSON_DATA: 65536>) str[source]

The get_record method 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:
  • data_source_code (str) – Identifies the provenance of the data.

  • record_id (str) – The unique identifier within the records of the same data source.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS.

Returns:

A JSON document of a single record.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10DATA_SOURCE_CODE = "CUSTOMERS"
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS
15RECORD_ID = "1001"
16
17try:
18    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
19    sz_engine = sz_abstract_factory.create_engine()
20    RESULT = sz_engine.get_record(DATA_SOURCE_CODE, RECORD_ID, FLAGS)
21    print(f"\nFile {__file__}:\n{RESULT}\n")
22except SzError as err:
23    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "DATA_SOURCE": "CUSTOMERS",
 5    "RECORD_ID": "1001",
 6    "JSON_DATA": {
 7        "DATA_SOURCE": "CUSTOMERS",
 8        "RECORD_ID": "1001",
 9        "RECORD_TYPE": "PERSON",
10        "PRIMARY_NAME_LAST": "Smith",
11        "PRIMARY_NAME_FIRST": "Robert",
12        "DATE_OF_BIRTH": "12/11/1978",
13        "ADDR_TYPE": "MAILING",
14        "ADDR_LINE1": "123 Main Street, Las Vegas NV 89132",
15        "PHONE_TYPE": "HOME",
16        "PHONE_NUMBER": "702-919-1300",
17        "EMAIL_ADDRESS": "bsmith@work.com",
18        "DATE": "1/2/18",
19        "STATUS": "Active",
20        "AMOUNT": "100"
21    }
22}
abstract get_redo_record() str[source]

The get_redo_record method returns the next internally queued redo record from the Senzing repository. The process_redo_record method is called to process the redo record retrieved by get_redo_record.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_engine = sz_abstract_factory.create_engine()
12    RESULT = sz_engine.get_redo_record()
13    print(f"\nFile {__file__}:\n{RESULT}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{
4    "REASON": "deferred delete",
5    "DATA_SOURCE": "CUSTOMERS",
6    "RECORD_ID": "1001",
7    "DSRC_ACTION": "X"
8}
abstract get_stats() str[source]

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

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_engine = sz_abstract_factory.create_engine()
12    RESULT = sz_engine.get_stats()
13    print(f"\nFile {__file__}:\n{RESULT}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted for easier reading.
  2
  3{
  4    "workload": {
  5        "apiVersion": "4.0.0.24289",
  6        "loadedRecords": 6,
  7        "addedRecords": 20,
  8        "bulkAddedRecords": 0,
  9        "optimizedOut": 3,
 10        "optimizedOutSkipped": 6,
 11        "newObsEnt": 18,
 12        "obsEntHashSame": 4,
 13        "obsEntHashDiff": 1,
 14        "partiallyResolved": 0,
 15        "deletedRecords": 15,
 16        "changeDeletes": 4,
 17        "reevaluations": 4,
 18        "repairedEntities": 6,
 19        "duration": 96,
 20        "retries": 0,
 21        "candidates": 11,
 22        "actualAmbiguousTest": 0,
 23        "cachedAmbiguousTest": 0,
 24        "libFeatCacheHit": 706,
 25        "libFeatCacheMiss": 589,
 26        "resFeatStatCacheHit": 6211,
 27        "resFeatStatCacheMiss": 1052,
 28        "libFeatInsert": 28,
 29        "resFeatStatInsert": 28,
 30        "resFeatStatUpdateAttempt": 522,
 31        "resFeatStatUpdateFail": 0,
 32        "unresolveTest": 4,
 33        "abortedUnresolve": 0,
 34        "lockWaits": {
 35            "maxRefreshLocksMS": 0,
 36            "totalRefreshLocksMS": 0,
 37            "countRefreshLocks": 0
 38        },
 39        "unresolveTriggers": {
 40            "normalResolve": 0,
 41            "update": 0,
 42            "relLink": 0,
 43            "extensiveResolve": 4,
 44            "ambiguousNoResolve": 0,
 45            "ambiguousMultiResolve": 0
 46        },
 47        "reresolveTriggers": {
 48            "abortRetry": 0,
 49            "unresolveMovement": 0,
 50            "multipleResolvableCandidates": 0,
 51            "resolveNewFeatures": 7,
 52            "newFeatureFTypes": [
 53                {
 54                    "ADDRESS": 5
 55                },
 56                {
 57                    "ADDR_KEY": 5
 58                },
 59                {
 60                    "DOB": 5
 61                },
 62                {
 63                    "NAME": 7
 64                },
 65                {
 66                    "NAMEADDR_KEY": 5
 67                },
 68                {
 69                    "NAMEDATE_KEY": 7
 70                },
 71                {
 72                    "NAMEPHONE_KEY": 5
 73                },
 74                {
 75                    "NAMEREGION_KEY": 5
 76                },
 77                {
 78                    "NAME_KEY": 7
 79                },
 80                {
 81                    "PHONE": 5
 82                }
 83            ]
 84        },
 85        "reresolveSkipped": 1,
 86        "filteredObsFeat": 0,
 87        "expressedFeatureCalls": [
 88            {
 89                "EFCALL_ID": 1,
 90                "EFUNC_CODE": "PHONE_HASHER",
 91                "numCalls": 20
 92            },
 93            {
 94                "EFCALL_ID": 7,
 95                "EFUNC_CODE": "NAME_HASHER",
 96                "numCalls": 45
 97            },
 98            {
 99                "EFCALL_ID": 9,
100                "EFUNC_CODE": "ADDR_HASHER",
101                "numCalls": 21
102            },
103            {
104                "EFCALL_ID": 10,
105                "EFUNC_CODE": "EXPRESS_BOM",
106                "numCalls": 1
107            },
108            {
109                "EFCALL_ID": 16,
110                "EFUNC_CODE": "EXPRESS_ID",
111                "numCalls": 1
112            },
113            {
114                "EFCALL_ID": 34,
115                "EFUNC_CODE": "FEAT_BUILDER",
116                "numCalls": 19
117            },
118            {
119                "EFCALL_ID": 92,
120                "EFUNC_CODE": "NAME_HASHER",
121                "numCalls": 21
122            },
123            {
124                "EFCALL_ID": 94,
125                "EFUNC_CODE": "NAME_HASHER",
126                "numCalls": 45
127            },
128            {
129                "EFCALL_ID": 95,
130                "EFUNC_CODE": "NAME_HASHER",
131                "numCalls": 2
132            },
133            {
134                "EFCALL_ID": 96,
135                "EFUNC_CODE": "NAME_HASHER",
136                "numCalls": 45
137            },
138            {
139                "EFCALL_ID": 97,
140                "EFUNC_CODE": "NAME_HASHER",
141                "numCalls": 45
142            },
143            {
144                "EFCALL_ID": 98,
145                "EFUNC_CODE": "NAME_HASHER",
146                "numCalls": 45
147            }
148        ],
149        "expressedFeaturesCreated": [
150            {
151                "ADDR_KEY": 42
152            },
153            {
154                "EMAIL_KEY": 19
155            },
156            {
157                "ID_KEY": 1
158            },
159            {
160                "NAMEADDR_KEY": 54
161            },
162            {
163                "NAMEDATE_KEY": 99
164            },
165            {
166                "NAMEID_KEY": 2
167            },
168            {
169                "NAMEPHONE_KEY": 25
170            },
171            {
172                "NAMEREGION_KEY": 54
173            },
174            {
175                "NAME_KEY": 35
176            },
177            {
178                "PHONE_KEY": 20
179            },
180            {
181                "SEARCH_KEY": 1
182            }
183        ],
184        "scoredPairs": [
185            {
186                "ADDRESS": 8
187            },
188            {
189                "DOB": 18
190            },
191            {
192                "EMAIL": 5
193            },
194            {
195                "NAME": 29
196            },
197            {
198                "PHONE": 9
199            },
200            {
201                "RECORD_TYPE": 10
202            }
203        ],
204        "cacheHit": [
205            {
206                "DOB": 1
207            },
208            {
209                "NAME": 3
210            }
211        ],
212        "cacheMiss": [
213            {
214                "ADDRESS": 8
215            },
216            {
217                "DOB": 17
218            },
219            {
220                "EMAIL": 5
221            },
222            {
223                "NAME": 26
224            },
225            {
226                "PHONE": 9
227            }
228        ],
229        "redoTriggers": [
230            {
231                "DEFERRED_DELETE": 6
232            }
233        ],
234        "latchContention": [],
235        "highContentionFeat": [],
236        "highContentionResEnt": [],
237        "genericDetect": [],
238        "candidateBuilders": [
239            {
240                "ADDR_KEY": 34
241            },
242            {
243                "DOB": 36
244            },
245            {
246                "EMAIL_KEY": 32
247            },
248            {
249                "ID_KEY": 1
250            },
251            {
252                "NAMEADDR_KEY": 34
253            },
254            {
255                "NAMEDATE_KEY": 36
256            },
257            {
258                "NAMEID_KEY": 1
259            },
260            {
261                "NAMEPHONE_KEY": 33
262            },
263            {
264                "NAMEREGION_KEY": 34
265            },
266            {
267                "NAME_KEY": 37
268            },
269            {
270                "PHONE_KEY": 33
271            },
272            {
273                "SEARCH_KEY": 1
274            },
275            {
276                "SSN": 1
277            }
278        ],
279        "suppressedCandidateBuilders": [],
280        "suppressedScoredFeatureType": [],
281        "suppressedCandidateBuildersForReresolve": [],
282        "suppressedScoredFeatureTypeForReresolve": [],
283        "suppressedDisclosedRelationshipDomainCount": 0,
284        "corruptEntityTestDiagnosis": {
285            "corruptionTypes": 0
286        },
287        "threadState": {
288            "active": 0,
289            "idle": 8,
290            "governorContention": 0,
291            "sqlExecuting": 0,
292            "loader": 0,
293            "resolver": 0,
294            "scoring": 0,
295            "dataLatchContention": 0,
296            "obsEntContention": 0,
297            "resEntContention": 0
298        },
299        "systemResources": {
300            "initResources": [
301                {
302                    "physicalCores": 16
303                },
304                {
305                    "logicalCores": 16
306                },
307                {
308                    "totalMemory": "62.6GB"
309                },
310                {
311                    "availableMemory": "52.7GB"
312                }
313            ],
314            "currResources": [
315                {
316                    "availableMemory": "48.5GB"
317                },
318                {
319                    "activeThreads": 0
320                },
321                {
322                    "workerThreads": 8
323                },
324                {
325                    "systemLoad": [
326                        {
327                            "cpuUser": 5.160142
328                        },
329                        {
330                            "cpuSystem": 3.932384
331                        },
332                        {
333                            "cpuIdle": 90.800713
334                        },
335                        {
336                            "cpuWait": 0.071174
337                        },
338                        {
339                            "cpuSoftIrq": 0.035587
340                        }
341                    ]
342                }
343            ]
344        }
345    }
346}
abstract get_virtual_entity_by_record_id(record_keys: ~typing.List[~typing.Tuple[str, str]], flags: int = <SzEngineFlags.SZ_ENTITY_CORE_FLAGS: 63488>) str[source]

The get_virtual_entity_by_record_id method 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:
  • record_keys (list(tuple(str, str))) – The data source codes and record IDs identifying records to create the virtual entity from.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
11    # Differs based on which senzing_xxxx package is used.
12}
13FLAGS = SzEngineFlags.SZ_VIRTUAL_ENTITY_DEFAULT_FLAGS
14RECORD_LIST = [
15    ("CUSTOMERS", "1001"),
16    ("CUSTOMERS", "1002"),
17]
18
19try:
20    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
21    sz_engine = sz_abstract_factory.create_engine()
22    RESULT = sz_engine.get_virtual_entity_by_record_id(RECORD_LIST, FLAGS)
23    print(f"\nFile {__file__}:\n{RESULT}\n")
24except SzError as err:
25    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted for easier reading.
  2
  3{
  4    "RESOLVED_ENTITY": {
  5        "ENTITY_ID": 35,
  6        "ENTITY_NAME": "Robert Smith",
  7        "FEATURES": {
  8            "ADDRESS": [
  9                {
 10                    "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 11                    "LIB_FEAT_ID": 22,
 12                    "USAGE_TYPE": "HOME",
 13                    "FEAT_DESC_VALUES": [
 14                        {
 15                            "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 16                            "LIB_FEAT_ID": 22
 17                        }
 18                    ]
 19                },
 20                {
 21                    "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 22                    "LIB_FEAT_ID": 3,
 23                    "USAGE_TYPE": "MAILING",
 24                    "FEAT_DESC_VALUES": [
 25                        {
 26                            "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 27                            "LIB_FEAT_ID": 3
 28                        }
 29                    ]
 30                }
 31            ],
 32            "DOB": [
 33                {
 34                    "FEAT_DESC": "12/11/1978",
 35                    "LIB_FEAT_ID": 2,
 36                    "FEAT_DESC_VALUES": [
 37                        {
 38                            "FEAT_DESC": "12/11/1978",
 39                            "LIB_FEAT_ID": 2
 40                        },
 41                        {
 42                            "FEAT_DESC": "11/12/1978",
 43                            "LIB_FEAT_ID": 21
 44                        }
 45                    ]
 46                }
 47            ],
 48            "EMAIL": [
 49                {
 50                    "FEAT_DESC": "bsmith@work.com",
 51                    "LIB_FEAT_ID": 5,
 52                    "FEAT_DESC_VALUES": [
 53                        {
 54                            "FEAT_DESC": "bsmith@work.com",
 55                            "LIB_FEAT_ID": 5
 56                        }
 57                    ]
 58                }
 59            ],
 60            "NAME": [
 61                {
 62                    "FEAT_DESC": "Robert Smith",
 63                    "LIB_FEAT_ID": 1,
 64                    "USAGE_TYPE": "PRIMARY",
 65                    "FEAT_DESC_VALUES": [
 66                        {
 67                            "FEAT_DESC": "Robert Smith",
 68                            "LIB_FEAT_ID": 1
 69                        },
 70                        {
 71                            "FEAT_DESC": "Bob Smith",
 72                            "LIB_FEAT_ID": 20
 73                        }
 74                    ]
 75                }
 76            ],
 77            "PHONE": [
 78                {
 79                    "FEAT_DESC": "702-919-1300",
 80                    "LIB_FEAT_ID": 4,
 81                    "USAGE_TYPE": "HOME",
 82                    "FEAT_DESC_VALUES": [
 83                        {
 84                            "FEAT_DESC": "702-919-1300",
 85                            "LIB_FEAT_ID": 4
 86                        }
 87                    ]
 88                },
 89                {
 90                    "FEAT_DESC": "702-919-1300",
 91                    "LIB_FEAT_ID": 4,
 92                    "USAGE_TYPE": "MOBILE",
 93                    "FEAT_DESC_VALUES": [
 94                        {
 95                            "FEAT_DESC": "702-919-1300",
 96                            "LIB_FEAT_ID": 4
 97                        }
 98                    ]
 99                }
100            ],
101            "RECORD_TYPE": [
102                {
103                    "FEAT_DESC": "PERSON",
104                    "LIB_FEAT_ID": 10,
105                    "FEAT_DESC_VALUES": [
106                        {
107                            "FEAT_DESC": "PERSON",
108                            "LIB_FEAT_ID": 10
109                        }
110                    ]
111                }
112            ]
113        },
114        "RECORD_SUMMARY": [
115            {
116                "DATA_SOURCE": "CUSTOMERS",
117                "RECORD_COUNT": 2
118            }
119        ],
120        "RECORDS": [
121            {
122                "DATA_SOURCE": "CUSTOMERS",
123                "RECORD_ID": "1001",
124                "INTERNAL_ID": 35,
125                "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
126                "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
127            },
128            {
129                "DATA_SOURCE": "CUSTOMERS",
130                "RECORD_ID": "1002",
131                "INTERNAL_ID": 36,
132                "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
133                "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
134            }
135        ]
136    }
137}
help(method_name: str = '') str[source]

Return the help for a particular message.

Parameters:

method_name (str) – The name of the method. (e.g. “init”). If empty, a list of methods and descriptions is returned.

Returns:

The Help information about the requested method

Return type:

str

abstract how_entity_by_entity_id(entity_id: int, flags: int = <SzEngineFlags.SZ_INCLUDE_FEATURE_SCORES: 67108864>) str[source]

The how_entity_by_entity_id method 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:
  • entity_id (int) – The unique identifier of an entity.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10ENTITY_ID = 1
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS
15
16try:
17    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
18    sz_engine = sz_abstract_factory.create_engine()
19    RESULT = sz_engine.how_entity_by_entity_id(ENTITY_ID, FLAGS)
20    print(f"\nFile {__file__}:\n{RESULT}\n")
21except SzError as err:
22    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "HOW_RESULTS": {
 5        "RESOLUTION_STEPS": [],
 6        "FINAL_STATE": {
 7            "NEED_REEVALUATION": 0,
 8            "VIRTUAL_ENTITIES": [
 9                {
10                    "VIRTUAL_ENTITY_ID": "V1",
11                    "MEMBER_RECORDS": [
12                        {
13                            "INTERNAL_ID": 1,
14                            "RECORDS": [
15                                {
16                                    "DATA_SOURCE": "TEST",
17                                    "RECORD_ID": "2"
18                                }
19                            ]
20                        }
21                    ]
22                }
23            ]
24        }
25    }
26}
abstract preprocess_record(record_definition: str, flags: int = <SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_JSON_DATA: 65536>) str[source]

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

Parameters:
  • record_definition (str) – A JSON document containing the record to be tested.

  • flags (int, optional) – Flags used to control information returned. Defaults to 0.

Returns:

A JSON document containing metadata as specified by the flags.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
11    # Differs based on which senzing_xxxx package is used.
12}
13FLAGS = SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS
14RECORD_DEFINITION = (
15    "{"
16    '"RECORD_TYPE": "PERSON",'
17    '"PRIMARY_NAME_LAST": "Smith",'
18    '"PRIMARY_NAME_FIRST": "Robert",'
19    '"DATE_OF_BIRTH": "12/11/1978",'
20    '"ADDR_TYPE": "MAILING",'
21    '"ADDR_LINE1": "123 Main Street, Las Vegas NV 89132",'
22    '"PHONE_TYPE": "HOME",'
23    '"PHONE_NUMBER": "702-919-1300",'
24    '"EMAIL_ADDRESS": "bsmith@work.com",'
25    '"DATE": "1/2/18",'
26    '"STATUS": "Active",'
27    '"AMOUNT": "100"'
28    "}"
29)
30
31try:
32    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
33    sz_engine = sz_abstract_factory.create_engine()
34    RESULT = sz_engine.preprocess_record(RECORD_DEFINITION, FLAGS)
35    print(f"\nFile {__file__}:\n{RESULT}\n")
36except SzError as err:
37    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1
abstract prime_engine() None[source]

The prime_engine method 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.

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_engine = sz_abstract_factory.create_engine()
12    sz_engine.prime_engine()
13except SzError as err:
14    print(f"\nFile {__file__}:\nError:\n{err}\n")
abstract process_redo_record(redo_record: str, flags: int = 0) str[source]

The process_redo_record method is called to process the redo record retrieved by get_redo_record.

Parameters:
  • redo_record (str) – A redo record retrieved from get_redo_record.

  • flags (int, optional) – Flags used to control information returned. Defaults to 0.

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
11    # Differs based on which senzing_xxxx package is used.
12}
13FLAGS = SzEngineFlags.SZ_WITH_INFO
14
15try:
16    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
17    sz_engine = sz_abstract_factory.create_engine()
18    while sz_engine.count_redo_records() > 0:
19        REDO_RECORD = sz_engine.get_redo_record()
20        RESULT = sz_engine.process_redo_record(REDO_RECORD, FLAGS)
21        print(f"\nFile {__file__}:\n{RESULT}\n")
22except SzError as err:
23    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4  "DATA_SOURCE": "CUSTOMERS",
 5  "RECORD_ID": "2207",
 6  "AFFECTED_ENTITIES": [
 7    {
 8      "ENTITY_ID": 305
 9    }
10  ],
11  "INTERESTING_ENTITIES": {
12    "ENTITIES": []
13  }
14}
abstract reevaluate_entity(entity_id: int, flags: int = 0) str[source]

The reevaluate_entity method reevaluates the specified entity.

Parameters:
  • entity_id (int) – The unique identifier of an entity.

  • flags (int, optional) – Flags used to control information returned. Defaults to 0.

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10ENTITY_ID = 1
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_WITH_INFO
15
16try:
17    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
18    sz_engine = sz_abstract_factory.create_engine()
19    RESULT = sz_engine.reevaluate_entity(ENTITY_ID, FLAGS)
20    print(f"\nFile {__file__}:\n{RESULT}\n")
21except SzError as err:
22    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "DATA_SOURCE": "TEST",
 5    "RECORD_ID": "2",
 6    "AFFECTED_ENTITIES": [
 7        {
 8            "ENTITY_ID": 1
 9        }
10    ],
11    "INTERESTING_ENTITIES": {
12        "ENTITIES": []
13    }
14}
abstract reevaluate_record(data_source_code: str, record_id: str, flags: int = 0) str[source]

The reevaluate_record method reevaluates a specific record.

Parameters:
  • data_source_code (str) – Identifies the provenance of the data.

  • record_id (str) – The unique identifier within the records of the same data source.

  • flags (int, optional) – Flags used to control information returned. Defaults to 0.

Returns:

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

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10DATA_SOURCE_CODE = "CUSTOMERS"
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_WITH_INFO
15RECORD_ID = "1001"
16
17try:
18    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
19    sz_engine = sz_abstract_factory.create_engine()
20    RESULT = sz_engine.reevaluate_record(DATA_SOURCE_CODE, RECORD_ID, FLAGS)
21    print(f"\nFile {__file__}:\n{RESULT}\n")
22except SzError as err:
23    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "DATA_SOURCE": "CUSTOMERS",
 5    "RECORD_ID": "1001",
 6    "AFFECTED_ENTITIES": [
 7        {
 8            "ENTITY_ID": 35
 9        }
10    ],
11    "INTERESTING_ENTITIES": {
12        "ENTITIES": []
13    }
14}
abstract search_by_attributes(attributes: str, flags: int = <SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_ALL: 67123215>, search_profile: str = '') str[source]

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

Parameters:
  • attributes (str) – A JSON document with the attribute data to search for.

  • flags (int, optional) – _description_. Defaults to SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS.

  • search_profile (str) – The name of a configured search profile. Defaults to SEARCH.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3import json
 4
 5from senzing_xxxx import (
 6    SzAbstractFactory,
 7    SzAbstractFactoryParameters,
 8    SzEngineFlags,
 9    SzError,
10)
11
12ATTRIBUTES = json.dumps({"NAME_FULL": "BOB SMITH", "EMAIL_ADDRESS": "bsmith@work.com"})
13FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
14    # Differs based on which senzing_xxxx package is used.
15}
16FLAGS = SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS
17SEARCH_PROFILE = ""
18
19try:
20    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
21    sz_engine = sz_abstract_factory.create_engine()
22    RESULT = sz_engine.search_by_attributes(ATTRIBUTES, FLAGS, SEARCH_PROFILE)
23    print(f"\nFile {__file__}:\n{RESULT}\n")
24except SzError as err:
25    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted for easier reading.
  2{
  3    "RESOLVED_ENTITIES": [
  4        {
  5            "MATCH_INFO": {
  6                "MATCH_LEVEL_CODE": "RESOLVED",
  7                "MATCH_KEY": "+NAME+EMAIL",
  8                "ERRULE_CODE": "SF1_CNAME",
  9                "FEATURE_SCORES": {
 10                    "EMAIL": [
 11                        {
 12                            "INBOUND_FEAT_ID": 5,
 13                            "INBOUND_FEAT_DESC": "bsmith@work.com",
 14                            "INBOUND_FEAT_USAGE_TYPE": "",
 15                            "CANDIDATE_FEAT_ID": 5,
 16                            "CANDIDATE_FEAT_DESC": "bsmith@work.com",
 17                            "CANDIDATE_FEAT_USAGE_TYPE": "",
 18                            "SCORE": 100,
 19                            "ADDITIONAL_SCORES": {
 20                                "FULL_SCORE": 100
 21                            },
 22                            "SCORE_BUCKET": "SAME",
 23                            "SCORE_BEHAVIOR": "F1"
 24                        }
 25                    ],
 26                    "NAME": [
 27                        {
 28                            "INBOUND_FEAT_ID": -2,
 29                            "INBOUND_FEAT_DESC": "BOB SMITH",
 30                            "INBOUND_FEAT_USAGE_TYPE": "",
 31                            "CANDIDATE_FEAT_ID": 38,
 32                            "CANDIDATE_FEAT_DESC": "Bob J Smith",
 33                            "CANDIDATE_FEAT_USAGE_TYPE": "PRIMARY",
 34                            "SCORE": 93,
 35                            "ADDITIONAL_SCORES": {
 36                                "GENERATION_MATCH": -1,
 37                                "GNR_FN": 93,
 38                                "GNR_GN": -1,
 39                                "GNR_ON": -1,
 40                                "GNR_SN": -1
 41                            },
 42                            "SCORE_BUCKET": "CLOSE",
 43                            "SCORE_BEHAVIOR": "NAME"
 44                        },
 45                        {
 46                            "INBOUND_FEAT_ID": -2,
 47                            "INBOUND_FEAT_DESC": "BOB SMITH",
 48                            "INBOUND_FEAT_USAGE_TYPE": "",
 49                            "CANDIDATE_FEAT_ID": 1,
 50                            "CANDIDATE_FEAT_DESC": "Robert Smith",
 51                            "CANDIDATE_FEAT_USAGE_TYPE": "PRIMARY",
 52                            "SCORE": 97,
 53                            "ADDITIONAL_SCORES": {
 54                                "GENERATION_MATCH": -1,
 55                                "GNR_FN": 97,
 56                                "GNR_GN": -1,
 57                                "GNR_ON": -1,
 58                                "GNR_SN": -1
 59                            },
 60                            "SCORE_BUCKET": "CLOSE",
 61                            "SCORE_BEHAVIOR": "NAME"
 62                        }
 63                    ]
 64                }
 65            },
 66            "ENTITY": {
 67                "RESOLVED_ENTITY": {
 68                    "ENTITY_ID": 35,
 69                    "ENTITY_NAME": "Robert Smith",
 70                    "FEATURES": {
 71                        "ADDRESS": [
 72                            {
 73                                "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 74                                "LIB_FEAT_ID": 22,
 75                                "USAGE_TYPE": "HOME",
 76                                "FEAT_DESC_VALUES": [
 77                                    {
 78                                        "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 79                                        "LIB_FEAT_ID": 22
 80                                    }
 81                                ]
 82                            },
 83                            {
 84                                "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 85                                "LIB_FEAT_ID": 3,
 86                                "USAGE_TYPE": "MAILING",
 87                                "FEAT_DESC_VALUES": [
 88                                    {
 89                                        "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 90                                        "LIB_FEAT_ID": 3
 91                                    }
 92                                ]
 93                            }
 94                        ],
 95                        "DOB": [
 96                            {
 97                                "FEAT_DESC": "12/11/1978",
 98                                "LIB_FEAT_ID": 2,
 99                                "FEAT_DESC_VALUES": [
100                                    {
101                                        "FEAT_DESC": "12/11/1978",
102                                        "LIB_FEAT_ID": 2
103                                    },
104                                    {
105                                        "FEAT_DESC": "11/12/1978",
106                                        "LIB_FEAT_ID": 21
107                                    }
108                                ]
109                            }
110                        ],
111                        "EMAIL": [
112                            {
113                                "FEAT_DESC": "bsmith@work.com",
114                                "LIB_FEAT_ID": 5,
115                                "FEAT_DESC_VALUES": [
116                                    {
117                                        "FEAT_DESC": "bsmith@work.com",
118                                        "LIB_FEAT_ID": 5
119                                    }
120                                ]
121                            }
122                        ],
123                        "NAME": [
124                            {
125                                "FEAT_DESC": "Robert Smith",
126                                "LIB_FEAT_ID": 1,
127                                "USAGE_TYPE": "PRIMARY",
128                                "FEAT_DESC_VALUES": [
129                                    {
130                                        "FEAT_DESC": "Robert Smith",
131                                        "LIB_FEAT_ID": 1
132                                    },
133                                    {
134                                        "FEAT_DESC": "Bob J Smith",
135                                        "LIB_FEAT_ID": 38
136                                    },
137                                    {
138                                        "FEAT_DESC": "Bob Smith",
139                                        "LIB_FEAT_ID": 20
140                                    }
141                                ]
142                            }
143                        ],
144                        "PHONE": [
145                            {
146                                "FEAT_DESC": "702-919-1300",
147                                "LIB_FEAT_ID": 4,
148                                "USAGE_TYPE": "HOME",
149                                "FEAT_DESC_VALUES": [
150                                    {
151                                        "FEAT_DESC": "702-919-1300",
152                                        "LIB_FEAT_ID": 4
153                                    }
154                                ]
155                            },
156                            {
157                                "FEAT_DESC": "702-919-1300",
158                                "LIB_FEAT_ID": 4,
159                                "USAGE_TYPE": "MOBILE",
160                                "FEAT_DESC_VALUES": [
161                                    {
162                                        "FEAT_DESC": "702-919-1300",
163                                        "LIB_FEAT_ID": 4
164                                    }
165                                ]
166                            }
167                        ],
168                        "RECORD_TYPE": [
169                            {
170                                "FEAT_DESC": "PERSON",
171                                "LIB_FEAT_ID": 10,
172                                "FEAT_DESC_VALUES": [
173                                    {
174                                        "FEAT_DESC": "PERSON",
175                                        "LIB_FEAT_ID": 10
176                                    }
177                                ]
178                            }
179                        ]
180                    },
181                    "RECORD_SUMMARY": [
182                        {
183                            "DATA_SOURCE": "CUSTOMERS",
184                            "RECORD_COUNT": 3
185                        }
186                    ]
187                }
188            }
189        }
190    ]
191}
abstract why_entities(entity_id_1: int, entity_id_2: int, flags: int = <SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS: 96009152>) str[source]

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

Parameters:
  • entity_id_1 (int) – The entity ID for the starting entity of the search path.

  • entity_id_2 (int) – The entity ID for the ending entity of the search path.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_WHY_ENTITY_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10ENTITY_ID_1 = 1
11ENTITY_ID_2 = 4
12FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
13    # Differs based on which senzing_xxxx package is used.
14}
15FLAGS = SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS
16
17try:
18    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
19    sz_engine = sz_abstract_factory.create_engine()
20    RESULT = sz_engine.why_entities(
21        ENTITY_ID_1,
22        ENTITY_ID_2,
23        FLAGS,
24    )
25    print(f"\nFile {__file__}:\n{RESULT}\n")
26except SzError as err:
27    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted for easier reading.
  2
  3{
  4    "WHY_RESULTS": [
  5        {
  6            "ENTITY_ID": 1,
  7            "ENTITY_ID_2": 35,
  8            "MATCH_INFO": {
  9                "WHY_KEY": "",
 10                "WHY_ERRULE_CODE": "",
 11                "MATCH_LEVEL_CODE": "",
 12                "CANDIDATE_KEYS": {},
 13                "DISCLOSED_RELATIONS": {},
 14                "FEATURE_SCORES": {}
 15            }
 16        }
 17    ],
 18    "ENTITIES": [
 19        {
 20            "RESOLVED_ENTITY": {
 21                "ENTITY_ID": 1,
 22                "ENTITY_NAME": "",
 23                "FEATURES": {},
 24                "RECORD_SUMMARY": [
 25                    {
 26                        "DATA_SOURCE": "TEST",
 27                        "RECORD_COUNT": 1
 28                    }
 29                ],
 30                "RECORDS": [
 31                    {
 32                        "DATA_SOURCE": "TEST",
 33                        "RECORD_ID": "2",
 34                        "INTERNAL_ID": 1,
 35                        "MATCH_KEY": "",
 36                        "MATCH_LEVEL_CODE": "",
 37                        "ERRULE_CODE": "",
 38                        "FIRST_SEEN_DT": "2024-10-25T17:38:57Z",
 39                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
 40                    }
 41                ]
 42            },
 43            "RELATED_ENTITIES": []
 44        },
 45        {
 46            "RESOLVED_ENTITY": {
 47                "ENTITY_ID": 35,
 48                "ENTITY_NAME": "Robert Smith",
 49                "FEATURES": {
 50                    "ADDRESS": [
 51                        {
 52                            "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 53                            "LIB_FEAT_ID": 22,
 54                            "USAGE_TYPE": "HOME",
 55                            "FEAT_DESC_VALUES": [
 56                                {
 57                                    "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 58                                    "LIB_FEAT_ID": 22,
 59                                    "USED_FOR_CAND": "N",
 60                                    "USED_FOR_SCORING": "Y",
 61                                    "ENTITY_COUNT": 1,
 62                                    "CANDIDATE_CAP_REACHED": "N",
 63                                    "SCORING_CAP_REACHED": "N",
 64                                    "SUPPRESSED": "N"
 65                                }
 66                            ]
 67                        },
 68                        {
 69                            "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 70                            "LIB_FEAT_ID": 3,
 71                            "USAGE_TYPE": "MAILING",
 72                            "FEAT_DESC_VALUES": [
 73                                {
 74                                    "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 75                                    "LIB_FEAT_ID": 3,
 76                                    "USED_FOR_CAND": "N",
 77                                    "USED_FOR_SCORING": "Y",
 78                                    "ENTITY_COUNT": 1,
 79                                    "CANDIDATE_CAP_REACHED": "N",
 80                                    "SCORING_CAP_REACHED": "N",
 81                                    "SUPPRESSED": "N"
 82                                }
 83                            ]
 84                        }
 85                    ],
 86                    "ADDR_KEY": [
 87                        {
 88                            "FEAT_DESC": "123|MN||89132",
 89                            "LIB_FEAT_ID": 8,
 90                            "FEAT_DESC_VALUES": [
 91                                {
 92                                    "FEAT_DESC": "123|MN||89132",
 93                                    "LIB_FEAT_ID": 8,
 94                                    "USED_FOR_CAND": "Y",
 95                                    "USED_FOR_SCORING": "N",
 96                                    "ENTITY_COUNT": 1,
 97                                    "CANDIDATE_CAP_REACHED": "N",
 98                                    "SCORING_CAP_REACHED": "N",
 99                                    "SUPPRESSED": "N"
100                                }
101                            ]
102                        },
103                        {
104                            "FEAT_DESC": "123|MN||LS FKS",
105                            "LIB_FEAT_ID": 7,
106                            "FEAT_DESC_VALUES": [
107                                {
108                                    "FEAT_DESC": "123|MN||LS FKS",
109                                    "LIB_FEAT_ID": 7,
110                                    "USED_FOR_CAND": "Y",
111                                    "USED_FOR_SCORING": "N",
112                                    "ENTITY_COUNT": 1,
113                                    "CANDIDATE_CAP_REACHED": "N",
114                                    "SCORING_CAP_REACHED": "N",
115                                    "SUPPRESSED": "N"
116                                }
117                            ]
118                        },
119                        {
120                            "FEAT_DESC": "1515|ATL||89111",
121                            "LIB_FEAT_ID": 24,
122                            "FEAT_DESC_VALUES": [
123                                {
124                                    "FEAT_DESC": "1515|ATL||89111",
125                                    "LIB_FEAT_ID": 24,
126                                    "USED_FOR_CAND": "Y",
127                                    "USED_FOR_SCORING": "N",
128                                    "ENTITY_COUNT": 1,
129                                    "CANDIDATE_CAP_REACHED": "N",
130                                    "SCORING_CAP_REACHED": "N",
131                                    "SUPPRESSED": "N"
132                                }
133                            ]
134                        },
135                        {
136                            "FEAT_DESC": "1515|ATL||LS FKS",
137                            "LIB_FEAT_ID": 25,
138                            "FEAT_DESC_VALUES": [
139                                {
140                                    "FEAT_DESC": "1515|ATL||LS FKS",
141                                    "LIB_FEAT_ID": 25,
142                                    "USED_FOR_CAND": "Y",
143                                    "USED_FOR_SCORING": "N",
144                                    "ENTITY_COUNT": 1,
145                                    "CANDIDATE_CAP_REACHED": "N",
146                                    "SCORING_CAP_REACHED": "N",
147                                    "SUPPRESSED": "N"
148                                }
149                            ]
150                        }
151                    ],
152                    "DOB": [
153                        {
154                            "FEAT_DESC": "12/11/1978",
155                            "LIB_FEAT_ID": 2,
156                            "FEAT_DESC_VALUES": [
157                                {
158                                    "FEAT_DESC": "12/11/1978",
159                                    "LIB_FEAT_ID": 2,
160                                    "USED_FOR_CAND": "Y",
161                                    "USED_FOR_SCORING": "Y",
162                                    "ENTITY_COUNT": 1,
163                                    "CANDIDATE_CAP_REACHED": "N",
164                                    "SCORING_CAP_REACHED": "N",
165                                    "SUPPRESSED": "N"
166                                },
167                                {
168                                    "FEAT_DESC": "11/12/1978",
169                                    "LIB_FEAT_ID": 21,
170                                    "USED_FOR_CAND": "Y",
171                                    "USED_FOR_SCORING": "Y",
172                                    "ENTITY_COUNT": 1,
173                                    "CANDIDATE_CAP_REACHED": "N",
174                                    "SCORING_CAP_REACHED": "N",
175                                    "SUPPRESSED": "N"
176                                }
177                            ]
178                        }
179                    ],
180                    "EMAIL": [
181                        {
182                            "FEAT_DESC": "bsmith@work.com",
183                            "LIB_FEAT_ID": 5,
184                            "FEAT_DESC_VALUES": [
185                                {
186                                    "FEAT_DESC": "bsmith@work.com",
187                                    "LIB_FEAT_ID": 5,
188                                    "USED_FOR_CAND": "N",
189                                    "USED_FOR_SCORING": "Y",
190                                    "ENTITY_COUNT": 1,
191                                    "CANDIDATE_CAP_REACHED": "N",
192                                    "SCORING_CAP_REACHED": "N",
193                                    "SUPPRESSED": "N"
194                                }
195                            ]
196                        }
197                    ],
198                    "EMAIL_KEY": [
199                        {
200                            "FEAT_DESC": "bsmith@WORK.COM",
201                            "LIB_FEAT_ID": 11,
202                            "FEAT_DESC_VALUES": [
203                                {
204                                    "FEAT_DESC": "bsmith@WORK.COM",
205                                    "LIB_FEAT_ID": 11,
206                                    "USED_FOR_CAND": "Y",
207                                    "USED_FOR_SCORING": "N",
208                                    "ENTITY_COUNT": 1,
209                                    "CANDIDATE_CAP_REACHED": "N",
210                                    "SCORING_CAP_REACHED": "N",
211                                    "SUPPRESSED": "N"
212                                }
213                            ]
214                        }
215                    ],
216                    "NAME": [
217                        {
218                            "FEAT_DESC": "Robert Smith",
219                            "LIB_FEAT_ID": 1,
220                            "USAGE_TYPE": "PRIMARY",
221                            "FEAT_DESC_VALUES": [
222                                {
223                                    "FEAT_DESC": "Robert Smith",
224                                    "LIB_FEAT_ID": 1,
225                                    "USED_FOR_CAND": "N",
226                                    "USED_FOR_SCORING": "Y",
227                                    "ENTITY_COUNT": 1,
228                                    "CANDIDATE_CAP_REACHED": "N",
229                                    "SCORING_CAP_REACHED": "N",
230                                    "SUPPRESSED": "N"
231                                },
232                                {
233                                    "FEAT_DESC": "Bob J Smith",
234                                    "LIB_FEAT_ID": 38,
235                                    "USED_FOR_CAND": "N",
236                                    "USED_FOR_SCORING": "Y",
237                                    "ENTITY_COUNT": 1,
238                                    "CANDIDATE_CAP_REACHED": "N",
239                                    "SCORING_CAP_REACHED": "N",
240                                    "SUPPRESSED": "N"
241                                },
242                                {
243                                    "FEAT_DESC": "Bob Smith",
244                                    "LIB_FEAT_ID": 20,
245                                    "USED_FOR_CAND": "N",
246                                    "USED_FOR_SCORING": "Y",
247                                    "ENTITY_COUNT": 1,
248                                    "CANDIDATE_CAP_REACHED": "N",
249                                    "SCORING_CAP_REACHED": "N",
250                                    "SUPPRESSED": "Y"
251                                }
252                            ]
253                        }
254                    ],
255                    "NAMEADDR_KEY": [
256                        {
257                            "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
258                            "LIB_FEAT_ID": 27,
259                            "FEAT_DESC_VALUES": [
260                                {
261                                    "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
262                                    "LIB_FEAT_ID": 27,
263                                    "USED_FOR_CAND": "Y",
264                                    "USED_FOR_SCORING": "N",
265                                    "ENTITY_COUNT": 1,
266                                    "CANDIDATE_CAP_REACHED": "N",
267                                    "SCORING_CAP_REACHED": "N",
268                                    "SUPPRESSED": "N"
269                                }
270                            ]
271                        },
272                        {
273                            "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
274                            "LIB_FEAT_ID": 28,
275                            "FEAT_DESC_VALUES": [
276                                {
277                                    "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
278                                    "LIB_FEAT_ID": 28,
279                                    "USED_FOR_CAND": "Y",
280                                    "USED_FOR_SCORING": "N",
281                                    "ENTITY_COUNT": 1,
282                                    "CANDIDATE_CAP_REACHED": "N",
283                                    "SCORING_CAP_REACHED": "N",
284                                    "SUPPRESSED": "N"
285                                }
286                            ]
287                        },
288                        {
289                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||89132",
290                            "LIB_FEAT_ID": 12,
291                            "FEAT_DESC_VALUES": [
292                                {
293                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||89132",
294                                    "LIB_FEAT_ID": 12,
295                                    "USED_FOR_CAND": "Y",
296                                    "USED_FOR_SCORING": "N",
297                                    "ENTITY_COUNT": 1,
298                                    "CANDIDATE_CAP_REACHED": "N",
299                                    "SCORING_CAP_REACHED": "N",
300                                    "SUPPRESSED": "N"
301                                }
302                            ]
303                        },
304                        {
305                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||LS FKS",
306                            "LIB_FEAT_ID": 13,
307                            "FEAT_DESC_VALUES": [
308                                {
309                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||LS FKS",
310                                    "LIB_FEAT_ID": 13,
311                                    "USED_FOR_CAND": "Y",
312                                    "USED_FOR_SCORING": "N",
313                                    "ENTITY_COUNT": 1,
314                                    "CANDIDATE_CAP_REACHED": "N",
315                                    "SCORING_CAP_REACHED": "N",
316                                    "SUPPRESSED": "N"
317                                }
318                            ]
319                        },
320                        {
321                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
322                            "LIB_FEAT_ID": 29,
323                            "FEAT_DESC_VALUES": [
324                                {
325                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
326                                    "LIB_FEAT_ID": 29,
327                                    "USED_FOR_CAND": "Y",
328                                    "USED_FOR_SCORING": "N",
329                                    "ENTITY_COUNT": 1,
330                                    "CANDIDATE_CAP_REACHED": "N",
331                                    "SCORING_CAP_REACHED": "N",
332                                    "SUPPRESSED": "N"
333                                }
334                            ]
335                        },
336                        {
337                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
338                            "LIB_FEAT_ID": 26,
339                            "FEAT_DESC_VALUES": [
340                                {
341                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
342                                    "LIB_FEAT_ID": 26,
343                                    "USED_FOR_CAND": "Y",
344                                    "USED_FOR_SCORING": "N",
345                                    "ENTITY_COUNT": 1,
346                                    "CANDIDATE_CAP_REACHED": "N",
347                                    "SCORING_CAP_REACHED": "N",
348                                    "SUPPRESSED": "N"
349                                }
350                            ]
351                        }
352                    ],
353                    "NAMEDATE_KEY": [
354                        {
355                            "FEAT_DESC": "J|PP|SM0|DOB.MMDD_HASH=1211",
356                            "LIB_FEAT_ID": 43,
357                            "FEAT_DESC_VALUES": [
358                                {
359                                    "FEAT_DESC": "J|PP|SM0|DOB.MMDD_HASH=1211",
360                                    "LIB_FEAT_ID": 43,
361                                    "USED_FOR_CAND": "Y",
362                                    "USED_FOR_SCORING": "N",
363                                    "ENTITY_COUNT": 1,
364                                    "CANDIDATE_CAP_REACHED": "N",
365                                    "SCORING_CAP_REACHED": "N",
366                                    "SUPPRESSED": "N"
367                                }
368                            ]
369                        },
370                        {
371                            "FEAT_DESC": "J|PP|SM0|DOB.MMYY_HASH=1278",
372                            "LIB_FEAT_ID": 41,
373                            "FEAT_DESC_VALUES": [
374                                {
375                                    "FEAT_DESC": "J|PP|SM0|DOB.MMYY_HASH=1278",
376                                    "LIB_FEAT_ID": 41,
377                                    "USED_FOR_CAND": "Y",
378                                    "USED_FOR_SCORING": "N",
379                                    "ENTITY_COUNT": 1,
380                                    "CANDIDATE_CAP_REACHED": "N",
381                                    "SCORING_CAP_REACHED": "N",
382                                    "SUPPRESSED": "N"
383                                }
384                            ]
385                        },
386                        {
387                            "FEAT_DESC": "J|PP|SM0|DOB=71211",
388                            "LIB_FEAT_ID": 40,
389                            "FEAT_DESC_VALUES": [
390                                {
391                                    "FEAT_DESC": "J|PP|SM0|DOB=71211",
392                                    "LIB_FEAT_ID": 40,
393                                    "USED_FOR_CAND": "Y",
394                                    "USED_FOR_SCORING": "N",
395                                    "ENTITY_COUNT": 1,
396                                    "CANDIDATE_CAP_REACHED": "N",
397                                    "SCORING_CAP_REACHED": "N",
398                                    "SUPPRESSED": "N"
399                                }
400                            ]
401                        },
402                        {
403                            "FEAT_DESC": "PP|SM0|DOB.MMDD_HASH=1211",
404                            "LIB_FEAT_ID": 32,
405                            "FEAT_DESC_VALUES": [
406                                {
407                                    "FEAT_DESC": "PP|SM0|DOB.MMDD_HASH=1211",
408                                    "LIB_FEAT_ID": 32,
409                                    "USED_FOR_CAND": "Y",
410                                    "USED_FOR_SCORING": "N",
411                                    "ENTITY_COUNT": 1,
412                                    "CANDIDATE_CAP_REACHED": "N",
413                                    "SCORING_CAP_REACHED": "N",
414                                    "SUPPRESSED": "N"
415                                }
416                            ]
417                        },
418                        {
419                            "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1178",
420                            "LIB_FEAT_ID": 33,
421                            "FEAT_DESC_VALUES": [
422                                {
423                                    "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1178",
424                                    "LIB_FEAT_ID": 33,
425                                    "USED_FOR_CAND": "Y",
426                                    "USED_FOR_SCORING": "N",
427                                    "ENTITY_COUNT": 1,
428                                    "CANDIDATE_CAP_REACHED": "N",
429                                    "SCORING_CAP_REACHED": "N",
430                                    "SUPPRESSED": "N"
431                                }
432                            ]
433                        },
434                        {
435                            "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1278",
436                            "LIB_FEAT_ID": 42,
437                            "FEAT_DESC_VALUES": [
438                                {
439                                    "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1278",
440                                    "LIB_FEAT_ID": 42,
441                                    "USED_FOR_CAND": "Y",
442                                    "USED_FOR_SCORING": "N",
443                                    "ENTITY_COUNT": 1,
444                                    "CANDIDATE_CAP_REACHED": "N",
445                                    "SCORING_CAP_REACHED": "N",
446                                    "SUPPRESSED": "N"
447                                }
448                            ]
449                        },
450                        {
451                            "FEAT_DESC": "PP|SM0|DOB=71211",
452                            "LIB_FEAT_ID": 31,
453                            "FEAT_DESC_VALUES": [
454                                {
455                                    "FEAT_DESC": "PP|SM0|DOB=71211",
456                                    "LIB_FEAT_ID": 31,
457                                    "USED_FOR_CAND": "Y",
458                                    "USED_FOR_SCORING": "N",
459                                    "ENTITY_COUNT": 1,
460                                    "CANDIDATE_CAP_REACHED": "N",
461                                    "SCORING_CAP_REACHED": "N",
462                                    "SUPPRESSED": "N"
463                                }
464                            ]
465                        },
466                        {
467                            "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211",
468                            "LIB_FEAT_ID": 14,
469                            "FEAT_DESC_VALUES": [
470                                {
471                                    "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211",
472                                    "LIB_FEAT_ID": 14,
473                                    "USED_FOR_CAND": "Y",
474                                    "USED_FOR_SCORING": "N",
475                                    "ENTITY_COUNT": 1,
476                                    "CANDIDATE_CAP_REACHED": "N",
477                                    "SCORING_CAP_REACHED": "N",
478                                    "SUPPRESSED": "N"
479                                }
480                            ]
481                        },
482                        {
483                            "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1178",
484                            "LIB_FEAT_ID": 30,
485                            "FEAT_DESC_VALUES": [
486                                {
487                                    "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1178",
488                                    "LIB_FEAT_ID": 30,
489                                    "USED_FOR_CAND": "Y",
490                                    "USED_FOR_SCORING": "N",
491                                    "ENTITY_COUNT": 1,
492                                    "CANDIDATE_CAP_REACHED": "N",
493                                    "SCORING_CAP_REACHED": "N",
494                                    "SUPPRESSED": "N"
495                                }
496                            ]
497                        },
498                        {
499                            "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1278",
500                            "LIB_FEAT_ID": 16,
501                            "FEAT_DESC_VALUES": [
502                                {
503                                    "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1278",
504                                    "LIB_FEAT_ID": 16,
505                                    "USED_FOR_CAND": "Y",
506                                    "USED_FOR_SCORING": "N",
507                                    "ENTITY_COUNT": 1,
508                                    "CANDIDATE_CAP_REACHED": "N",
509                                    "SCORING_CAP_REACHED": "N",
510                                    "SUPPRESSED": "N"
511                                }
512                            ]
513                        },
514                        {
515                            "FEAT_DESC": "RPRT|SM0|DOB=71211",
516                            "LIB_FEAT_ID": 15,
517                            "FEAT_DESC_VALUES": [
518                                {
519                                    "FEAT_DESC": "RPRT|SM0|DOB=71211",
520                                    "LIB_FEAT_ID": 15,
521                                    "USED_FOR_CAND": "Y",
522                                    "USED_FOR_SCORING": "N",
523                                    "ENTITY_COUNT": 1,
524                                    "CANDIDATE_CAP_REACHED": "N",
525                                    "SCORING_CAP_REACHED": "N",
526                                    "SUPPRESSED": "N"
527                                }
528                            ]
529                        }
530                    ],
531                    "NAMEPHONE_KEY": [
532                        {
533                            "FEAT_DESC": "PP|SM0|PHONE.PHONE_LAST_5=91300",
534                            "LIB_FEAT_ID": 37,
535                            "FEAT_DESC_VALUES": [
536                                {
537                                    "FEAT_DESC": "PP|SM0|PHONE.PHONE_LAST_5=91300",
538                                    "LIB_FEAT_ID": 37,
539                                    "USED_FOR_CAND": "Y",
540                                    "USED_FOR_SCORING": "N",
541                                    "ENTITY_COUNT": 1,
542                                    "CANDIDATE_CAP_REACHED": "N",
543                                    "SCORING_CAP_REACHED": "N",
544                                    "SUPPRESSED": "N"
545                                }
546                            ]
547                        },
548                        {
549                            "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300",
550                            "LIB_FEAT_ID": 19,
551                            "FEAT_DESC_VALUES": [
552                                {
553                                    "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300",
554                                    "LIB_FEAT_ID": 19,
555                                    "USED_FOR_CAND": "Y",
556                                    "USED_FOR_SCORING": "N",
557                                    "ENTITY_COUNT": 1,
558                                    "CANDIDATE_CAP_REACHED": "N",
559                                    "SCORING_CAP_REACHED": "N",
560                                    "SUPPRESSED": "N"
561                                }
562                            ]
563                        }
564                    ],
565                    "NAMEREGION_KEY": [
566                        {
567                            "FEAT_DESC": "PP|SM0|ADDRESS.CITY_STD=LS FKS",
568                            "LIB_FEAT_ID": 36,
569                            "FEAT_DESC_VALUES": [
570                                {
571                                    "FEAT_DESC": "PP|SM0|ADDRESS.CITY_STD=LS FKS",
572                                    "LIB_FEAT_ID": 36,
573                                    "USED_FOR_CAND": "Y",
574                                    "USED_FOR_SCORING": "N",
575                                    "ENTITY_COUNT": 1,
576                                    "CANDIDATE_CAP_REACHED": "N",
577                                    "SCORING_CAP_REACHED": "N",
578                                    "SUPPRESSED": "N"
579                                }
580                            ]
581                        },
582                        {
583                            "FEAT_DESC": "PP|SM0|POST=89111",
584                            "LIB_FEAT_ID": 35,
585                            "FEAT_DESC_VALUES": [
586                                {
587                                    "FEAT_DESC": "PP|SM0|POST=89111",
588                                    "LIB_FEAT_ID": 35,
589                                    "USED_FOR_CAND": "Y",
590                                    "USED_FOR_SCORING": "N",
591                                    "ENTITY_COUNT": 1,
592                                    "CANDIDATE_CAP_REACHED": "N",
593                                    "SCORING_CAP_REACHED": "N",
594                                    "SUPPRESSED": "N"
595                                }
596                            ]
597                        },
598                        {
599                            "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS",
600                            "LIB_FEAT_ID": 18,
601                            "FEAT_DESC_VALUES": [
602                                {
603                                    "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS",
604                                    "LIB_FEAT_ID": 18,
605                                    "USED_FOR_CAND": "Y",
606                                    "USED_FOR_SCORING": "N",
607                                    "ENTITY_COUNT": 1,
608                                    "CANDIDATE_CAP_REACHED": "N",
609                                    "SCORING_CAP_REACHED": "N",
610                                    "SUPPRESSED": "N"
611                                }
612                            ]
613                        },
614                        {
615                            "FEAT_DESC": "RPRT|SM0|POST=89111",
616                            "LIB_FEAT_ID": 34,
617                            "FEAT_DESC_VALUES": [
618                                {
619                                    "FEAT_DESC": "RPRT|SM0|POST=89111",
620                                    "LIB_FEAT_ID": 34,
621                                    "USED_FOR_CAND": "Y",
622                                    "USED_FOR_SCORING": "N",
623                                    "ENTITY_COUNT": 1,
624                                    "CANDIDATE_CAP_REACHED": "N",
625                                    "SCORING_CAP_REACHED": "N",
626                                    "SUPPRESSED": "N"
627                                }
628                            ]
629                        },
630                        {
631                            "FEAT_DESC": "RPRT|SM0|POST=89132",
632                            "LIB_FEAT_ID": 17,
633                            "FEAT_DESC_VALUES": [
634                                {
635                                    "FEAT_DESC": "RPRT|SM0|POST=89132",
636                                    "LIB_FEAT_ID": 17,
637                                    "USED_FOR_CAND": "Y",
638                                    "USED_FOR_SCORING": "N",
639                                    "ENTITY_COUNT": 1,
640                                    "CANDIDATE_CAP_REACHED": "N",
641                                    "SCORING_CAP_REACHED": "N",
642                                    "SUPPRESSED": "N"
643                                }
644                            ]
645                        }
646                    ],
647                    "NAME_KEY": [
648                        {
649                            "FEAT_DESC": "J|PP|SM0",
650                            "LIB_FEAT_ID": 39,
651                            "FEAT_DESC_VALUES": [
652                                {
653                                    "FEAT_DESC": "J|PP|SM0",
654                                    "LIB_FEAT_ID": 39,
655                                    "USED_FOR_CAND": "Y",
656                                    "USED_FOR_SCORING": "N",
657                                    "ENTITY_COUNT": 1,
658                                    "CANDIDATE_CAP_REACHED": "N",
659                                    "SCORING_CAP_REACHED": "N",
660                                    "SUPPRESSED": "N"
661                                }
662                            ]
663                        },
664                        {
665                            "FEAT_DESC": "PP|SM0",
666                            "LIB_FEAT_ID": 23,
667                            "FEAT_DESC_VALUES": [
668                                {
669                                    "FEAT_DESC": "PP|SM0",
670                                    "LIB_FEAT_ID": 23,
671                                    "USED_FOR_CAND": "Y",
672                                    "USED_FOR_SCORING": "N",
673                                    "ENTITY_COUNT": 1,
674                                    "CANDIDATE_CAP_REACHED": "N",
675                                    "SCORING_CAP_REACHED": "N",
676                                    "SUPPRESSED": "N"
677                                }
678                            ]
679                        },
680                        {
681                            "FEAT_DESC": "RPRT|SM0",
682                            "LIB_FEAT_ID": 6,
683                            "FEAT_DESC_VALUES": [
684                                {
685                                    "FEAT_DESC": "RPRT|SM0",
686                                    "LIB_FEAT_ID": 6,
687                                    "USED_FOR_CAND": "Y",
688                                    "USED_FOR_SCORING": "N",
689                                    "ENTITY_COUNT": 1,
690                                    "CANDIDATE_CAP_REACHED": "N",
691                                    "SCORING_CAP_REACHED": "N",
692                                    "SUPPRESSED": "N"
693                                }
694                            ]
695                        }
696                    ],
697                    "PHONE": [
698                        {
699                            "FEAT_DESC": "702-919-1300",
700                            "LIB_FEAT_ID": 4,
701                            "USAGE_TYPE": "HOME",
702                            "FEAT_DESC_VALUES": [
703                                {
704                                    "FEAT_DESC": "702-919-1300",
705                                    "LIB_FEAT_ID": 4,
706                                    "USED_FOR_CAND": "N",
707                                    "USED_FOR_SCORING": "Y",
708                                    "ENTITY_COUNT": 1,
709                                    "CANDIDATE_CAP_REACHED": "N",
710                                    "SCORING_CAP_REACHED": "N",
711                                    "SUPPRESSED": "N"
712                                }
713                            ]
714                        },
715                        {
716                            "FEAT_DESC": "702-919-1300",
717                            "LIB_FEAT_ID": 4,
718                            "USAGE_TYPE": "MOBILE",
719                            "FEAT_DESC_VALUES": [
720                                {
721                                    "FEAT_DESC": "702-919-1300",
722                                    "LIB_FEAT_ID": 4,
723                                    "USED_FOR_CAND": "N",
724                                    "USED_FOR_SCORING": "Y",
725                                    "ENTITY_COUNT": 1,
726                                    "CANDIDATE_CAP_REACHED": "N",
727                                    "SCORING_CAP_REACHED": "N",
728                                    "SUPPRESSED": "N"
729                                }
730                            ]
731                        }
732                    ],
733                    "PHONE_KEY": [
734                        {
735                            "FEAT_DESC": "7029191300",
736                            "LIB_FEAT_ID": 9,
737                            "FEAT_DESC_VALUES": [
738                                {
739                                    "FEAT_DESC": "7029191300",
740                                    "LIB_FEAT_ID": 9,
741                                    "USED_FOR_CAND": "Y",
742                                    "USED_FOR_SCORING": "N",
743                                    "ENTITY_COUNT": 1,
744                                    "CANDIDATE_CAP_REACHED": "N",
745                                    "SCORING_CAP_REACHED": "N",
746                                    "SUPPRESSED": "N"
747                                }
748                            ]
749                        }
750                    ],
751                    "RECORD_TYPE": [
752                        {
753                            "FEAT_DESC": "PERSON",
754                            "LIB_FEAT_ID": 10,
755                            "FEAT_DESC_VALUES": [
756                                {
757                                    "FEAT_DESC": "PERSON",
758                                    "LIB_FEAT_ID": 10,
759                                    "USED_FOR_CAND": "N",
760                                    "USED_FOR_SCORING": "Y",
761                                    "ENTITY_COUNT": 100,
762                                    "CANDIDATE_CAP_REACHED": "N",
763                                    "SCORING_CAP_REACHED": "N",
764                                    "SUPPRESSED": "N"
765                                }
766                            ]
767                        }
768                    ]
769                },
770                "RECORD_SUMMARY": [
771                    {
772                        "DATA_SOURCE": "CUSTOMERS",
773                        "RECORD_COUNT": 3
774                    }
775                ],
776                "RECORDS": [
777                    {
778                        "DATA_SOURCE": "CUSTOMERS",
779                        "RECORD_ID": "1001",
780                        "INTERNAL_ID": 35,
781                        "MATCH_KEY": "",
782                        "MATCH_LEVEL_CODE": "",
783                        "ERRULE_CODE": "",
784                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
785                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
786                    },
787                    {
788                        "DATA_SOURCE": "CUSTOMERS",
789                        "RECORD_ID": "1002",
790                        "INTERNAL_ID": 36,
791                        "MATCH_KEY": "+NAME+DOB+PHONE",
792                        "MATCH_LEVEL_CODE": "RESOLVED",
793                        "ERRULE_CODE": "CNAME_CFF_CEXCL",
794                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
795                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
796                    },
797                    {
798                        "DATA_SOURCE": "CUSTOMERS",
799                        "RECORD_ID": "1003",
800                        "INTERNAL_ID": 37,
801                        "MATCH_KEY": "+NAME+DOB+EMAIL",
802                        "MATCH_LEVEL_CODE": "RESOLVED",
803                        "ERRULE_CODE": "SF1_PNAME_CSTAB",
804                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
805                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
806                    }
807                ]
808            },
809            "RELATED_ENTITIES": []
810        }
811    ]
812}
abstract why_record_in_entity(data_source_code: str, record_id: str, flags: int = <SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS: 96009152>) str[source]

The why_record_in_entity method determines why a record is included in an entity.

Parameters:
  • data_source_code (str) – Identifies the provenance of the data.

  • record_id (str) – The unique identifier within the records of the same data source.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_WHY_ENTITY_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10DATA_SOURCE_CODE = "CUSTOMERS"
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_WHY_RECORDS_DEFAULT_FLAGS
15RECORD_ID = "1001"
16
17try:
18    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
19    sz_engine = sz_abstract_factory.create_engine()
20    RESULT = sz_engine.why_record_in_entity(
21        DATA_SOURCE_CODE,
22        RECORD_ID,
23        FLAGS,
24    )
25    print(f"\nFile {__file__}:\n{RESULT}\n")
26except SzError as err:
27    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted for easier reading.
  2{
  3    "WHY_RESULTS": [
  4        {
  5            "INTERNAL_ID": 35,
  6            "ENTITY_ID": 35,
  7            "FOCUS_RECORDS": [
  8                {
  9                    "DATA_SOURCE": "CUSTOMERS",
 10                    "RECORD_ID": "1001"
 11                }
 12            ],
 13            "MATCH_INFO": {
 14                "WHY_KEY": "+NAME+DOB+PHONE+EMAIL",
 15                "WHY_ERRULE_CODE": "SF1_SNAME_CFF_CSTAB",
 16                "MATCH_LEVEL_CODE": "RESOLVED",
 17                "CANDIDATE_KEYS": {
 18                    "DOB": [
 19                        {
 20                            "FEAT_ID": 2,
 21                            "FEAT_DESC": "12/11/1978"
 22                        }
 23                    ],
 24                    "EMAIL_KEY": [
 25                        {
 26                            "FEAT_ID": 11,
 27                            "FEAT_DESC": "bsmith@WORK.COM"
 28                        }
 29                    ],
 30                    "NAMEDATE_KEY": [
 31                        {
 32                            "FEAT_ID": 14,
 33                            "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211"
 34                        },
 35                        {
 36                            "FEAT_ID": 15,
 37                            "FEAT_DESC": "RPRT|SM0|DOB=71211"
 38                        },
 39                        {
 40                            "FEAT_ID": 16,
 41                            "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1278"
 42                        }
 43                    ],
 44                    "NAMEPHONE_KEY": [
 45                        {
 46                            "FEAT_ID": 19,
 47                            "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300"
 48                        }
 49                    ],
 50                    "NAMEREGION_KEY": [
 51                        {
 52                            "FEAT_ID": 18,
 53                            "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS"
 54                        }
 55                    ],
 56                    "NAME_KEY": [
 57                        {
 58                            "FEAT_ID": 6,
 59                            "FEAT_DESC": "RPRT|SM0"
 60                        }
 61                    ],
 62                    "PHONE_KEY": [
 63                        {
 64                            "FEAT_ID": 9,
 65                            "FEAT_DESC": "7029191300"
 66                        }
 67                    ]
 68                },
 69                "FEATURE_SCORES": {
 70                    "ADDRESS": [
 71                        {
 72                            "INBOUND_FEAT_ID": 3,
 73                            "INBOUND_FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 74                            "INBOUND_FEAT_USAGE_TYPE": "MAILING",
 75                            "CANDIDATE_FEAT_ID": 22,
 76                            "CANDIDATE_FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 77                            "CANDIDATE_FEAT_USAGE_TYPE": "HOME",
 78                            "SCORE": 42,
 79                            "ADDITIONAL_SCORES": {
 80                                "FULL_SCORE": 42
 81                            },
 82                            "SCORE_BUCKET": "NO_CHANCE",
 83                            "SCORE_BEHAVIOR": "FF"
 84                        }
 85                    ],
 86                    "DOB": [
 87                        {
 88                            "INBOUND_FEAT_ID": 2,
 89                            "INBOUND_FEAT_DESC": "12/11/1978",
 90                            "INBOUND_FEAT_USAGE_TYPE": "",
 91                            "CANDIDATE_FEAT_ID": 2,
 92                            "CANDIDATE_FEAT_DESC": "12/11/1978",
 93                            "CANDIDATE_FEAT_USAGE_TYPE": "",
 94                            "SCORE": 100,
 95                            "ADDITIONAL_SCORES": {
 96                                "FULL_SCORE": 100
 97                            },
 98                            "SCORE_BUCKET": "SAME",
 99                            "SCORE_BEHAVIOR": "FMES"
100                        }
101                    ],
102                    "EMAIL": [
103                        {
104                            "INBOUND_FEAT_ID": 5,
105                            "INBOUND_FEAT_DESC": "bsmith@work.com",
106                            "INBOUND_FEAT_USAGE_TYPE": "",
107                            "CANDIDATE_FEAT_ID": 5,
108                            "CANDIDATE_FEAT_DESC": "bsmith@work.com",
109                            "CANDIDATE_FEAT_USAGE_TYPE": "",
110                            "SCORE": 100,
111                            "ADDITIONAL_SCORES": {
112                                "FULL_SCORE": 100
113                            },
114                            "SCORE_BUCKET": "SAME",
115                            "SCORE_BEHAVIOR": "F1"
116                        }
117                    ],
118                    "NAME": [
119                        {
120                            "INBOUND_FEAT_ID": 1,
121                            "INBOUND_FEAT_DESC": "Robert Smith",
122                            "INBOUND_FEAT_USAGE_TYPE": "PRIMARY",
123                            "CANDIDATE_FEAT_ID": 38,
124                            "CANDIDATE_FEAT_DESC": "Bob J Smith",
125                            "CANDIDATE_FEAT_USAGE_TYPE": "PRIMARY",
126                            "SCORE": 90,
127                            "ADDITIONAL_SCORES": {
128                                "GENERATION_MATCH": -1,
129                                "GNR_FN": 90,
130                                "GNR_GN": 88,
131                                "GNR_ON": -1,
132                                "GNR_SN": 100
133                            },
134                            "SCORE_BUCKET": "CLOSE",
135                            "SCORE_BEHAVIOR": "NAME"
136                        },
137                        {
138                            "INBOUND_FEAT_ID": 1,
139                            "INBOUND_FEAT_DESC": "Robert Smith",
140                            "INBOUND_FEAT_USAGE_TYPE": "PRIMARY",
141                            "CANDIDATE_FEAT_ID": 20,
142                            "CANDIDATE_FEAT_DESC": "Bob Smith",
143                            "CANDIDATE_FEAT_USAGE_TYPE": "PRIMARY",
144                            "SCORE": 97,
145                            "ADDITIONAL_SCORES": {
146                                "GENERATION_MATCH": -1,
147                                "GNR_FN": 97,
148                                "GNR_GN": 95,
149                                "GNR_ON": -1,
150                                "GNR_SN": 100
151                            },
152                            "SCORE_BUCKET": "CLOSE",
153                            "SCORE_BEHAVIOR": "NAME"
154                        }
155                    ],
156                    "PHONE": [
157                        {
158                            "INBOUND_FEAT_ID": 4,
159                            "INBOUND_FEAT_DESC": "702-919-1300",
160                            "INBOUND_FEAT_USAGE_TYPE": "HOME",
161                            "CANDIDATE_FEAT_ID": 4,
162                            "CANDIDATE_FEAT_DESC": "702-919-1300",
163                            "CANDIDATE_FEAT_USAGE_TYPE": "MOBILE",
164                            "SCORE": 100,
165                            "ADDITIONAL_SCORES": {
166                                "FULL_SCORE": 100
167                            },
168                            "SCORE_BUCKET": "SAME",
169                            "SCORE_BEHAVIOR": "FF"
170                        }
171                    ],
172                    "RECORD_TYPE": [
173                        {
174                            "INBOUND_FEAT_ID": 10,
175                            "INBOUND_FEAT_DESC": "PERSON",
176                            "INBOUND_FEAT_USAGE_TYPE": "",
177                            "CANDIDATE_FEAT_ID": 10,
178                            "CANDIDATE_FEAT_DESC": "PERSON",
179                            "CANDIDATE_FEAT_USAGE_TYPE": "",
180                            "SCORE": 100,
181                            "ADDITIONAL_SCORES": {
182                                "FULL_SCORE": 100
183                            },
184                            "SCORE_BUCKET": "SAME",
185                            "SCORE_BEHAVIOR": "FVME"
186                        }
187                    ]
188                }
189            }
190        }
191    ],
192    "ENTITIES": [
193        {
194            "RESOLVED_ENTITY": {
195                "ENTITY_ID": 35,
196                "ENTITY_NAME": "Robert Smith",
197                "FEATURES": {
198                    "ADDRESS": [
199                        {
200                            "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
201                            "LIB_FEAT_ID": 22,
202                            "USAGE_TYPE": "HOME",
203                            "FEAT_DESC_VALUES": [
204                                {
205                                    "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
206                                    "LIB_FEAT_ID": 22,
207                                    "USED_FOR_CAND": "N",
208                                    "USED_FOR_SCORING": "Y",
209                                    "ENTITY_COUNT": 1,
210                                    "CANDIDATE_CAP_REACHED": "N",
211                                    "SCORING_CAP_REACHED": "N",
212                                    "SUPPRESSED": "N"
213                                }
214                            ]
215                        },
216                        {
217                            "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
218                            "LIB_FEAT_ID": 3,
219                            "USAGE_TYPE": "MAILING",
220                            "FEAT_DESC_VALUES": [
221                                {
222                                    "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
223                                    "LIB_FEAT_ID": 3,
224                                    "USED_FOR_CAND": "N",
225                                    "USED_FOR_SCORING": "Y",
226                                    "ENTITY_COUNT": 1,
227                                    "CANDIDATE_CAP_REACHED": "N",
228                                    "SCORING_CAP_REACHED": "N",
229                                    "SUPPRESSED": "N"
230                                }
231                            ]
232                        }
233                    ],
234                    "ADDR_KEY": [
235                        {
236                            "FEAT_DESC": "123|MN||89132",
237                            "LIB_FEAT_ID": 8,
238                            "FEAT_DESC_VALUES": [
239                                {
240                                    "FEAT_DESC": "123|MN||89132",
241                                    "LIB_FEAT_ID": 8,
242                                    "USED_FOR_CAND": "Y",
243                                    "USED_FOR_SCORING": "N",
244                                    "ENTITY_COUNT": 1,
245                                    "CANDIDATE_CAP_REACHED": "N",
246                                    "SCORING_CAP_REACHED": "N",
247                                    "SUPPRESSED": "N"
248                                }
249                            ]
250                        },
251                        {
252                            "FEAT_DESC": "123|MN||LS FKS",
253                            "LIB_FEAT_ID": 7,
254                            "FEAT_DESC_VALUES": [
255                                {
256                                    "FEAT_DESC": "123|MN||LS FKS",
257                                    "LIB_FEAT_ID": 7,
258                                    "USED_FOR_CAND": "Y",
259                                    "USED_FOR_SCORING": "N",
260                                    "ENTITY_COUNT": 1,
261                                    "CANDIDATE_CAP_REACHED": "N",
262                                    "SCORING_CAP_REACHED": "N",
263                                    "SUPPRESSED": "N"
264                                }
265                            ]
266                        },
267                        {
268                            "FEAT_DESC": "1515|ATL||89111",
269                            "LIB_FEAT_ID": 24,
270                            "FEAT_DESC_VALUES": [
271                                {
272                                    "FEAT_DESC": "1515|ATL||89111",
273                                    "LIB_FEAT_ID": 24,
274                                    "USED_FOR_CAND": "Y",
275                                    "USED_FOR_SCORING": "N",
276                                    "ENTITY_COUNT": 1,
277                                    "CANDIDATE_CAP_REACHED": "N",
278                                    "SCORING_CAP_REACHED": "N",
279                                    "SUPPRESSED": "N"
280                                }
281                            ]
282                        },
283                        {
284                            "FEAT_DESC": "1515|ATL||LS FKS",
285                            "LIB_FEAT_ID": 25,
286                            "FEAT_DESC_VALUES": [
287                                {
288                                    "FEAT_DESC": "1515|ATL||LS FKS",
289                                    "LIB_FEAT_ID": 25,
290                                    "USED_FOR_CAND": "Y",
291                                    "USED_FOR_SCORING": "N",
292                                    "ENTITY_COUNT": 1,
293                                    "CANDIDATE_CAP_REACHED": "N",
294                                    "SCORING_CAP_REACHED": "N",
295                                    "SUPPRESSED": "N"
296                                }
297                            ]
298                        }
299                    ],
300                    "DOB": [
301                        {
302                            "FEAT_DESC": "12/11/1978",
303                            "LIB_FEAT_ID": 2,
304                            "FEAT_DESC_VALUES": [
305                                {
306                                    "FEAT_DESC": "12/11/1978",
307                                    "LIB_FEAT_ID": 2,
308                                    "USED_FOR_CAND": "Y",
309                                    "USED_FOR_SCORING": "Y",
310                                    "ENTITY_COUNT": 1,
311                                    "CANDIDATE_CAP_REACHED": "N",
312                                    "SCORING_CAP_REACHED": "N",
313                                    "SUPPRESSED": "N"
314                                },
315                                {
316                                    "FEAT_DESC": "11/12/1978",
317                                    "LIB_FEAT_ID": 21,
318                                    "USED_FOR_CAND": "Y",
319                                    "USED_FOR_SCORING": "Y",
320                                    "ENTITY_COUNT": 1,
321                                    "CANDIDATE_CAP_REACHED": "N",
322                                    "SCORING_CAP_REACHED": "N",
323                                    "SUPPRESSED": "N"
324                                }
325                            ]
326                        }
327                    ],
328                    "EMAIL": [
329                        {
330                            "FEAT_DESC": "bsmith@work.com",
331                            "LIB_FEAT_ID": 5,
332                            "FEAT_DESC_VALUES": [
333                                {
334                                    "FEAT_DESC": "bsmith@work.com",
335                                    "LIB_FEAT_ID": 5,
336                                    "USED_FOR_CAND": "N",
337                                    "USED_FOR_SCORING": "Y",
338                                    "ENTITY_COUNT": 1,
339                                    "CANDIDATE_CAP_REACHED": "N",
340                                    "SCORING_CAP_REACHED": "N",
341                                    "SUPPRESSED": "N"
342                                }
343                            ]
344                        }
345                    ],
346                    "EMAIL_KEY": [
347                        {
348                            "FEAT_DESC": "bsmith@WORK.COM",
349                            "LIB_FEAT_ID": 11,
350                            "FEAT_DESC_VALUES": [
351                                {
352                                    "FEAT_DESC": "bsmith@WORK.COM",
353                                    "LIB_FEAT_ID": 11,
354                                    "USED_FOR_CAND": "Y",
355                                    "USED_FOR_SCORING": "N",
356                                    "ENTITY_COUNT": 1,
357                                    "CANDIDATE_CAP_REACHED": "N",
358                                    "SCORING_CAP_REACHED": "N",
359                                    "SUPPRESSED": "N"
360                                }
361                            ]
362                        }
363                    ],
364                    "NAME": [
365                        {
366                            "FEAT_DESC": "Robert Smith",
367                            "LIB_FEAT_ID": 1,
368                            "USAGE_TYPE": "PRIMARY",
369                            "FEAT_DESC_VALUES": [
370                                {
371                                    "FEAT_DESC": "Robert Smith",
372                                    "LIB_FEAT_ID": 1,
373                                    "USED_FOR_CAND": "N",
374                                    "USED_FOR_SCORING": "Y",
375                                    "ENTITY_COUNT": 1,
376                                    "CANDIDATE_CAP_REACHED": "N",
377                                    "SCORING_CAP_REACHED": "N",
378                                    "SUPPRESSED": "N"
379                                },
380                                {
381                                    "FEAT_DESC": "Bob J Smith",
382                                    "LIB_FEAT_ID": 38,
383                                    "USED_FOR_CAND": "N",
384                                    "USED_FOR_SCORING": "Y",
385                                    "ENTITY_COUNT": 1,
386                                    "CANDIDATE_CAP_REACHED": "N",
387                                    "SCORING_CAP_REACHED": "N",
388                                    "SUPPRESSED": "N"
389                                },
390                                {
391                                    "FEAT_DESC": "Bob Smith",
392                                    "LIB_FEAT_ID": 20,
393                                    "USED_FOR_CAND": "N",
394                                    "USED_FOR_SCORING": "Y",
395                                    "ENTITY_COUNT": 1,
396                                    "CANDIDATE_CAP_REACHED": "N",
397                                    "SCORING_CAP_REACHED": "N",
398                                    "SUPPRESSED": "Y"
399                                }
400                            ]
401                        }
402                    ],
403                    "NAMEADDR_KEY": [
404                        {
405                            "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
406                            "LIB_FEAT_ID": 27,
407                            "FEAT_DESC_VALUES": [
408                                {
409                                    "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
410                                    "LIB_FEAT_ID": 27,
411                                    "USED_FOR_CAND": "Y",
412                                    "USED_FOR_SCORING": "N",
413                                    "ENTITY_COUNT": 1,
414                                    "CANDIDATE_CAP_REACHED": "N",
415                                    "SCORING_CAP_REACHED": "N",
416                                    "SUPPRESSED": "N"
417                                }
418                            ]
419                        },
420                        {
421                            "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
422                            "LIB_FEAT_ID": 28,
423                            "FEAT_DESC_VALUES": [
424                                {
425                                    "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
426                                    "LIB_FEAT_ID": 28,
427                                    "USED_FOR_CAND": "Y",
428                                    "USED_FOR_SCORING": "N",
429                                    "ENTITY_COUNT": 1,
430                                    "CANDIDATE_CAP_REACHED": "N",
431                                    "SCORING_CAP_REACHED": "N",
432                                    "SUPPRESSED": "N"
433                                }
434                            ]
435                        },
436                        {
437                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||89132",
438                            "LIB_FEAT_ID": 12,
439                            "FEAT_DESC_VALUES": [
440                                {
441                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||89132",
442                                    "LIB_FEAT_ID": 12,
443                                    "USED_FOR_CAND": "Y",
444                                    "USED_FOR_SCORING": "N",
445                                    "ENTITY_COUNT": 1,
446                                    "CANDIDATE_CAP_REACHED": "N",
447                                    "SCORING_CAP_REACHED": "N",
448                                    "SUPPRESSED": "N"
449                                }
450                            ]
451                        },
452                        {
453                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||LS FKS",
454                            "LIB_FEAT_ID": 13,
455                            "FEAT_DESC_VALUES": [
456                                {
457                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||LS FKS",
458                                    "LIB_FEAT_ID": 13,
459                                    "USED_FOR_CAND": "Y",
460                                    "USED_FOR_SCORING": "N",
461                                    "ENTITY_COUNT": 1,
462                                    "CANDIDATE_CAP_REACHED": "N",
463                                    "SCORING_CAP_REACHED": "N",
464                                    "SUPPRESSED": "N"
465                                }
466                            ]
467                        },
468                        {
469                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
470                            "LIB_FEAT_ID": 29,
471                            "FEAT_DESC_VALUES": [
472                                {
473                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
474                                    "LIB_FEAT_ID": 29,
475                                    "USED_FOR_CAND": "Y",
476                                    "USED_FOR_SCORING": "N",
477                                    "ENTITY_COUNT": 1,
478                                    "CANDIDATE_CAP_REACHED": "N",
479                                    "SCORING_CAP_REACHED": "N",
480                                    "SUPPRESSED": "N"
481                                }
482                            ]
483                        },
484                        {
485                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
486                            "LIB_FEAT_ID": 26,
487                            "FEAT_DESC_VALUES": [
488                                {
489                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
490                                    "LIB_FEAT_ID": 26,
491                                    "USED_FOR_CAND": "Y",
492                                    "USED_FOR_SCORING": "N",
493                                    "ENTITY_COUNT": 1,
494                                    "CANDIDATE_CAP_REACHED": "N",
495                                    "SCORING_CAP_REACHED": "N",
496                                    "SUPPRESSED": "N"
497                                }
498                            ]
499                        }
500                    ],
501                    "NAMEDATE_KEY": [
502                        {
503                            "FEAT_DESC": "J|PP|SM0|DOB.MMDD_HASH=1211",
504                            "LIB_FEAT_ID": 43,
505                            "FEAT_DESC_VALUES": [
506                                {
507                                    "FEAT_DESC": "J|PP|SM0|DOB.MMDD_HASH=1211",
508                                    "LIB_FEAT_ID": 43,
509                                    "USED_FOR_CAND": "Y",
510                                    "USED_FOR_SCORING": "N",
511                                    "ENTITY_COUNT": 1,
512                                    "CANDIDATE_CAP_REACHED": "N",
513                                    "SCORING_CAP_REACHED": "N",
514                                    "SUPPRESSED": "N"
515                                }
516                            ]
517                        },
518                        {
519                            "FEAT_DESC": "J|PP|SM0|DOB.MMYY_HASH=1278",
520                            "LIB_FEAT_ID": 41,
521                            "FEAT_DESC_VALUES": [
522                                {
523                                    "FEAT_DESC": "J|PP|SM0|DOB.MMYY_HASH=1278",
524                                    "LIB_FEAT_ID": 41,
525                                    "USED_FOR_CAND": "Y",
526                                    "USED_FOR_SCORING": "N",
527                                    "ENTITY_COUNT": 1,
528                                    "CANDIDATE_CAP_REACHED": "N",
529                                    "SCORING_CAP_REACHED": "N",
530                                    "SUPPRESSED": "N"
531                                }
532                            ]
533                        },
534                        {
535                            "FEAT_DESC": "J|PP|SM0|DOB=71211",
536                            "LIB_FEAT_ID": 40,
537                            "FEAT_DESC_VALUES": [
538                                {
539                                    "FEAT_DESC": "J|PP|SM0|DOB=71211",
540                                    "LIB_FEAT_ID": 40,
541                                    "USED_FOR_CAND": "Y",
542                                    "USED_FOR_SCORING": "N",
543                                    "ENTITY_COUNT": 1,
544                                    "CANDIDATE_CAP_REACHED": "N",
545                                    "SCORING_CAP_REACHED": "N",
546                                    "SUPPRESSED": "N"
547                                }
548                            ]
549                        },
550                        {
551                            "FEAT_DESC": "PP|SM0|DOB.MMDD_HASH=1211",
552                            "LIB_FEAT_ID": 32,
553                            "FEAT_DESC_VALUES": [
554                                {
555                                    "FEAT_DESC": "PP|SM0|DOB.MMDD_HASH=1211",
556                                    "LIB_FEAT_ID": 32,
557                                    "USED_FOR_CAND": "Y",
558                                    "USED_FOR_SCORING": "N",
559                                    "ENTITY_COUNT": 1,
560                                    "CANDIDATE_CAP_REACHED": "N",
561                                    "SCORING_CAP_REACHED": "N",
562                                    "SUPPRESSED": "N"
563                                }
564                            ]
565                        },
566                        {
567                            "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1178",
568                            "LIB_FEAT_ID": 33,
569                            "FEAT_DESC_VALUES": [
570                                {
571                                    "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1178",
572                                    "LIB_FEAT_ID": 33,
573                                    "USED_FOR_CAND": "Y",
574                                    "USED_FOR_SCORING": "N",
575                                    "ENTITY_COUNT": 1,
576                                    "CANDIDATE_CAP_REACHED": "N",
577                                    "SCORING_CAP_REACHED": "N",
578                                    "SUPPRESSED": "N"
579                                }
580                            ]
581                        },
582                        {
583                            "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1278",
584                            "LIB_FEAT_ID": 42,
585                            "FEAT_DESC_VALUES": [
586                                {
587                                    "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1278",
588                                    "LIB_FEAT_ID": 42,
589                                    "USED_FOR_CAND": "Y",
590                                    "USED_FOR_SCORING": "N",
591                                    "ENTITY_COUNT": 1,
592                                    "CANDIDATE_CAP_REACHED": "N",
593                                    "SCORING_CAP_REACHED": "N",
594                                    "SUPPRESSED": "N"
595                                }
596                            ]
597                        },
598                        {
599                            "FEAT_DESC": "PP|SM0|DOB=71211",
600                            "LIB_FEAT_ID": 31,
601                            "FEAT_DESC_VALUES": [
602                                {
603                                    "FEAT_DESC": "PP|SM0|DOB=71211",
604                                    "LIB_FEAT_ID": 31,
605                                    "USED_FOR_CAND": "Y",
606                                    "USED_FOR_SCORING": "N",
607                                    "ENTITY_COUNT": 1,
608                                    "CANDIDATE_CAP_REACHED": "N",
609                                    "SCORING_CAP_REACHED": "N",
610                                    "SUPPRESSED": "N"
611                                }
612                            ]
613                        },
614                        {
615                            "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211",
616                            "LIB_FEAT_ID": 14,
617                            "FEAT_DESC_VALUES": [
618                                {
619                                    "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211",
620                                    "LIB_FEAT_ID": 14,
621                                    "USED_FOR_CAND": "Y",
622                                    "USED_FOR_SCORING": "N",
623                                    "ENTITY_COUNT": 1,
624                                    "CANDIDATE_CAP_REACHED": "N",
625                                    "SCORING_CAP_REACHED": "N",
626                                    "SUPPRESSED": "N"
627                                }
628                            ]
629                        },
630                        {
631                            "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1178",
632                            "LIB_FEAT_ID": 30,
633                            "FEAT_DESC_VALUES": [
634                                {
635                                    "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1178",
636                                    "LIB_FEAT_ID": 30,
637                                    "USED_FOR_CAND": "Y",
638                                    "USED_FOR_SCORING": "N",
639                                    "ENTITY_COUNT": 1,
640                                    "CANDIDATE_CAP_REACHED": "N",
641                                    "SCORING_CAP_REACHED": "N",
642                                    "SUPPRESSED": "N"
643                                }
644                            ]
645                        },
646                        {
647                            "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1278",
648                            "LIB_FEAT_ID": 16,
649                            "FEAT_DESC_VALUES": [
650                                {
651                                    "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1278",
652                                    "LIB_FEAT_ID": 16,
653                                    "USED_FOR_CAND": "Y",
654                                    "USED_FOR_SCORING": "N",
655                                    "ENTITY_COUNT": 1,
656                                    "CANDIDATE_CAP_REACHED": "N",
657                                    "SCORING_CAP_REACHED": "N",
658                                    "SUPPRESSED": "N"
659                                }
660                            ]
661                        },
662                        {
663                            "FEAT_DESC": "RPRT|SM0|DOB=71211",
664                            "LIB_FEAT_ID": 15,
665                            "FEAT_DESC_VALUES": [
666                                {
667                                    "FEAT_DESC": "RPRT|SM0|DOB=71211",
668                                    "LIB_FEAT_ID": 15,
669                                    "USED_FOR_CAND": "Y",
670                                    "USED_FOR_SCORING": "N",
671                                    "ENTITY_COUNT": 1,
672                                    "CANDIDATE_CAP_REACHED": "N",
673                                    "SCORING_CAP_REACHED": "N",
674                                    "SUPPRESSED": "N"
675                                }
676                            ]
677                        }
678                    ],
679                    "NAMEPHONE_KEY": [
680                        {
681                            "FEAT_DESC": "PP|SM0|PHONE.PHONE_LAST_5=91300",
682                            "LIB_FEAT_ID": 37,
683                            "FEAT_DESC_VALUES": [
684                                {
685                                    "FEAT_DESC": "PP|SM0|PHONE.PHONE_LAST_5=91300",
686                                    "LIB_FEAT_ID": 37,
687                                    "USED_FOR_CAND": "Y",
688                                    "USED_FOR_SCORING": "N",
689                                    "ENTITY_COUNT": 1,
690                                    "CANDIDATE_CAP_REACHED": "N",
691                                    "SCORING_CAP_REACHED": "N",
692                                    "SUPPRESSED": "N"
693                                }
694                            ]
695                        },
696                        {
697                            "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300",
698                            "LIB_FEAT_ID": 19,
699                            "FEAT_DESC_VALUES": [
700                                {
701                                    "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300",
702                                    "LIB_FEAT_ID": 19,
703                                    "USED_FOR_CAND": "Y",
704                                    "USED_FOR_SCORING": "N",
705                                    "ENTITY_COUNT": 1,
706                                    "CANDIDATE_CAP_REACHED": "N",
707                                    "SCORING_CAP_REACHED": "N",
708                                    "SUPPRESSED": "N"
709                                }
710                            ]
711                        }
712                    ],
713                    "NAMEREGION_KEY": [
714                        {
715                            "FEAT_DESC": "PP|SM0|ADDRESS.CITY_STD=LS FKS",
716                            "LIB_FEAT_ID": 36,
717                            "FEAT_DESC_VALUES": [
718                                {
719                                    "FEAT_DESC": "PP|SM0|ADDRESS.CITY_STD=LS FKS",
720                                    "LIB_FEAT_ID": 36,
721                                    "USED_FOR_CAND": "Y",
722                                    "USED_FOR_SCORING": "N",
723                                    "ENTITY_COUNT": 1,
724                                    "CANDIDATE_CAP_REACHED": "N",
725                                    "SCORING_CAP_REACHED": "N",
726                                    "SUPPRESSED": "N"
727                                }
728                            ]
729                        },
730                        {
731                            "FEAT_DESC": "PP|SM0|POST=89111",
732                            "LIB_FEAT_ID": 35,
733                            "FEAT_DESC_VALUES": [
734                                {
735                                    "FEAT_DESC": "PP|SM0|POST=89111",
736                                    "LIB_FEAT_ID": 35,
737                                    "USED_FOR_CAND": "Y",
738                                    "USED_FOR_SCORING": "N",
739                                    "ENTITY_COUNT": 1,
740                                    "CANDIDATE_CAP_REACHED": "N",
741                                    "SCORING_CAP_REACHED": "N",
742                                    "SUPPRESSED": "N"
743                                }
744                            ]
745                        },
746                        {
747                            "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS",
748                            "LIB_FEAT_ID": 18,
749                            "FEAT_DESC_VALUES": [
750                                {
751                                    "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS",
752                                    "LIB_FEAT_ID": 18,
753                                    "USED_FOR_CAND": "Y",
754                                    "USED_FOR_SCORING": "N",
755                                    "ENTITY_COUNT": 1,
756                                    "CANDIDATE_CAP_REACHED": "N",
757                                    "SCORING_CAP_REACHED": "N",
758                                    "SUPPRESSED": "N"
759                                }
760                            ]
761                        },
762                        {
763                            "FEAT_DESC": "RPRT|SM0|POST=89111",
764                            "LIB_FEAT_ID": 34,
765                            "FEAT_DESC_VALUES": [
766                                {
767                                    "FEAT_DESC": "RPRT|SM0|POST=89111",
768                                    "LIB_FEAT_ID": 34,
769                                    "USED_FOR_CAND": "Y",
770                                    "USED_FOR_SCORING": "N",
771                                    "ENTITY_COUNT": 1,
772                                    "CANDIDATE_CAP_REACHED": "N",
773                                    "SCORING_CAP_REACHED": "N",
774                                    "SUPPRESSED": "N"
775                                }
776                            ]
777                        },
778                        {
779                            "FEAT_DESC": "RPRT|SM0|POST=89132",
780                            "LIB_FEAT_ID": 17,
781                            "FEAT_DESC_VALUES": [
782                                {
783                                    "FEAT_DESC": "RPRT|SM0|POST=89132",
784                                    "LIB_FEAT_ID": 17,
785                                    "USED_FOR_CAND": "Y",
786                                    "USED_FOR_SCORING": "N",
787                                    "ENTITY_COUNT": 1,
788                                    "CANDIDATE_CAP_REACHED": "N",
789                                    "SCORING_CAP_REACHED": "N",
790                                    "SUPPRESSED": "N"
791                                }
792                            ]
793                        }
794                    ],
795                    "NAME_KEY": [
796                        {
797                            "FEAT_DESC": "J|PP|SM0",
798                            "LIB_FEAT_ID": 39,
799                            "FEAT_DESC_VALUES": [
800                                {
801                                    "FEAT_DESC": "J|PP|SM0",
802                                    "LIB_FEAT_ID": 39,
803                                    "USED_FOR_CAND": "Y",
804                                    "USED_FOR_SCORING": "N",
805                                    "ENTITY_COUNT": 1,
806                                    "CANDIDATE_CAP_REACHED": "N",
807                                    "SCORING_CAP_REACHED": "N",
808                                    "SUPPRESSED": "N"
809                                }
810                            ]
811                        },
812                        {
813                            "FEAT_DESC": "PP|SM0",
814                            "LIB_FEAT_ID": 23,
815                            "FEAT_DESC_VALUES": [
816                                {
817                                    "FEAT_DESC": "PP|SM0",
818                                    "LIB_FEAT_ID": 23,
819                                    "USED_FOR_CAND": "Y",
820                                    "USED_FOR_SCORING": "N",
821                                    "ENTITY_COUNT": 1,
822                                    "CANDIDATE_CAP_REACHED": "N",
823                                    "SCORING_CAP_REACHED": "N",
824                                    "SUPPRESSED": "N"
825                                }
826                            ]
827                        },
828                        {
829                            "FEAT_DESC": "RPRT|SM0",
830                            "LIB_FEAT_ID": 6,
831                            "FEAT_DESC_VALUES": [
832                                {
833                                    "FEAT_DESC": "RPRT|SM0",
834                                    "LIB_FEAT_ID": 6,
835                                    "USED_FOR_CAND": "Y",
836                                    "USED_FOR_SCORING": "N",
837                                    "ENTITY_COUNT": 1,
838                                    "CANDIDATE_CAP_REACHED": "N",
839                                    "SCORING_CAP_REACHED": "N",
840                                    "SUPPRESSED": "N"
841                                }
842                            ]
843                        }
844                    ],
845                    "PHONE": [
846                        {
847                            "FEAT_DESC": "702-919-1300",
848                            "LIB_FEAT_ID": 4,
849                            "USAGE_TYPE": "HOME",
850                            "FEAT_DESC_VALUES": [
851                                {
852                                    "FEAT_DESC": "702-919-1300",
853                                    "LIB_FEAT_ID": 4,
854                                    "USED_FOR_CAND": "N",
855                                    "USED_FOR_SCORING": "Y",
856                                    "ENTITY_COUNT": 1,
857                                    "CANDIDATE_CAP_REACHED": "N",
858                                    "SCORING_CAP_REACHED": "N",
859                                    "SUPPRESSED": "N"
860                                }
861                            ]
862                        },
863                        {
864                            "FEAT_DESC": "702-919-1300",
865                            "LIB_FEAT_ID": 4,
866                            "USAGE_TYPE": "MOBILE",
867                            "FEAT_DESC_VALUES": [
868                                {
869                                    "FEAT_DESC": "702-919-1300",
870                                    "LIB_FEAT_ID": 4,
871                                    "USED_FOR_CAND": "N",
872                                    "USED_FOR_SCORING": "Y",
873                                    "ENTITY_COUNT": 1,
874                                    "CANDIDATE_CAP_REACHED": "N",
875                                    "SCORING_CAP_REACHED": "N",
876                                    "SUPPRESSED": "N"
877                                }
878                            ]
879                        }
880                    ],
881                    "PHONE_KEY": [
882                        {
883                            "FEAT_DESC": "7029191300",
884                            "LIB_FEAT_ID": 9,
885                            "FEAT_DESC_VALUES": [
886                                {
887                                    "FEAT_DESC": "7029191300",
888                                    "LIB_FEAT_ID": 9,
889                                    "USED_FOR_CAND": "Y",
890                                    "USED_FOR_SCORING": "N",
891                                    "ENTITY_COUNT": 1,
892                                    "CANDIDATE_CAP_REACHED": "N",
893                                    "SCORING_CAP_REACHED": "N",
894                                    "SUPPRESSED": "N"
895                                }
896                            ]
897                        }
898                    ],
899                    "RECORD_TYPE": [
900                        {
901                            "FEAT_DESC": "PERSON",
902                            "LIB_FEAT_ID": 10,
903                            "FEAT_DESC_VALUES": [
904                                {
905                                    "FEAT_DESC": "PERSON",
906                                    "LIB_FEAT_ID": 10,
907                                    "USED_FOR_CAND": "N",
908                                    "USED_FOR_SCORING": "Y",
909                                    "ENTITY_COUNT": 100,
910                                    "CANDIDATE_CAP_REACHED": "N",
911                                    "SCORING_CAP_REACHED": "N",
912                                    "SUPPRESSED": "N"
913                                }
914                            ]
915                        }
916                    ]
917                },
918                "RECORD_SUMMARY": [
919                    {
920                        "DATA_SOURCE": "CUSTOMERS",
921                        "RECORD_COUNT": 3
922                    }
923                ],
924                "RECORDS": [
925                    {
926                        "DATA_SOURCE": "CUSTOMERS",
927                        "RECORD_ID": "1001",
928                        "INTERNAL_ID": 35,
929                        "MATCH_KEY": "",
930                        "MATCH_LEVEL_CODE": "",
931                        "ERRULE_CODE": "",
932                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
933                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
934                    },
935                    {
936                        "DATA_SOURCE": "CUSTOMERS",
937                        "RECORD_ID": "1002",
938                        "INTERNAL_ID": 36,
939                        "MATCH_KEY": "+NAME+DOB+PHONE",
940                        "MATCH_LEVEL_CODE": "RESOLVED",
941                        "ERRULE_CODE": "CNAME_CFF_CEXCL",
942                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
943                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
944                    },
945                    {
946                        "DATA_SOURCE": "CUSTOMERS",
947                        "RECORD_ID": "1003",
948                        "INTERNAL_ID": 37,
949                        "MATCH_KEY": "+NAME+DOB+EMAIL",
950                        "MATCH_LEVEL_CODE": "RESOLVED",
951                        "ERRULE_CODE": "SF1_PNAME_CSTAB",
952                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
953                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
954                    }
955                ]
956            },
957            "RELATED_ENTITIES": []
958        }
959    ]
960}
abstract why_records(data_source_code_1: str, record_id_1: str, data_source_code_2: str, record_id_2: str, flags: int = <SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS: 96009152>) str[source]

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

Parameters:
  • data_source_code_1 (str) – Identifies the provenance of the data.

  • record_id_1 (str) – The unique identifier within the records of the same data source.

  • data_source_code_2 (str) – Identifies the provenance of the data.

  • record_id_2 (str) – The unique identifier within the records of the same data source.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_WHY_ENTITY_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10DATA_SOURCE_CODE_1 = "CUSTOMERS"
11DATA_SOURCE_CODE_2 = "CUSTOMERS"
12FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
13    # Differs based on which senzing_xxxx package is used.
14}
15FLAGS = SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS
16RECORD_ID_1 = "1001"
17RECORD_ID_2 = "1002"
18
19try:
20    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
21    sz_engine = sz_abstract_factory.create_engine()
22    RESULT = sz_engine.why_records(
23        DATA_SOURCE_CODE_1,
24        RECORD_ID_1,
25        DATA_SOURCE_CODE_2,
26        RECORD_ID_2,
27        FLAGS,
28    )
29    print(f"\nFile {__file__}:\n{RESULT}\n")
30except SzError as err:
31    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted and pruned for easier reading.
  2
  3{
  4    "WHY_RESULTS": [
  5        {
  6            "INTERNAL_ID": 35,
  7            "ENTITY_ID": 35,
  8            "FOCUS_RECORDS": [
  9                {
 10                    "DATA_SOURCE": "CUSTOMERS",
 11                    "RECORD_ID": "1001"
 12                }
 13            ],
 14            "INTERNAL_ID_2": 36,
 15            "ENTITY_ID_2": 35,
 16            "FOCUS_RECORDS_2": [
 17                {
 18                    "DATA_SOURCE": "CUSTOMERS",
 19                    "RECORD_ID": "1002"
 20                }
 21            ],
 22            "MATCH_INFO": {
 23                "WHY_KEY": "+NAME+DOB+PHONE",
 24                "WHY_ERRULE_CODE": "CNAME_CFF_CEXCL",
 25                "MATCH_LEVEL_CODE": "RESOLVED",
 26                "CANDIDATE_KEYS": {
 27                    "NAMEDATE_KEY": [
 28                        {
 29                            "FEAT_ID": 14,
 30                            "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211"
 31                        },
 32                        {
 33                            "FEAT_ID": 15,
 34                            "FEAT_DESC": "RPRT|SM0|DOB=71211"
 35                        }
 36                    ],
 37                    "NAMEPHONE_KEY": [
 38                        {
 39                            "FEAT_ID": 19,
 40                            "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300"
 41                        }
 42                    ],
 43                    "NAMEREGION_KEY": [
 44                        {
 45                            "FEAT_ID": 18,
 46                            "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS"
 47                        }
 48                    ],
 49                    "NAME_KEY": [
 50                        {
 51                            "FEAT_ID": 6,
 52                            "FEAT_DESC": "RPRT|SM0"
 53                        }
 54                    ],
 55                    "PHONE_KEY": [
 56                        {
 57                            "FEAT_ID": 9,
 58                            "FEAT_DESC": "7029191300"
 59                        }
 60                    ]
 61                },
 62                "DISCLOSED_RELATIONS": {},
 63                "FEATURE_SCORES": {
 64                    "ADDRESS": [
 65                        {
 66                            "INBOUND_FEAT_ID": 3,
 67                            "INBOUND_FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 68                            "INBOUND_FEAT_USAGE_TYPE": "MAILING",
 69                            "CANDIDATE_FEAT_ID": 22,
 70                            "CANDIDATE_FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 71                            "CANDIDATE_FEAT_USAGE_TYPE": "HOME",
 72                            "SCORE": 42,
 73                            "ADDITIONAL_SCORES": {
 74                                "FULL_SCORE": 42
 75                            },
 76                            "SCORE_BUCKET": "NO_CHANCE",
 77                            "SCORE_BEHAVIOR": "FF"
 78                        }
 79                    ],
 80                    "DOB": [
 81                        {
 82                            "INBOUND_FEAT_ID": 2,
 83                            "INBOUND_FEAT_DESC": "12/11/1978",
 84                            "INBOUND_FEAT_USAGE_TYPE": "",
 85                            "CANDIDATE_FEAT_ID": 21,
 86                            "CANDIDATE_FEAT_DESC": "11/12/1978",
 87                            "CANDIDATE_FEAT_USAGE_TYPE": "",
 88                            "SCORE": 95,
 89                            "ADDITIONAL_SCORES": {
 90                                "FULL_SCORE": 95
 91                            },
 92                            "SCORE_BUCKET": "CLOSE",
 93                            "SCORE_BEHAVIOR": "FMES"
 94                        }
 95                    ],
 96                    "NAME": [
 97                        {
 98                            "INBOUND_FEAT_ID": 1,
 99                            "INBOUND_FEAT_DESC": "Robert Smith",
100                            "INBOUND_FEAT_USAGE_TYPE": "PRIMARY",
101                            "CANDIDATE_FEAT_ID": 20,
102                            "CANDIDATE_FEAT_DESC": "Bob Smith",
103                            "CANDIDATE_FEAT_USAGE_TYPE": "PRIMARY",
104                            "SCORE": 97,
105                            "ADDITIONAL_SCORES": {
106                                "GENERATION_MATCH": -1,
107                                "GNR_FN": 97,
108                                "GNR_GN": 95,
109                                "GNR_ON": -1,
110                                "GNR_SN": 100
111                            },
112                            "SCORE_BUCKET": "CLOSE",
113                            "SCORE_BEHAVIOR": "NAME"
114                        }
115                    ],
116                    "PHONE": [
117                        {
118                            "INBOUND_FEAT_ID": 4,
119                            "INBOUND_FEAT_DESC": "702-919-1300",
120                            "INBOUND_FEAT_USAGE_TYPE": "HOME",
121                            "CANDIDATE_FEAT_ID": 4,
122                            "CANDIDATE_FEAT_DESC": "702-919-1300",
123                            "CANDIDATE_FEAT_USAGE_TYPE": "MOBILE",
124                            "SCORE": 100,
125                            "ADDITIONAL_SCORES": {
126                                "FULL_SCORE": 100
127                            },
128                            "SCORE_BUCKET": "SAME",
129                            "SCORE_BEHAVIOR": "FF"
130                        }
131                    ],
132                    "RECORD_TYPE": [
133                        {
134                            "INBOUND_FEAT_ID": 10,
135                            "INBOUND_FEAT_DESC": "PERSON",
136                            "INBOUND_FEAT_USAGE_TYPE": "",
137                            "CANDIDATE_FEAT_ID": 10,
138                            "CANDIDATE_FEAT_DESC": "PERSON",
139                            "CANDIDATE_FEAT_USAGE_TYPE": "",
140                            "SCORE": 100,
141                            "ADDITIONAL_SCORES": {
142                                "FULL_SCORE": 100
143                            },
144                            "SCORE_BUCKET": "SAME",
145                            "SCORE_BEHAVIOR": "FVME"
146                        }
147                    ]
148                }
149            }
150        }
151    ],
152    "ENTITIES": [
153        {
154            "RESOLVED_ENTITY": {
155                "ENTITY_ID": 35,
156                "ENTITY_NAME": "Robert Smith",
157                "FEATURES": {
158                    "ADDRESS": [
159                        {
160                            "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
161                            "LIB_FEAT_ID": 22,
162                            "USAGE_TYPE": "HOME",
163                            "FEAT_DESC_VALUES": [
164                                {
165                                    "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
166                                    "LIB_FEAT_ID": 22,
167                                    "USED_FOR_CAND": "N",
168                                    "USED_FOR_SCORING": "Y",
169                                    "ENTITY_COUNT": 1,
170                                    "CANDIDATE_CAP_REACHED": "N",
171                                    "SCORING_CAP_REACHED": "N",
172                                    "SUPPRESSED": "N"
173                                }
174                            ]
175                        },
176                        {
177                            "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
178                            "LIB_FEAT_ID": 3,
179                            "USAGE_TYPE": "MAILING",
180                            "FEAT_DESC_VALUES": [
181                                {
182                                    "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
183                                    "LIB_FEAT_ID": 3,
184                                    "USED_FOR_CAND": "N",
185                                    "USED_FOR_SCORING": "Y",
186                                    "ENTITY_COUNT": 1,
187                                    "CANDIDATE_CAP_REACHED": "N",
188                                    "SCORING_CAP_REACHED": "N",
189                                    "SUPPRESSED": "N"
190                                }
191                            ]
192                        }
193                    ],
194                    "ADDR_KEY": [
195                        {
196                            "FEAT_DESC": "123|MN||89132",
197                            "LIB_FEAT_ID": 8,
198                            "FEAT_DESC_VALUES": [
199                                {
200                                    "FEAT_DESC": "123|MN||89132",
201                                    "LIB_FEAT_ID": 8,
202                                    "USED_FOR_CAND": "Y",
203                                    "USED_FOR_SCORING": "N",
204                                    "ENTITY_COUNT": 1,
205                                    "CANDIDATE_CAP_REACHED": "N",
206                                    "SCORING_CAP_REACHED": "N",
207                                    "SUPPRESSED": "N"
208                                }
209                            ]
210                        },
211                        {
212                            "FEAT_DESC": "123|MN||LS FKS",
213                            "LIB_FEAT_ID": 7,
214                            "FEAT_DESC_VALUES": [
215                                {
216                                    "FEAT_DESC": "123|MN||LS FKS",
217                                    "LIB_FEAT_ID": 7,
218                                    "USED_FOR_CAND": "Y",
219                                    "USED_FOR_SCORING": "N",
220                                    "ENTITY_COUNT": 1,
221                                    "CANDIDATE_CAP_REACHED": "N",
222                                    "SCORING_CAP_REACHED": "N",
223                                    "SUPPRESSED": "N"
224                                }
225                            ]
226                        },
227                        {
228                            "FEAT_DESC": "1515|ATL||89111",
229                            "LIB_FEAT_ID": 24,
230                            "FEAT_DESC_VALUES": [
231                                {
232                                    "FEAT_DESC": "1515|ATL||89111",
233                                    "LIB_FEAT_ID": 24,
234                                    "USED_FOR_CAND": "Y",
235                                    "USED_FOR_SCORING": "N",
236                                    "ENTITY_COUNT": 1,
237                                    "CANDIDATE_CAP_REACHED": "N",
238                                    "SCORING_CAP_REACHED": "N",
239                                    "SUPPRESSED": "N"
240                                }
241                            ]
242                        },
243                        {
244                            "FEAT_DESC": "1515|ATL||LS FKS",
245                            "LIB_FEAT_ID": 25,
246                            "FEAT_DESC_VALUES": [
247                                {
248                                    "FEAT_DESC": "1515|ATL||LS FKS",
249                                    "LIB_FEAT_ID": 25,
250                                    "USED_FOR_CAND": "Y",
251                                    "USED_FOR_SCORING": "N",
252                                    "ENTITY_COUNT": 1,
253                                    "CANDIDATE_CAP_REACHED": "N",
254                                    "SCORING_CAP_REACHED": "N",
255                                    "SUPPRESSED": "N"
256                                }
257                            ]
258                        }
259                    ],
260                    "DOB": [
261                        {
262                            "FEAT_DESC": "12/11/1978",
263                            "LIB_FEAT_ID": 2,
264                            "FEAT_DESC_VALUES": [
265                                {
266                                    "FEAT_DESC": "12/11/1978",
267                                    "LIB_FEAT_ID": 2,
268                                    "USED_FOR_CAND": "Y",
269                                    "USED_FOR_SCORING": "Y",
270                                    "ENTITY_COUNT": 1,
271                                    "CANDIDATE_CAP_REACHED": "N",
272                                    "SCORING_CAP_REACHED": "N",
273                                    "SUPPRESSED": "N"
274                                },
275                                {
276                                    "FEAT_DESC": "11/12/1978",
277                                    "LIB_FEAT_ID": 21,
278                                    "USED_FOR_CAND": "Y",
279                                    "USED_FOR_SCORING": "Y",
280                                    "ENTITY_COUNT": 1,
281                                    "CANDIDATE_CAP_REACHED": "N",
282                                    "SCORING_CAP_REACHED": "N",
283                                    "SUPPRESSED": "N"
284                                }
285                            ]
286                        }
287                    ],
288                    "EMAIL": [
289                        {
290                            "FEAT_DESC": "bsmith@work.com",
291                            "LIB_FEAT_ID": 5,
292                            "FEAT_DESC_VALUES": [
293                                {
294                                    "FEAT_DESC": "bsmith@work.com",
295                                    "LIB_FEAT_ID": 5,
296                                    "USED_FOR_CAND": "N",
297                                    "USED_FOR_SCORING": "Y",
298                                    "ENTITY_COUNT": 1,
299                                    "CANDIDATE_CAP_REACHED": "N",
300                                    "SCORING_CAP_REACHED": "N",
301                                    "SUPPRESSED": "N"
302                                }
303                            ]
304                        }
305                    ],
306                    "EMAIL_KEY": [
307                        {
308                            "FEAT_DESC": "bsmith@WORK.COM",
309                            "LIB_FEAT_ID": 11,
310                            "FEAT_DESC_VALUES": [
311                                {
312                                    "FEAT_DESC": "bsmith@WORK.COM",
313                                    "LIB_FEAT_ID": 11,
314                                    "USED_FOR_CAND": "Y",
315                                    "USED_FOR_SCORING": "N",
316                                    "ENTITY_COUNT": 1,
317                                    "CANDIDATE_CAP_REACHED": "N",
318                                    "SCORING_CAP_REACHED": "N",
319                                    "SUPPRESSED": "N"
320                                }
321                            ]
322                        }
323                    ],
324                    "NAME": [
325                        {
326                            "FEAT_DESC": "Robert Smith",
327                            "LIB_FEAT_ID": 1,
328                            "USAGE_TYPE": "PRIMARY",
329                            "FEAT_DESC_VALUES": [
330                                {
331                                    "FEAT_DESC": "Robert Smith",
332                                    "LIB_FEAT_ID": 1,
333                                    "USED_FOR_CAND": "N",
334                                    "USED_FOR_SCORING": "Y",
335                                    "ENTITY_COUNT": 1,
336                                    "CANDIDATE_CAP_REACHED": "N",
337                                    "SCORING_CAP_REACHED": "N",
338                                    "SUPPRESSED": "N"
339                                },
340                                {
341                                    "FEAT_DESC": "Bob J Smith",
342                                    "LIB_FEAT_ID": 38,
343                                    "USED_FOR_CAND": "N",
344                                    "USED_FOR_SCORING": "Y",
345                                    "ENTITY_COUNT": 1,
346                                    "CANDIDATE_CAP_REACHED": "N",
347                                    "SCORING_CAP_REACHED": "N",
348                                    "SUPPRESSED": "N"
349                                },
350                                {
351                                    "FEAT_DESC": "Bob Smith",
352                                    "LIB_FEAT_ID": 20,
353                                    "USED_FOR_CAND": "N",
354                                    "USED_FOR_SCORING": "Y",
355                                    "ENTITY_COUNT": 1,
356                                    "CANDIDATE_CAP_REACHED": "N",
357                                    "SCORING_CAP_REACHED": "N",
358                                    "SUPPRESSED": "Y"
359                                }
360                            ]
361                        }
362                    ],
363                    "NAMEADDR_KEY": [
364                        {
365                            "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
366                            "LIB_FEAT_ID": 27,
367                            "FEAT_DESC_VALUES": [
368                                {
369                                    "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
370                                    "LIB_FEAT_ID": 27,
371                                    "USED_FOR_CAND": "Y",
372                                    "USED_FOR_SCORING": "N",
373                                    "ENTITY_COUNT": 1,
374                                    "CANDIDATE_CAP_REACHED": "N",
375                                    "SCORING_CAP_REACHED": "N",
376                                    "SUPPRESSED": "N"
377                                }
378                            ]
379                        },
380                        {
381                            "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
382                            "LIB_FEAT_ID": 28,
383                            "FEAT_DESC_VALUES": [
384                                {
385                                    "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
386                                    "LIB_FEAT_ID": 28,
387                                    "USED_FOR_CAND": "Y",
388                                    "USED_FOR_SCORING": "N",
389                                    "ENTITY_COUNT": 1,
390                                    "CANDIDATE_CAP_REACHED": "N",
391                                    "SCORING_CAP_REACHED": "N",
392                                    "SUPPRESSED": "N"
393                                }
394                            ]
395                        },
396                        {
397                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||89132",
398                            "LIB_FEAT_ID": 12,
399                            "FEAT_DESC_VALUES": [
400                                {
401                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||89132",
402                                    "LIB_FEAT_ID": 12,
403                                    "USED_FOR_CAND": "Y",
404                                    "USED_FOR_SCORING": "N",
405                                    "ENTITY_COUNT": 1,
406                                    "CANDIDATE_CAP_REACHED": "N",
407                                    "SCORING_CAP_REACHED": "N",
408                                    "SUPPRESSED": "N"
409                                }
410                            ]
411                        },
412                        {
413                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||LS FKS",
414                            "LIB_FEAT_ID": 13,
415                            "FEAT_DESC_VALUES": [
416                                {
417                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||LS FKS",
418                                    "LIB_FEAT_ID": 13,
419                                    "USED_FOR_CAND": "Y",
420                                    "USED_FOR_SCORING": "N",
421                                    "ENTITY_COUNT": 1,
422                                    "CANDIDATE_CAP_REACHED": "N",
423                                    "SCORING_CAP_REACHED": "N",
424                                    "SUPPRESSED": "N"
425                                }
426                            ]
427                        },
428                        {
429                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
430                            "LIB_FEAT_ID": 29,
431                            "FEAT_DESC_VALUES": [
432                                {
433                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
434                                    "LIB_FEAT_ID": 29,
435                                    "USED_FOR_CAND": "Y",
436                                    "USED_FOR_SCORING": "N",
437                                    "ENTITY_COUNT": 1,
438                                    "CANDIDATE_CAP_REACHED": "N",
439                                    "SCORING_CAP_REACHED": "N",
440                                    "SUPPRESSED": "N"
441                                }
442                            ]
443                        },
444                        {
445                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
446                            "LIB_FEAT_ID": 26,
447                            "FEAT_DESC_VALUES": [
448                                {
449                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
450                                    "LIB_FEAT_ID": 26,
451                                    "USED_FOR_CAND": "Y",
452                                    "USED_FOR_SCORING": "N",
453                                    "ENTITY_COUNT": 1,
454                                    "CANDIDATE_CAP_REACHED": "N",
455                                    "SCORING_CAP_REACHED": "N",
456                                    "SUPPRESSED": "N"
457                                }
458                            ]
459                        }
460                    ],
461                    "NAMEDATE_KEY": [
462                        {
463                            "FEAT_DESC": "J|PP|SM0|DOB.MMDD_HASH=1211",
464                            "LIB_FEAT_ID": 43,
465                            "FEAT_DESC_VALUES": [
466                                {
467                                    "FEAT_DESC": "J|PP|SM0|DOB.MMDD_HASH=1211",
468                                    "LIB_FEAT_ID": 43,
469                                    "USED_FOR_CAND": "Y",
470                                    "USED_FOR_SCORING": "N",
471                                    "ENTITY_COUNT": 1,
472                                    "CANDIDATE_CAP_REACHED": "N",
473                                    "SCORING_CAP_REACHED": "N",
474                                    "SUPPRESSED": "N"
475                                }
476                            ]
477                        },
478                        {
479                            "FEAT_DESC": "J|PP|SM0|DOB.MMYY_HASH=1278",
480                            "LIB_FEAT_ID": 41,
481                            "FEAT_DESC_VALUES": [
482                                {
483                                    "FEAT_DESC": "J|PP|SM0|DOB.MMYY_HASH=1278",
484                                    "LIB_FEAT_ID": 41,
485                                    "USED_FOR_CAND": "Y",
486                                    "USED_FOR_SCORING": "N",
487                                    "ENTITY_COUNT": 1,
488                                    "CANDIDATE_CAP_REACHED": "N",
489                                    "SCORING_CAP_REACHED": "N",
490                                    "SUPPRESSED": "N"
491                                }
492                            ]
493                        },
494                        {
495                            "FEAT_DESC": "J|PP|SM0|DOB=71211",
496                            "LIB_FEAT_ID": 40,
497                            "FEAT_DESC_VALUES": [
498                                {
499                                    "FEAT_DESC": "J|PP|SM0|DOB=71211",
500                                    "LIB_FEAT_ID": 40,
501                                    "USED_FOR_CAND": "Y",
502                                    "USED_FOR_SCORING": "N",
503                                    "ENTITY_COUNT": 1,
504                                    "CANDIDATE_CAP_REACHED": "N",
505                                    "SCORING_CAP_REACHED": "N",
506                                    "SUPPRESSED": "N"
507                                }
508                            ]
509                        },
510                        {
511                            "FEAT_DESC": "PP|SM0|DOB.MMDD_HASH=1211",
512                            "LIB_FEAT_ID": 32,
513                            "FEAT_DESC_VALUES": [
514                                {
515                                    "FEAT_DESC": "PP|SM0|DOB.MMDD_HASH=1211",
516                                    "LIB_FEAT_ID": 32,
517                                    "USED_FOR_CAND": "Y",
518                                    "USED_FOR_SCORING": "N",
519                                    "ENTITY_COUNT": 1,
520                                    "CANDIDATE_CAP_REACHED": "N",
521                                    "SCORING_CAP_REACHED": "N",
522                                    "SUPPRESSED": "N"
523                                }
524                            ]
525                        },
526                        {
527                            "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1178",
528                            "LIB_FEAT_ID": 33,
529                            "FEAT_DESC_VALUES": [
530                                {
531                                    "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1178",
532                                    "LIB_FEAT_ID": 33,
533                                    "USED_FOR_CAND": "Y",
534                                    "USED_FOR_SCORING": "N",
535                                    "ENTITY_COUNT": 1,
536                                    "CANDIDATE_CAP_REACHED": "N",
537                                    "SCORING_CAP_REACHED": "N",
538                                    "SUPPRESSED": "N"
539                                }
540                            ]
541                        },
542                        {
543                            "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1278",
544                            "LIB_FEAT_ID": 42,
545                            "FEAT_DESC_VALUES": [
546                                {
547                                    "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1278",
548                                    "LIB_FEAT_ID": 42,
549                                    "USED_FOR_CAND": "Y",
550                                    "USED_FOR_SCORING": "N",
551                                    "ENTITY_COUNT": 1,
552                                    "CANDIDATE_CAP_REACHED": "N",
553                                    "SCORING_CAP_REACHED": "N",
554                                    "SUPPRESSED": "N"
555                                }
556                            ]
557                        },
558                        {
559                            "FEAT_DESC": "PP|SM0|DOB=71211",
560                            "LIB_FEAT_ID": 31,
561                            "FEAT_DESC_VALUES": [
562                                {
563                                    "FEAT_DESC": "PP|SM0|DOB=71211",
564                                    "LIB_FEAT_ID": 31,
565                                    "USED_FOR_CAND": "Y",
566                                    "USED_FOR_SCORING": "N",
567                                    "ENTITY_COUNT": 1,
568                                    "CANDIDATE_CAP_REACHED": "N",
569                                    "SCORING_CAP_REACHED": "N",
570                                    "SUPPRESSED": "N"
571                                }
572                            ]
573                        },
574                        {
575                            "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211",
576                            "LIB_FEAT_ID": 14,
577                            "FEAT_DESC_VALUES": [
578                                {
579                                    "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211",
580                                    "LIB_FEAT_ID": 14,
581                                    "USED_FOR_CAND": "Y",
582                                    "USED_FOR_SCORING": "N",
583                                    "ENTITY_COUNT": 1,
584                                    "CANDIDATE_CAP_REACHED": "N",
585                                    "SCORING_CAP_REACHED": "N",
586                                    "SUPPRESSED": "N"
587                                }
588                            ]
589                        },
590                        {
591                            "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1178",
592                            "LIB_FEAT_ID": 30,
593                            "FEAT_DESC_VALUES": [
594                                {
595                                    "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1178",
596                                    "LIB_FEAT_ID": 30,
597                                    "USED_FOR_CAND": "Y",
598                                    "USED_FOR_SCORING": "N",
599                                    "ENTITY_COUNT": 1,
600                                    "CANDIDATE_CAP_REACHED": "N",
601                                    "SCORING_CAP_REACHED": "N",
602                                    "SUPPRESSED": "N"
603                                }
604                            ]
605                        },
606                        {
607                            "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1278",
608                            "LIB_FEAT_ID": 16,
609                            "FEAT_DESC_VALUES": [
610                                {
611                                    "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1278",
612                                    "LIB_FEAT_ID": 16,
613                                    "USED_FOR_CAND": "Y",
614                                    "USED_FOR_SCORING": "N",
615                                    "ENTITY_COUNT": 1,
616                                    "CANDIDATE_CAP_REACHED": "N",
617                                    "SCORING_CAP_REACHED": "N",
618                                    "SUPPRESSED": "N"
619                                }
620                            ]
621                        },
622                        {
623                            "FEAT_DESC": "RPRT|SM0|DOB=71211",
624                            "LIB_FEAT_ID": 15,
625                            "FEAT_DESC_VALUES": [
626                                {
627                                    "FEAT_DESC": "RPRT|SM0|DOB=71211",
628                                    "LIB_FEAT_ID": 15,
629                                    "USED_FOR_CAND": "Y",
630                                    "USED_FOR_SCORING": "N",
631                                    "ENTITY_COUNT": 1,
632                                    "CANDIDATE_CAP_REACHED": "N",
633                                    "SCORING_CAP_REACHED": "N",
634                                    "SUPPRESSED": "N"
635                                }
636                            ]
637                        }
638                    ],
639                    "NAMEPHONE_KEY": [
640                        {
641                            "FEAT_DESC": "PP|SM0|PHONE.PHONE_LAST_5=91300",
642                            "LIB_FEAT_ID": 37,
643                            "FEAT_DESC_VALUES": [
644                                {
645                                    "FEAT_DESC": "PP|SM0|PHONE.PHONE_LAST_5=91300",
646                                    "LIB_FEAT_ID": 37,
647                                    "USED_FOR_CAND": "Y",
648                                    "USED_FOR_SCORING": "N",
649                                    "ENTITY_COUNT": 1,
650                                    "CANDIDATE_CAP_REACHED": "N",
651                                    "SCORING_CAP_REACHED": "N",
652                                    "SUPPRESSED": "N"
653                                }
654                            ]
655                        },
656                        {
657                            "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300",
658                            "LIB_FEAT_ID": 19,
659                            "FEAT_DESC_VALUES": [
660                                {
661                                    "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300",
662                                    "LIB_FEAT_ID": 19,
663                                    "USED_FOR_CAND": "Y",
664                                    "USED_FOR_SCORING": "N",
665                                    "ENTITY_COUNT": 1,
666                                    "CANDIDATE_CAP_REACHED": "N",
667                                    "SCORING_CAP_REACHED": "N",
668                                    "SUPPRESSED": "N"
669                                }
670                            ]
671                        }
672                    ],
673                    "NAMEREGION_KEY": [
674                        {
675                            "FEAT_DESC": "PP|SM0|ADDRESS.CITY_STD=LS FKS",
676                            "LIB_FEAT_ID": 36,
677                            "FEAT_DESC_VALUES": [
678                                {
679                                    "FEAT_DESC": "PP|SM0|ADDRESS.CITY_STD=LS FKS",
680                                    "LIB_FEAT_ID": 36,
681                                    "USED_FOR_CAND": "Y",
682                                    "USED_FOR_SCORING": "N",
683                                    "ENTITY_COUNT": 1,
684                                    "CANDIDATE_CAP_REACHED": "N",
685                                    "SCORING_CAP_REACHED": "N",
686                                    "SUPPRESSED": "N"
687                                }
688                            ]
689                        },
690                        {
691                            "FEAT_DESC": "PP|SM0|POST=89111",
692                            "LIB_FEAT_ID": 35,
693                            "FEAT_DESC_VALUES": [
694                                {
695                                    "FEAT_DESC": "PP|SM0|POST=89111",
696                                    "LIB_FEAT_ID": 35,
697                                    "USED_FOR_CAND": "Y",
698                                    "USED_FOR_SCORING": "N",
699                                    "ENTITY_COUNT": 1,
700                                    "CANDIDATE_CAP_REACHED": "N",
701                                    "SCORING_CAP_REACHED": "N",
702                                    "SUPPRESSED": "N"
703                                }
704                            ]
705                        },
706                        {
707                            "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS",
708                            "LIB_FEAT_ID": 18,
709                            "FEAT_DESC_VALUES": [
710                                {
711                                    "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS",
712                                    "LIB_FEAT_ID": 18,
713                                    "USED_FOR_CAND": "Y",
714                                    "USED_FOR_SCORING": "N",
715                                    "ENTITY_COUNT": 1,
716                                    "CANDIDATE_CAP_REACHED": "N",
717                                    "SCORING_CAP_REACHED": "N",
718                                    "SUPPRESSED": "N"
719                                }
720                            ]
721                        },
722                        {
723                            "FEAT_DESC": "RPRT|SM0|POST=89111",
724                            "LIB_FEAT_ID": 34,
725                            "FEAT_DESC_VALUES": [
726                                {
727                                    "FEAT_DESC": "RPRT|SM0|POST=89111",
728                                    "LIB_FEAT_ID": 34,
729                                    "USED_FOR_CAND": "Y",
730                                    "USED_FOR_SCORING": "N",
731                                    "ENTITY_COUNT": 1,
732                                    "CANDIDATE_CAP_REACHED": "N",
733                                    "SCORING_CAP_REACHED": "N",
734                                    "SUPPRESSED": "N"
735                                }
736                            ]
737                        },
738                        {
739                            "FEAT_DESC": "RPRT|SM0|POST=89132",
740                            "LIB_FEAT_ID": 17,
741                            "FEAT_DESC_VALUES": [
742                                {
743                                    "FEAT_DESC": "RPRT|SM0|POST=89132",
744                                    "LIB_FEAT_ID": 17,
745                                    "USED_FOR_CAND": "Y",
746                                    "USED_FOR_SCORING": "N",
747                                    "ENTITY_COUNT": 1,
748                                    "CANDIDATE_CAP_REACHED": "N",
749                                    "SCORING_CAP_REACHED": "N",
750                                    "SUPPRESSED": "N"
751                                }
752                            ]
753                        }
754                    ],
755                    "NAME_KEY": [
756                        {
757                            "FEAT_DESC": "J|PP|SM0",
758                            "LIB_FEAT_ID": 39,
759                            "FEAT_DESC_VALUES": [
760                                {
761                                    "FEAT_DESC": "J|PP|SM0",
762                                    "LIB_FEAT_ID": 39,
763                                    "USED_FOR_CAND": "Y",
764                                    "USED_FOR_SCORING": "N",
765                                    "ENTITY_COUNT": 1,
766                                    "CANDIDATE_CAP_REACHED": "N",
767                                    "SCORING_CAP_REACHED": "N",
768                                    "SUPPRESSED": "N"
769                                }
770                            ]
771                        },
772                        {
773                            "FEAT_DESC": "PP|SM0",
774                            "LIB_FEAT_ID": 23,
775                            "FEAT_DESC_VALUES": [
776                                {
777                                    "FEAT_DESC": "PP|SM0",
778                                    "LIB_FEAT_ID": 23,
779                                    "USED_FOR_CAND": "Y",
780                                    "USED_FOR_SCORING": "N",
781                                    "ENTITY_COUNT": 1,
782                                    "CANDIDATE_CAP_REACHED": "N",
783                                    "SCORING_CAP_REACHED": "N",
784                                    "SUPPRESSED": "N"
785                                }
786                            ]
787                        },
788                        {
789                            "FEAT_DESC": "RPRT|SM0",
790                            "LIB_FEAT_ID": 6,
791                            "FEAT_DESC_VALUES": [
792                                {
793                                    "FEAT_DESC": "RPRT|SM0",
794                                    "LIB_FEAT_ID": 6,
795                                    "USED_FOR_CAND": "Y",
796                                    "USED_FOR_SCORING": "N",
797                                    "ENTITY_COUNT": 1,
798                                    "CANDIDATE_CAP_REACHED": "N",
799                                    "SCORING_CAP_REACHED": "N",
800                                    "SUPPRESSED": "N"
801                                }
802                            ]
803                        }
804                    ],
805                    "PHONE": [
806                        {
807                            "FEAT_DESC": "702-919-1300",
808                            "LIB_FEAT_ID": 4,
809                            "USAGE_TYPE": "HOME",
810                            "FEAT_DESC_VALUES": [
811                                {
812                                    "FEAT_DESC": "702-919-1300",
813                                    "LIB_FEAT_ID": 4,
814                                    "USED_FOR_CAND": "N",
815                                    "USED_FOR_SCORING": "Y",
816                                    "ENTITY_COUNT": 1,
817                                    "CANDIDATE_CAP_REACHED": "N",
818                                    "SCORING_CAP_REACHED": "N",
819                                    "SUPPRESSED": "N"
820                                }
821                            ]
822                        },
823                        {
824                            "FEAT_DESC": "702-919-1300",
825                            "LIB_FEAT_ID": 4,
826                            "USAGE_TYPE": "MOBILE",
827                            "FEAT_DESC_VALUES": [
828                                {
829                                    "FEAT_DESC": "702-919-1300",
830                                    "LIB_FEAT_ID": 4,
831                                    "USED_FOR_CAND": "N",
832                                    "USED_FOR_SCORING": "Y",
833                                    "ENTITY_COUNT": 1,
834                                    "CANDIDATE_CAP_REACHED": "N",
835                                    "SCORING_CAP_REACHED": "N",
836                                    "SUPPRESSED": "N"
837                                }
838                            ]
839                        }
840                    ],
841                    "PHONE_KEY": [
842                        {
843                            "FEAT_DESC": "7029191300",
844                            "LIB_FEAT_ID": 9,
845                            "FEAT_DESC_VALUES": [
846                                {
847                                    "FEAT_DESC": "7029191300",
848                                    "LIB_FEAT_ID": 9,
849                                    "USED_FOR_CAND": "Y",
850                                    "USED_FOR_SCORING": "N",
851                                    "ENTITY_COUNT": 1,
852                                    "CANDIDATE_CAP_REACHED": "N",
853                                    "SCORING_CAP_REACHED": "N",
854                                    "SUPPRESSED": "N"
855                                }
856                            ]
857                        }
858                    ],
859                    "RECORD_TYPE": [
860                        {
861                            "FEAT_DESC": "PERSON",
862                            "LIB_FEAT_ID": 10,
863                            "FEAT_DESC_VALUES": [
864                                {
865                                    "FEAT_DESC": "PERSON",
866                                    "LIB_FEAT_ID": 10,
867                                    "USED_FOR_CAND": "N",
868                                    "USED_FOR_SCORING": "Y",
869                                    "ENTITY_COUNT": 100,
870                                    "CANDIDATE_CAP_REACHED": "N",
871                                    "SCORING_CAP_REACHED": "N",
872                                    "SUPPRESSED": "N"
873                                }
874                            ]
875                        }
876                    ]
877                },
878                "RECORD_SUMMARY": [
879                    {
880                        "DATA_SOURCE": "CUSTOMERS",
881                        "RECORD_COUNT": 3
882                    }
883                ],
884                "RECORDS": [
885                    {
886                        "DATA_SOURCE": "CUSTOMERS",
887                        "RECORD_ID": "1001",
888                        "INTERNAL_ID": 35,
889                        "MATCH_KEY": "",
890                        "MATCH_LEVEL_CODE": "",
891                        "ERRULE_CODE": "",
892                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
893                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
894                    },
895                    {
896                        "DATA_SOURCE": "CUSTOMERS",
897                        "RECORD_ID": "1002",
898                        "INTERNAL_ID": 36,
899                        "MATCH_KEY": "+NAME+DOB+PHONE",
900                        "MATCH_LEVEL_CODE": "RESOLVED",
901                        "ERRULE_CODE": "CNAME_CFF_CEXCL",
902                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
903                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
904                    },
905                    {
906                        "DATA_SOURCE": "CUSTOMERS",
907                        "RECORD_ID": "1003",
908                        "INTERNAL_ID": 37,
909                        "MATCH_KEY": "+NAME+DOB+EMAIL",
910                        "MATCH_LEVEL_CODE": "RESOLVED",
911                        "ERRULE_CODE": "SF1_PNAME_CSTAB",
912                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
913                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
914                    }
915                ]
916            },
917            "RELATED_ENTITIES": []
918        }
919    ]
920}

senzing.szengineflags module

TODO: szengineflags.py

class senzing.szengineflags.SzEngineFlags(value)[source]

Bases: IntFlag

Engine Flags

SZ_ENTITY_BRIEF_DEFAULT_FLAGS = 1082304
SZ_ENTITY_CORE_FLAGS = 63488
SZ_ENTITY_DEFAULT_FLAGS = 3734464
SZ_ENTITY_INCLUDE_ALL_FEATURES = 1024
SZ_ENTITY_INCLUDE_ALL_RELATIONS = 960
SZ_ENTITY_INCLUDE_DISCLOSED_RELATIONS = 512
SZ_ENTITY_INCLUDE_ENTITY_NAME = 4096
SZ_ENTITY_INCLUDE_FEATURE_STATS = 16777216
SZ_ENTITY_INCLUDE_INTERNAL_FEATURES = 8388608
SZ_ENTITY_INCLUDE_NAME_ONLY_RELATIONS = 256
SZ_ENTITY_INCLUDE_POSSIBLY_SAME_RELATIONS = 64
SZ_ENTITY_INCLUDE_RECORD_DATA = 16384
SZ_ENTITY_INCLUDE_RECORD_FEATURE_DETAILS = 34359738368
SZ_ENTITY_INCLUDE_RECORD_FEATURE_IDS = 262144
SZ_ENTITY_INCLUDE_RECORD_FEATURE_STATS = 68719476736
SZ_ENTITY_INCLUDE_RECORD_JSON_DATA = 65536
SZ_ENTITY_INCLUDE_RECORD_MATCHING_INFO = 32768
SZ_ENTITY_INCLUDE_RECORD_SUMMARY = 8192
SZ_ENTITY_INCLUDE_RECORD_TYPES = 268435456
SZ_ENTITY_INCLUDE_RECORD_UNMAPPED_DATA = 2147483648
SZ_ENTITY_INCLUDE_REPRESENTATIVE_FEATURES = 2048
SZ_EXPORT_DEFAULT_FLAGS = 3734497
SZ_EXPORT_INCLUDE_ALL_ENTITIES = 33
SZ_EXPORT_INCLUDE_ALL_HAVING_RELATIONSHIPS = 30
SZ_EXPORT_INCLUDE_DISCLOSED = 16
SZ_EXPORT_INCLUDE_MULTI_RECORD_ENTITIES = 1
SZ_EXPORT_INCLUDE_NAME_ONLY = 8
SZ_EXPORT_INCLUDE_POSSIBLY_SAME = 2
SZ_EXPORT_INCLUDE_SINGLE_RECORD_ENTITIES = 32
SZ_FIND_NETWORK_DEFAULT_FLAGS = 8589946880
SZ_FIND_NETWORK_INCLUDE_MATCHING_INFO = 8589934592
SZ_FIND_PATH_DEFAULT_FLAGS = 1073754112
SZ_FIND_PATH_INCLUDE_MATCHING_INFO = 1073741824
SZ_FIND_PATH_STRICT_AVOID = 33554432
SZ_HOW_ENTITY_DEFAULT_FLAGS = 67108864
SZ_INCLUDE_FEATURE_SCORES = 67108864
SZ_INCLUDE_MATCH_KEY_DETAILS = 17179869184
SZ_RECORD_DEFAULT_FLAGS = 65536
SZ_SEARCH_BY_ATTRIBUTES_ALL = 67123215
SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS = 67123215
SZ_SEARCH_BY_ATTRIBUTES_MINIMAL_ALL = 15
SZ_SEARCH_BY_ATTRIBUTES_MINIMAL_STRONG = 3
SZ_SEARCH_BY_ATTRIBUTES_STRONG = 67123203
SZ_SEARCH_INCLUDE_ALL_ENTITIES = 15
SZ_SEARCH_INCLUDE_NAME_ONLY = 8
SZ_SEARCH_INCLUDE_POSSIBLY_SAME = 2
SZ_SEARCH_INCLUDE_RESOLVED = 1
SZ_SEARCH_INCLUDE_STATS = 134217728
SZ_VIRTUAL_ENTITY_DEFAULT_FLAGS = 63488
SZ_WHY_ENTITIES_DEFAULT_FLAGS = 96009152
SZ_WHY_RECORDS_DEFAULT_FLAGS = 96009152
SZ_WHY_RECORD_IN_ENTITY_DEFAULT_FLAGS = 96009152
SZ_WITH_INFO = 4611686018427387904
classmethod combine_flags(flags: List[Self] | List[str]) int[source]

The combine_flags method ORs together all flags in a list of strings.

Parameters:

flags (List[str]) – A list of strings each representing an engine flag.

Returns:

Value of ORing flags together.

Return type:

int

Raises:

Example:
1#! /usr/bin/env python3

Output:

1// Output has been formatted for easier reading.
2
3{
4    "DSRC_ID": 1001
5}
classmethod get_flag_int(flag: Self | str) int[source]

TODO:

senzing.szproduct module

szproduct.py is the abstract class for all implementations of szproduct.

class senzing.szproduct.SzProduct[source]

Bases: ABC

SzProduct is the definition of the Senzing Python SDK that is implemented by packages such as szproduct.py.

abstract get_license() str[source]

The get_license method retrieves information about the currently used license.

Returns:

A JSON document containing Senzing license metadata.

Return type:

str

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_product = sz_abstract_factory.create_product()
12    RESULT = sz_product.get_license()
13    print(f"\nFile {__file__}:\n{RESULT}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "customer": "Senzing Public Test License",
 5    "contract": "EVALUATION - support@senzing.com",
 6    "issueDate": "2024-10-15",
 7    "licenseType": "EVAL (Solely for non-productive use)",
 8    "licenseLevel": "STANDARD",
 9    "billing": "MONTHLY",
10    "expireDate": "2025-10-16",
11    "recordLimit": 500
12}
abstract get_version() str[source]

The get_version method returns the version of Senzing.

Returns:

A JSON document containing metadata about the Senzing Engine version being used.

Return type:

str

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_product = sz_abstract_factory.create_product()
12    RESULT = sz_product.get_version()
13    print(f"\nFile {__file__}:\n{RESULT}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "PRODUCT_NAME": "Senzing API",
 5    "VERSION": "4.0.0",
 6    "BUILD_VERSION": "4.0.0.24289",
 7    "BUILD_DATE": "2024-10-15",
 8    "BUILD_NUMBER": "2024_10_15__14_21",
 9    "COMPATIBILITY_VERSION": {
10        "CONFIG_VERSION": "11"
11    },
12    "SCHEMA_VERSION": {
13        "ENGINE_SCHEMA_VERSION": "4.0",
14        "MINIMUM_REQUIRED_SCHEMA_VERSION": "4.0",
15        "MAXIMUM_REQUIRED_SCHEMA_VERSION": "4.99"
16    }
17}
help(method_name: str = '') str[source]

Return the help for a particular message.

Parameters:

method_name (str) – The name of the method. (e.g. “init”). If empty, a list of methods and descriptions is returned.

Returns:

The Help information about the requested method

Return type:

str

Module contents

class senzing.SzAbstractFactory[source]

Bases: ABC

SzAbstractFactory is the definition of the Senzing Python SDK SzAbstractFactory implementations.

abstract create_config() SzConfig[source]

The create_config method creates a new implementation of an SzConfigAbstract object.

Args:

Returns:

A new implementation.

Return type:

SzConfigAbstract

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12except SzError as err:
13    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{}
abstract create_configmanager() SzConfigManager[source]

The create_configmanager method creates a new implementation of an SzConfigManagerAbstract object.

Args:

Returns:

A new implementation.

Return type:

SzConfigManagerAbstract

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_configmanager = sz_abstract_factory.create_configmanager()
12except SzError as err:
13    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{}
abstract create_diagnostic() SzDiagnostic[source]

The create_diagnostic method creates a new implementation of an SzDiagnosticAbstract object.

Args:

Returns:

A new implementation.

Return type:

SzDiagnosticAbstract

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_diagnostic = sz_abstract_factory.create_diagnostic()
12except SzError as err:
13    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{}
abstract create_engine() SzEngine[source]

The create_engine method creates a new implementation of an SzEngineAbstract object.

Args:

Returns:

A new implementation.

Return type:

SzEngineAbstract

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_engine = sz_abstract_factory.create_engine()
12except SzError as err:
13    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{}
abstract create_product() SzProduct[source]

The create_product method creates a new implementation of an SzProductAbstract object.

Args:

Returns:

A new implementation.

Return type:

SzProductAbstract

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_product = sz_abstract_factory.create_product()
12except SzError as err:
13    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{}
help(method_name: str = '') str[source]

Return the help for a particular message.

Parameters:

method_name (str) – The name of the method. (e.g. “init”). If empty, a list of methods and descriptions is returned.

Returns:

The Help information about the requested method

Return type:

str

abstract reinitialize(config_id: int) None[source]

The reinitialize method reinitializes the Senzing objects using a specific configuration identifier. A list of available configuration identifiers can be retrieved using szconfigmanager.get_configs.

Parameters:

config_id (int) – The configuration ID used for the initialization

Raises:
  • TypeError – Incorrect datatype of input parameter.

  • szexception.SzError – config_id does not exist.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    # Using get_active_config_id for demonstrations purposes.
11    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
12    sz_engine = sz_abstract_factory.create_engine()
13    config_id = sz_engine.get_active_config_id()
14    sz_abstract_factory.reinitialize(config_id)
15except SzError as err:
16    print(f"\nFile {__file__}:\nError:\n{err}\n")
exception senzing.SzBadInputError[source]

Bases: SzError

The user-supplied input contained an error.

class senzing.SzConfig[source]

Bases: ABC

SzConfig is the definition of the Senzing Python SDK that is implemented by packages such as szconfig.py.

abstract add_data_source(config_handle: int, data_source_code: str) str[source]

The add_data_source method adds a data source to an existing in-memory configuration.

Parameters:
  • config_handle (int) – An identifier of an in-memory configuration. Usually created by the create or load methods.

  • data_source_code (str) – Name of data source code to add.

Returns:

A string containing a JSON document listing the newly created data source.

Return type:

str

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5DATA_SOURCE_CODE = "NAME_OF_DATASOURCE"
 6FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 7    # Differs based on which senzing_xxxx package is used.
 8}
 9
10try:
11    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
12    sz_config = sz_abstract_factory.create_config()
13    config_handle = sz_config.create_config()
14    RESULT = sz_config.add_data_source(config_handle, DATA_SOURCE_CODE)
15    sz_config.close_config(config_handle)
16    print(f"\nFile {__file__}:\n{RESULT}\n")
17except SzError as err:
18    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{
4    "DSRC_ID": 1001
5}
abstract close_config(config_handle: int) None[source]

The close_config method cleans up the Senzing SzConfig object pointed to by the config_handle.

Parameters:

config_handle (int) – An identifier of an in-memory configuration. Usually created by the create_config or import_config methods.

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12    config_handle = sz_config.create_config()
13
14    # Do work.
15
16    sz_config.close_config(config_handle)
17except SzError as err:
18    print(f"\nFile {__file__}:\nError:\n{err}\n")
abstract create_config() int[source]

The create_config method creates an in-memory Senzing configuration from the g2config.json template configuration file located in the PIPELINE.RESOURCEPATH path. A handle is returned to identify the in-memory configuration. The handle is used by the add_data_source, list_data_sources, delete_data_source, and export_config methods. The handle is terminated by the close_config method.

Returns:

A pointer to an in-memory Senzing configuration.

Return type:

int

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12    config_handle = sz_config.create_config()
13
14    # Do work.
15
16    sz_config.close_config(config_handle)
17except SzError as err:
18    print(f"\nFile {__file__}:\nError:\n{err}\n")
abstract delete_data_source(config_handle: int, data_source_code: str) None[source]

The delete_data_source method removes a data source from an existing in-memory configuration.

Parameters:
  • config_handle (int) – An identifier of an in-memory configuration. Usually created by the create or load methods.

  • data_source_code (str) – Name of data source code to delete.

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5DATA_SOURCE_CODE = "TEST"
 6FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 7    # Differs based on which senzing_xxxx package is used.
 8}
 9
10try:
11    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
12    sz_config = sz_abstract_factory.create_config()
13    config_handle = sz_config.create_config()
14    sz_config.delete_data_source(config_handle, DATA_SOURCE_CODE)
15    sz_config.close_config(config_handle)
16except SzError as err:
17    print(f"\nFile {__file__}:\nError:\n{err}\n")
abstract export_config(config_handle: int) str[source]

The export_config method creates a JSON string representation of the Senzing SzConfig object.

Parameters:

config_handle (int) – An identifier of an in-memory configuration. Usually created by the create or load methods.

Returns:

A string containing a JSON Document representation of the Senzing SzConfig object.

Return type:

str

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12    config_handle = sz_config.create_config()  # Create first in-memory.
13    CONFIG_DEFINITION = sz_config.export_config(config_handle)  # Save in-memory to string.
14    sz_config.close_config(config_handle)
15    print(f"\nFile {__file__}:\n{CONFIG_DEFINITION}\n")
16except SzError as err:
17    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted and pruned for easier reading.
 2
 3{
 4    "G2_CONFIG": {
 5        "CFG_ATTR": [],
 6        "CFG_CFBOM": [],
 7        "CFG_CFCALL": [],
 8        "CFG_CFRTN": [],
 9        "CFG_CFUNC": [],
10        "CFG_DFBOM": [],
11        "CFG_DFCALL": [],
12        "CFG_DFUNC": [],
13        "CFG_DSRC": [],
14        "CFG_DSRC_INTEREST": [],
15        "CFG_ECLASS": [],
16        "CFG_EFBOM": [],
17        "CFG_EFCALL": [],
18        "CFG_EFUNC": [],
19        "CFG_ERFRAG": [],
20        "CFG_ERRULE": [],
21        "CFG_ETYPE": [],
22        "CFG_FBOM": [],
23        "CFG_FBOVR": []
24        "CFG_FCLASS": [],
25        "CFG_FELEM": [],
26        "CFG_FTYPE": [],
27        "CFG_GENERIC_THRESHOLD": [],
28        "CFG_GPLAN": [],
29        "CFG_LENS": [],
30        "CFG_LENSRL": [],
31        "CFG_RCLASS": [],
32        "CFG_RTYPE": [],
33        "CFG_SFCALL": [],
34        "CFG_SFUNC": [],
35        "SYS_OOM": [],
36        "CONFIG_BASE_VERSION": {
37            "VERSION": "4.0.0",
38            "BUILD_VERSION": "4.0.0.00000",
39            "BUILD_DATE": "2024-01-01",
40            "BUILD_NUMBER": "00000",
41            "COMPATIBILITY_VERSION": {
42                "CONFIG_VERSION": "10"
43            }
44        }
45    }
46}

Create, export, import, and close example

 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12    config_handle_1 = sz_config.create_config()  # Create first in-memory.
13    CONFIG_DEFINITION = sz_config.export_config(config_handle_1)  # Save in-memory to string.
14    config_handle_2 = sz_config.import_config(CONFIG_DEFINITION)  # Create second in-memory.
15    sz_config.close_config(config_handle_1)
16    sz_config.close_config(config_handle_2)
17except SzError as err:
18    print(f"\nFile {__file__}:\nError:\n{err}\n")
abstract get_data_sources(config_handle: int) str[source]

The get_data_sources method returns a JSON document of data sources contained in an in-memory configuration.

Parameters:

config_handle (int) – An identifier of an in-memory configuration. Usually created by the create or load methods.

Returns:

A string containing a JSON document listing all of the data sources.

Return type:

str

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12    config_handle = sz_config.create_config()
13    RESULT = sz_config.get_data_sources(config_handle)
14    sz_config.close_config(config_handle)
15    print(f"\nFile {__file__}:\n{RESULT}\n")
16except SzError as err:
17    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "DATA_SOURCES": [
 5        {
 6            "DSRC_ID": 1,
 7            "DSRC_CODE": "TEST"
 8        },
 9        {
10            "DSRC_ID": 2,
11            "DSRC_CODE": "SEARCH"
12        }
13    ]
14}
help(method_name: str = '') str[source]

Return the help for a particular message.

Parameters:

method_name (str) – The name of the method. (e.g. “init”). If empty, a list of methods and descriptions is returned.

Returns:

The Help information about the requested method

Return type:

str

abstract import_config(config_definition: str) int[source]

The import_config method initializes an in-memory Senzing SzConfig object from a JSON string. A handle is returned to identify the in-memory configuration. The handle is used by the add_data_source, get_data_sources, delete_data_source, and save methods. The handle is terminated by the close method.

Parameters:

config_definition (str) – A JSON document containing the Senzing configuration.

Returns:

An identifier (config_handle) of an in-memory configuration.

Return type:

int

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12    sz_configmanager = sz_abstract_factory.create_configmanager()
13    config_id = sz_configmanager.get_default_config_id()
14    CONFIG_DEFINITION = sz_configmanager.get_config(config_id)
15    config_handle = sz_config.import_config(CONFIG_DEFINITION)
16except SzError as err:
17    print(f"\nFile {__file__}:\nError:\n{err}\n")

Create, save, load, and close

 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_config = sz_abstract_factory.create_config()
12    config_handle_1 = sz_config.create_config()  # Create first in-memory.
13    CONFIG_DEFINITION = sz_config.export_config(config_handle_1)  # Save in-memory to string.
14    config_handle_2 = sz_config.import_config(CONFIG_DEFINITION)  # Create second in-memory.
15    sz_config.close_config(config_handle_1)
16    sz_config.close_config(config_handle_2)
17except SzError as err:
18    print(f"\nFile {__file__}:\nError:\n{err}\n")
class senzing.SzConfigManager[source]

Bases: ABC

SzConfigManager is the definition of the Senzing Python SDK that is implemented by packages such as szconfigmanager.py.

abstract add_config(config_definition: str, config_comment: str) int[source]

The add_config method adds a Senzing configuration JSON document to the Senzing database.

Parameters:
  • config_definition (str) – The Senzing configuration JSON document.

  • config_comment (str) – free-form string of comments describing the configuration document.

Returns:

A configuration identifier.

Return type:

int

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5CONFIG_COMMENT = "Just an empty example"
 6FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 7    # Differs based on which senzing_xxxx package is used.
 8}
 9
10try:
11    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
12    sz_config = sz_abstract_factory.create_config()
13    sz_configmanager = sz_abstract_factory.create_configmanager()
14    config_handle = sz_config.create_config()
15    CONFIG_DEFINITION = sz_config.export_config(config_handle)
16    config_id = sz_configmanager.add_config(CONFIG_DEFINITION, CONFIG_COMMENT)
17except SzError as err:
18    print(f"\nFile {__file__}:\nError:\n{err}\n")
abstract get_config(config_id: int) str[source]

The get_config method retrieves a specific Senzing configuration JSON document from the Senzing database.

Parameters:

config_id (int) – The configuration identifier of the desired Senzing Engine configuration JSON document to retrieve.

Returns:

A JSON document containing the Senzing configuration.

Return type:

str

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_configmanager = sz_abstract_factory.create_configmanager()
12    config_id = sz_configmanager.get_default_config_id()
13    CONFIG_DEFINITION = sz_configmanager.get_config(config_id)
14    print(f"\nFile {__file__}:\n{CONFIG_DEFINITION}\n")
15except SzError as err:
16    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted and pruned for easier reading.
  2
  3{
  4    "G2_CONFIG": {
  5        "CFG_ATTR": [
  6            {
  7                "ATTR_ID": 1001,
  8                "ATTR_CODE": "DATA_SOURCE",
  9                "ATTR_CLASS": "OBSERVATION",
 10                "FTYPE_CODE": null,
 11                "FELEM_CODE": null,
 12                "FELEM_REQ": "Yes",
 13                "DEFAULT_VALUE": null,
 14                "INTERNAL": "No"
 15            }
 16        ],
 17        "CFG_CFBOM": [
 18            {
 19                "CFCALL_ID": 1,
 20                "FTYPE_ID": 1,
 21                "FELEM_ID": 2,
 22                "EXEC_ORDER": 1
 23            }
 24        ],
 25        "CFG_CFCALL": [
 26            {
 27                "CFCALL_ID": 1,
 28                "FTYPE_ID": 1,
 29                "CFUNC_ID": 2
 30            }
 31        ],
 32        "CFG_CFRTN": [
 33            {
 34                "CFRTN_ID": 1,
 35                "CFUNC_ID": 1,
 36                "FTYPE_ID": 0,
 37                "CFUNC_RTNVAL": "FULL_SCORE",
 38                "EXEC_ORDER": 1,
 39                "SAME_SCORE": 100,
 40                "CLOSE_SCORE": 90,
 41                "LIKELY_SCORE": 80,
 42                "PLAUSIBLE_SCORE": 70,
 43                "UN_LIKELY_SCORE": 60
 44            }
 45        ],
 46        "CFG_CFUNC": [
 47            {
 48                "CFUNC_ID": 1,
 49                "CFUNC_CODE": "STR_COMP",
 50                "CFUNC_DESC": "String comparison",
 51                "CONNECT_STR": "g2StringComp",
 52                "ANON_SUPPORT": "Yes",
 53                "LANGUAGE": null
 54            }
 55        ],
 56        "CFG_DFBOM": [
 57            {
 58                "DFCALL_ID": 1,
 59                "FTYPE_ID": 1,
 60                "FELEM_ID": 2,
 61                "EXEC_ORDER": 1
 62            }
 63        ],
 64        "CFG_DFCALL": [
 65            {
 66                "DFCALL_ID": 1,
 67                "FTYPE_ID": 1,
 68                "DFUNC_ID": 5
 69            }
 70        ],
 71        "CFG_DFUNC": [
 72            {
 73                "DFUNC_ID": 1,
 74                "DFUNC_CODE": "FELEM_STRICT_SUBSET",
 75                "DFUNC_DESC": "Strict subset of felems",
 76                "CONNECT_STR": "g2StrictSubsetFelems",
 77                "ANON_SUPPORT": "Yes",
 78                "LANGUAGE": null
 79            }
 80        ],
 81        "CFG_DSRC": [
 82            {
 83                "DSRC_ID": 1,
 84                "DSRC_CODE": "TEST",
 85                "DSRC_DESC": "Test",
 86                "RETENTION_LEVEL": "Remember"
 87            }
 88        ],
 89        "CFG_DSRC_INTEREST": [],
 90        "CFG_EFBOM": [
 91            {
 92                "EFCALL_ID": 1,
 93                "FTYPE_ID": 6,
 94                "FELEM_ID": 60,
 95                "EXEC_ORDER": 1,
 96                "FELEM_REQ": "Yes"
 97            }
 98        ],
 99        "CFG_EFCALL": [
100            {
101                "EFCALL_ID": 1,
102                "FTYPE_ID": 6,
103                "FELEM_ID": -1,
104                "EFUNC_ID": 4,
105                "EXEC_ORDER": 1,
106                "EFEAT_FTYPE_ID": -1,
107                "IS_VIRTUAL": "No"
108            }
109        ],
110        "CFG_EFUNC": [
111            {
112                "EFUNC_ID": 1,
113                "EFUNC_CODE": "EXPRESS_BOM",
114                "EFUNC_DESC": "General BOM Hasher",
115                "CONNECT_STR": "g2GenericHasher",
116                "LANGUAGE": null
117            }
118        ],
119        "CFG_ERFRAG": [
120            {
121                "ERFRAG_ID": 10,
122                "ERFRAG_CODE": "TRUSTED_ID",
123                "ERFRAG_DESC": "TRUSTED_ID",
124                "ERFRAG_SOURCE": "./SCORES/TRUSTED_ID[./FULL_SCORE=100]",
125                "ERFRAG_DEPENDS": null
126            }
127        ],
128        "CFG_ERRULE": [
129            {
130                "ERRULE_ID": 100,
131                "ERRULE_CODE": "SAME_A1",
132                "RESOLVE": "Yes",
133                "RELATE": "No",
134                "RTYPE_ID": 1,
135                "QUAL_ERFRAG_CODE": "SAME_A1",
136                "DISQ_ERFRAG_CODE": null,
137                "ERRULE_TIER": 10
138            }
139        ],
140        "CFG_FBOM": [
141            {
142                "FTYPE_ID": 1,
143                "FELEM_ID": 2,
144                "EXEC_ORDER": 1,
145                "DISPLAY_LEVEL": 1,
146                "DISPLAY_DELIM": null,
147                "DERIVED": "No"
148            }
149        ],
150        "CFG_FBOVR": [
151            {
152                "FTYPE_ID": 5,
153                "UTYPE_CODE": "BUSINESS",
154                "FTYPE_FREQ": "FF",
155                "FTYPE_EXCL": "Yes",
156                "FTYPE_STAB": "No"
157            }
158        ],
159        "CFG_FCLASS": [
160            {
161                "FCLASS_ID": 1,
162                "FCLASS_CODE": "NAME",
163                "FCLASS_DESC": "Name"
164            }
165        ],
166        "CFG_FELEM": [
167            {
168                "FELEM_ID": 2,
169                "FELEM_CODE": "FULL_NAME",
170                "FELEM_DESC": "Full name",
171                "DATA_TYPE": "string"
172            }
173        ],
174        "CFG_FTYPE": [
175            {
176                "FTYPE_ID": 1,
177                "FTYPE_CODE": "NAME",
178                "FTYPE_DESC": "Name",
179                "FCLASS_ID": 1,
180                "FTYPE_FREQ": "NAME",
181                "FTYPE_EXCL": "No",
182                "FTYPE_STAB": "No",
183                "PERSIST_HISTORY": "Yes",
184                "USED_FOR_CAND": "No",
185                "DERIVED": "No",
186                "RTYPE_ID": 0,
187                "ANONYMIZE": "No",
188                "VERSION": 2,
189                "SHOW_IN_MATCH_KEY": "Yes"
190            }
191        ],
192        "CFG_GENERIC_THRESHOLD": [
193            {
194                "GPLAN_ID": 1,
195                "BEHAVIOR": "NAME",
196                "FTYPE_ID": 0,
197                "CANDIDATE_CAP": 10,
198                "SCORING_CAP": -1,
199                "SEND_TO_REDO": "Yes"
200            }
201        ],
202        "CFG_GPLAN": [
203            {
204                "GPLAN_ID": 1,
205                "GPLAN_CODE": "INGEST",
206                "GPLAN_DESC": "Standard Ingestion"
207            }
208        ],
209        "CFG_RCLASS": [
210            {
211                "RCLASS_ID": 1,
212                "RCLASS_CODE": "DERIVED",
213                "RCLASS_DESC": "Derived",
214                "IS_DISCLOSED": "No"
215            }
216        ],
217        "CFG_RTYPE": [
218            {
219                "RTYPE_ID": 1,
220                "RTYPE_CODE": "RESOLVED",
221                "RTYPE_DESC": "Resolved",
222                "RCLASS_ID": 1,
223                "BREAK_RES": "No"
224            }
225        ],
226        "CFG_SFCALL": [
227            {
228                "SFCALL_ID": 1,
229                "FTYPE_ID": 1,
230                "FELEM_ID": -1,
231                "SFUNC_ID": 1,
232                "EXEC_ORDER": 1
233            }
234        ],
235        "CFG_SFUNC": [
236            {
237                "SFUNC_ID": 1,
238                "SFUNC_CODE": "PARSE_NAME",
239                "SFUNC_DESC": "Parse name",
240                "CONNECT_STR": "g2ParseName",
241                "LANGUAGE": null
242            }
243        ],
244        "SYS_OOM": [
245            {
246                "OOM_TYPE": "RF",
247                "OOM_LEVEL": "SYSDEFAULT",
248                "FTYPE_ID": 0,
249                "THRESH1_CNT": 100,
250                "THRESH1_OOM": 10,
251                "NEXT_THRESH": 1000
252            }
253        ],
254        "CONFIG_BASE_VERSION": {
255            "VERSION": "4.0.0",
256            "BUILD_VERSION": "4.0.0.24103",
257            "BUILD_DATE": "2024-04-12",
258            "BUILD_NUMBER": "24103",
259            "COMPATIBILITY_VERSION": {
260                "CONFIG_VERSION": "11"
261            }
262        }
263    }
264}
abstract get_configs() str[source]

The get_configs method retrieves a list of Senzing configurations from the Senzing database.

Returns:

A JSON document containing Senzing configurations.

Return type:

str

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_configmanager = sz_abstract_factory.create_configmanager()
12    CONFIG_LIST = sz_configmanager.get_configs()
13    print(f"\nFile {__file__}:\n{CONFIG_LIST}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "CONFIGS": [
 5        {
 6            "CONFIG_ID": 41320074,
 7            "CONFIG_COMMENTS": "Default Senzing configuration",
 8            "SYS_CREATE_DT": "YYYY-MM-DD HH:MM:SS.mmm"
 9        },
10        {
11            "CONFIG_ID": 490826130,
12            "CONFIG_COMMENTS": "Test",
13            "SYS_CREATE_DT": "YYYY-MM-DD HH:MM:SS.mmm"
14        }
15    ]
16}
abstract get_default_config_id() int[source]

The get_default_config_id method retrieves from the Senzing database the configuration identifier of the default Senzing configuration.

Returns:

A configuration identifier which identifies the current configuration in use.

Return type:

int

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_configmanager = sz_abstract_factory.create_configmanager()
12    CONFIG_ID = sz_configmanager.get_default_config_id()
13    print(f"\nFile {__file__}:\n{CONFIG_ID}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")
help(method_name: str = '') str[source]

Return the help for a particular message.

Parameters:

method_name (str) – The name of the method. (e.g. “init”). If empty, a list of methods and descriptions is returned.

Returns:

The Help information about the requested method

Return type:

str

abstract replace_default_config_id(current_default_config_id: int, new_default_config_id: int) None[source]

The replace_default_config_id method replaces the old configuration identifier with a new configuration identifier in the Senzing database. It is like a “compare-and-swap” instruction to serialize concurrent editing of configuration. If current_default_config_id is no longer the “current configuration identifier”, the operation will fail. To simply set the default configuration ID, use set_default_config_id.

Parameters:
  • current_default_config_id (int) – The configuration identifier to replace.

  • new_default_config_id (int) – The configuration identifier to use as the default.

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3import time
 4
 5from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 6
 7CONFIG_COMMENT = "Just an example"
 8DATA_SOURCE_CODE = f"REPLACE_DEFAULT_CONFIG_ID_{time.time()}"
 9FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
10    # Differs based on which senzing_xxxx package is used.
11}
12
13try:
14    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
15    sz_config = sz_abstract_factory.create_config()
16    sz_configmanager = sz_abstract_factory.create_configmanager()
17    current_default_config_id = sz_configmanager.get_default_config_id()
18
19    # Create a new config.
20
21    CURRENT_CONFIG_DEFINITION = sz_configmanager.get_config(current_default_config_id)
22    current_config_handle = sz_config.import_config(CURRENT_CONFIG_DEFINITION)
23    sz_config.add_data_source(current_config_handle, DATA_SOURCE_CODE)
24    NEW_CONFIG_DEFINITION = sz_config.export_config(current_config_handle)
25    new_default_config_id = sz_configmanager.add_config(NEW_CONFIG_DEFINITION, CONFIG_COMMENT)
26
27    # Replace default config id.
28
29    sz_configmanager.replace_default_config_id(current_default_config_id, new_default_config_id)
30except SzError as err:
31    print(f"\nFile {__file__}:\nError:\n{err}\n")
abstract set_default_config_id(config_id: int) None[source]

The set_default_config_id method replaces and sets a new configuration identifier in the Senzing database. To serialize modifying of the configuration identifier, see replace_default_config_id.

Parameters:

config_id (int) – The configuration identifier of the Senzing Engine configuration to use as the default.

Raises:

TypeError – Incorrect datatype of input parameter.

Example:
 1#! /usr/bin/env python3
 2
 3import time
 4
 5from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 6
 7CONFIG_COMMENT = "Just an example"
 8DATA_SOURCE_CODE = f"REPLACE_DEFAULT_CONFIG_ID_{time.time()}"
 9FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
10    # Differs based on which senzing_xxxx package is used.
11}
12
13try:
14    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
15    sz_config = sz_abstract_factory.create_config()
16    sz_configmanager = sz_abstract_factory.create_configmanager()
17    old_config_id = sz_configmanager.get_default_config_id()
18
19    # Create a new config.
20
21    OLD_CONFIG_DEFINITION = sz_configmanager.get_config(old_config_id)
22    old_config_handle = sz_config.import_config(OLD_CONFIG_DEFINITION)
23    sz_config.add_data_source(old_config_handle, DATA_SOURCE_CODE)
24    NEW_CONFIG_DEFINITION = sz_config.export_config(old_config_handle)
25    config_id = sz_configmanager.add_config(NEW_CONFIG_DEFINITION, CONFIG_COMMENT)
26
27    # Set default config id.
28
29    sz_configmanager.set_default_config_id(config_id)
30except SzError as err:
31    print(f"\nFile {__file__}:\nError:\n{err}\n")
exception senzing.SzConfigurationError[source]

Bases: SzError

The program can provide a remedy and continue.

exception senzing.SzDatabaseConnectionLostError[source]

Bases: SzRetryableError

Database connection lost

exception senzing.SzDatabaseError[source]

Bases: SzUnrecoverableError

Database exception

class senzing.SzDiagnostic[source]

Bases: ABC

Senzing diagnostic module access library

abstract check_datastore_performance(seconds_to_run: int) str[source]

The check_datastore_performance method performs inserts to determine rate of insertion.

Parameters:

seconds_to_run (int) – Duration of the test in seconds.

Returns:

A string containing a JSON document.

Return type:

str

Raises:
  • TypeError – Incorrect datatype of input parameter.

  • szexception.SzError

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8SECONDS_TO_RUN = 3
 9
10try:
11    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
12    sz_diagnostic = sz_abstract_factory.create_diagnostic()
13    RESULT = sz_diagnostic.check_datastore_performance(SECONDS_TO_RUN)
14    print(f"\nFile {__file__}:\n{RESULT}\n")
15except SzError as err:
16    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{
4    "numRecordsInserted": 0,
5    "insertTime": 0
6}
abstract get_datastore_info() str[source]

The get_datastore_info method returns a JSON document with details of the datastore currently in use by Senzing.

Raises:

szexception.SzError

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_diagnostic = sz_abstract_factory.create_diagnostic()
12    RESULT = sz_diagnostic.get_datastore_info()
13    print(f"\nFile {__file__}:\n{RESULT}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "dataStores": [
 5        {
 6            "id": "CORE",
 7            "type": "sqlite3",
 8            "location": "/tmp/sqlite/G2C.db"
 9        }
10    ]
11}
abstract get_feature(feature_id: int) str[source]

Warning: The get_feature method is an experimental method that returns diagnostic information of a feature. Not recommended for use.

Parameters:

feature_id (int) – The identifier of the feature to describe.

Returns:

A string containing a JSON document

Return type:

str

help(method_name: str = '') str[source]

Return the help for a particular message.

Parameters:

method_name (str) – The name of the method. (e.g. “init”). If empty, a list of methods and descriptions is returned.

Returns:

The Help information about the requested method

Return type:

str

abstract purge_repository() None[source]

Warning: The purge_repository method removes every record in the Senzing repository.

Before calling purge_repository all other instances of the Senzing API MUST be destroyed or shutdown.

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_diagnostic = sz_abstract_factory.create_diagnostic()
12    # WARNING
13    # WARNING - This will remove all loaded and entity resolved data from the Senzing repository, use with caution!
14    # WARNING
15    sz_diagnostic.purge_repository()
16except SzError as err:
17    print(f"\nFile {__file__}:\nError:\n{err}\n")
class senzing.SzEngine[source]

Bases: ABC

Senzing engine module access library

abstract add_record(data_source_code: str, record_id: str, record_definition: str, flags: int = 0) str[source]

The add_record 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:
  • data_source_code (str) – Identifies the provenance of the data.

  • record_id (str) – The unique identifier within the records of the same data source.

  • record_definition (str) – A JSON document containing the record to be added to the Senzing repository.

  • flags (int, optional) – Flags used to control information returned. Defaults to 0.

Returns:

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

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10DATA_SOURCE_CODE = "TEST"
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_WITH_INFO
15RECORD_DEFINITION = (
16    "{"
17    '"RECORD_TYPE": "PERSON",'
18    '"PRIMARY_NAME_LAST": "Smith",'
19    '"PRIMARY_NAME_FIRST": "Robert",'
20    '"DATE_OF_BIRTH": "12/11/1978",'
21    '"ADDR_TYPE": "MAILING",'
22    '"ADDR_LINE1": "123 Main Street, Las Vegas NV 89132",'
23    '"PHONE_TYPE": "HOME",'
24    '"PHONE_NUMBER": "702-919-1300",'
25    '"EMAIL_ADDRESS": "bsmith@work.com",'
26    '"DATE": "1/2/18",'
27    '"STATUS": "Active",'
28    '"AMOUNT": "100"'
29    "}"
30)
31RECORD_ID = "1"
32
33try:
34    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
35    sz_engine = sz_abstract_factory.create_engine()
36    RESULT = sz_engine.add_record(DATA_SOURCE_CODE, RECORD_ID, RECORD_DEFINITION, FLAGS)
37    print(f"\nFile {__file__}:\n{RESULT}\n")
38except SzError as err:
39    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "DATA_SOURCE": "TEST",
 5    "RECORD_ID": "1",
 6    "AFFECTED_ENTITIES": [
 7        {
 8            "ENTITY_ID": 1
 9        },
10        {
11            "ENTITY_ID": 35
12        }
13    ],
14    "INTERESTING_ENTITIES": {
15        "ENTITIES": []
16    }
17}
abstract close_export(export_handle: int) None[source]

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

Parameters:

export_handle (int) – A handle created by export_json_entity_report or export_csv_entity_report.

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
11    # Differs based on which senzing_xxxx package is used.
12}
13FLAGS = SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS
14
15try:
16    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
17    sz_engine = sz_abstract_factory.create_engine()
18    export_handle = sz_engine.export_json_entity_report(FLAGS)
19    RESULT = ""
20    while True:
21        FRAGMENT = sz_engine.fetch_next(export_handle)
22        if len(FRAGMENT) == 0:
23            break
24        RESULT += FRAGMENT
25    sz_engine.close_export(export_handle)
26    print(f"\nFile {__file__}:\n{RESULT}\n")
27except SzError as err:
28    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1{"RESOLVED_ENTITY":{"ENTITY_ID":1,"ENTITY_NAME":"","FEATURES":{},"RECORD_SUMMARY":[{"DATA_SOURCE":"TEST","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"TEST","RECORD_ID":"2","INTERNAL_ID":1,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:38:57Z","LAST_SEEN_DT":"2024-10-25T17:38:57Z"}]},"RELATED_ENTITIES":[]}
2{"RESOLVED_ENTITY":{"ENTITY_ID":35,"ENTITY_NAME":"Robert Smith","FEATURES":{"ADDRESS":[{"FEAT_DESC":"1515 Adela Lane Las Vegas NV 89111","LIB_FEAT_ID":22,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"1515 Adela Lane Las Vegas NV 89111","LIB_FEAT_ID":22}]},{"FEAT_DESC":"123 Main Street, Las Vegas NV 89132","LIB_FEAT_ID":3,"USAGE_TYPE":"MAILING","FEAT_DESC_VALUES":[{"FEAT_DESC":"123 Main Street, Las Vegas NV 89132","LIB_FEAT_ID":3}]}],"DOB":[{"FEAT_DESC":"12/11/1978","LIB_FEAT_ID":2,"FEAT_DESC_VALUES":[{"FEAT_DESC":"12/11/1978","LIB_FEAT_ID":2},{"FEAT_DESC":"11/12/1978","LIB_FEAT_ID":21}]}],"EMAIL":[{"FEAT_DESC":"bsmith@work.com","LIB_FEAT_ID":5,"FEAT_DESC_VALUES":[{"FEAT_DESC":"bsmith@work.com","LIB_FEAT_ID":5}]}],"NAME":[{"FEAT_DESC":"Robert Smith","LIB_FEAT_ID":1,"USAGE_TYPE":"PRIMARY","FEAT_DESC_VALUES":[{"FEAT_DESC":"Robert Smith","LIB_FEAT_ID":1},{"FEAT_DESC":"Bob J Smith","LIB_FEAT_ID":38},{"FEAT_DESC":"Bob Smith","LIB_FEAT_ID":20}]}],"PHONE":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4}]},{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4}]}],"RECORD_TYPE":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10,"FEAT_DESC_VALUES":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"CUSTOMERS","RECORD_COUNT":3}],"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1001","INTERNAL_ID":35,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"},{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1002","INTERNAL_ID":36,"MATCH_KEY":"+NAME+DOB+PHONE","MATCH_LEVEL_CODE":"RESOLVED","ERRULE_CODE":"CNAME_CFF_CEXCL","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"},{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1003","INTERNAL_ID":37,"MATCH_KEY":"+NAME+DOB+EMAIL","MATCH_LEVEL_CODE":"RESOLVED","ERRULE_CODE":"SF1_PNAME_CSTAB","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"}]},"RELATED_ENTITIES":[]}
3{"RESOLVED_ENTITY":{"ENTITY_ID":38,"ENTITY_NAME":"Edward Kusha","FEATURES":{"ADDRESS":[{"FEAT_DESC":"1304 Poppy Hills Dr Blacklick OH 43004","LIB_FEAT_ID":46,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"1304 Poppy Hills Dr Blacklick OH 43004","LIB_FEAT_ID":46}]}],"DOB":[{"FEAT_DESC":"3/1/1970","LIB_FEAT_ID":45,"FEAT_DESC_VALUES":[{"FEAT_DESC":"3/1/1970","LIB_FEAT_ID":45}]}],"EMAIL":[{"FEAT_DESC":"Kusha123@hmail.com","LIB_FEAT_ID":48,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Kusha123@hmail.com","LIB_FEAT_ID":48}]}],"NAME":[{"FEAT_DESC":"Edward Kusha","LIB_FEAT_ID":44,"USAGE_TYPE":"PRIMARY","FEAT_DESC_VALUES":[{"FEAT_DESC":"Edward Kusha","LIB_FEAT_ID":44}]}],"RECORD_TYPE":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10,"FEAT_DESC_VALUES":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10}]}],"SSN":[{"FEAT_DESC":"294-66-9999","LIB_FEAT_ID":47,"FEAT_DESC_VALUES":[{"FEAT_DESC":"294-66-9999","LIB_FEAT_ID":47}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"CUSTOMERS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1009","INTERNAL_ID":38,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"}]},"RELATED_ENTITIES":[]}
abstract count_redo_records() int[source]

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

Returns:

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

Return type:

int

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_engine = sz_abstract_factory.create_engine()
12    RESULT = sz_engine.count_redo_records()
13    print(f"\nFile {__file__}:\n{RESULT}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

12
abstract delete_record(data_source_code: str, record_id: str, flags: int = 0) str[source]

The delete_record method deletes a record from the Senzing repository. Can be called as many times as desired and from multiple threads at the same time.

Parameters:
  • data_source_code (str) – Identifies the provenance of the data.

  • record_id (str) – The unique identifier within the records of the same data source.

  • flags (int, optional) – Flags used to control information returned. Defaults to 0.

Returns:

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

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10DATA_SOURCE_CODE = "TEST"
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_WITH_INFO
15RECORD_ID = "1"
16
17try:
18    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
19    sz_engine = sz_abstract_factory.create_engine()
20    RESULT = sz_engine.delete_record(DATA_SOURCE_CODE, RECORD_ID, FLAGS)
21    print(f"\nFile {__file__}:\n{RESULT}\n")
22except SzError as err:
23    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "DATA_SOURCE": "TEST",
 5    "RECORD_ID": "1",
 6    "AFFECTED_ENTITIES": [
 7        {
 8            "ENTITY_ID": 35
 9        }
10    ],
11    "INTERESTING_ENTITIES": {
12        "ENTITIES": []
13    }
14}
abstract export_csv_entity_report(csv_column_list: str, flags: int = <SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS: 3734497>) int[source]

Warning: export_csv_entity_report is not recommended for large systems as it does not scale. It is recommended larger systems implement real-time replication to a data warehouse.

The export_csv_entity_report method initializes a cursor over a document of exported entities. It is part of the export_csv_entity_report, fetch_next, close_export lifecycle of a list of entities to export.

Available CSV columns: RESOLVED_ENTITY_ID, RESOLVED_ENTITY_NAME, RELATED_ENTITY_ID, MATCH_LEVEL,

MATCH_LEVEL_CODE, MATCH_KEY, MATCH_KEY_DETAILS,I S_DISCLOSED, IS_AMBIGUOUS, DATA_SOURCE, RECORD_ID, JSON_DATA, FIRST_SEEN_DT, LAST_SEEN_DT, UNMAPPED_DATA, ERRULE_CODE, RELATED_ENTITY_NAME

Suggested CSV columns: RESOLVED_ENTITY_ID, RELATED_ENTITY_ID, RESOLVED_ENTITY_NAME, MATCH_LEVEL,

MATCH_KEY, DATA_SOURCE, RECORD_ID

Parameters:
  • csv_column_list (str) – A comma-separated list of column names for the CSV export.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS.

Returns:

A handle that identifies the document to be scrolled through using fetch_next.

Return type:

int

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10CSV_COLUMN_LIST = (
11    "RESOLVED_ENTITY_ID,RELATED_ENTITY_ID,RESOLVED_ENTITY_NAME,MATCH_LEVEL,MATCH_KEY,DATA_SOURCE,RECORD_ID"
12)
13FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
14    # Differs based on which senzing_xxxx package is used.
15}
16FLAGS = SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS
17
18try:
19    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
20    sz_engine = sz_abstract_factory.create_engine()
21    export_handle = sz_engine.export_csv_entity_report(CSV_COLUMN_LIST, FLAGS)
22    RESULT = ""
23    while True:
24        FRAGMENT = sz_engine.fetch_next(export_handle)
25        if len(FRAGMENT) == 0:
26            break
27        RESULT += FRAGMENT
28    sz_engine.close_export(export_handle)
29    print(f"\nFile {__file__}:\n{RESULT}\n")
30except SzError as err:
31    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1RESOLVED_ENTITY_ID,RESOLVED_ENTITY_NAME,RELATED_ENTITY_ID,MATCH_LEVEL,MATCH_KEY,DATA_SOURCE,RECORD_ID
21,"",0,0,"","TEST","2"
335,"Robert Smith",0,0,"","CUSTOMERS","1001"
435,"Robert Smith",0,1,"+NAME+DOB+PHONE","CUSTOMERS","1002"
535,"Robert Smith",0,1,"+NAME+DOB+EMAIL","CUSTOMERS","1003"
638,"Edward Kusha",0,0,"","CUSTOMERS","1009"
abstract export_json_entity_report(flags: int = <SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS: 3734497>) int[source]

Warning: export_json_entity_report is not recommended for large systems as it does not scale. It is recommended larger systems implement real-time replication to a data warehouse.

The export_json_entity_report method initializes a cursor over a document of exported entities. It is part of the export_json_entity_report, fetch_next, close_export lifecycle of a list of entities to export.

Parameters:

flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS.

Returns:

A handle that identifies the document to be scrolled through using fetch_next.

Return type:

int

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
11    # Differs based on which senzing_xxxx package is used.
12}
13FLAGS = SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS
14
15try:
16    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
17    sz_engine = sz_abstract_factory.create_engine()
18    export_handle = sz_engine.export_json_entity_report(FLAGS)
19    RESULT = ""
20    while True:
21        FRAGMENT = sz_engine.fetch_next(export_handle)
22        if len(FRAGMENT) == 0:
23            break
24        RESULT += FRAGMENT
25    sz_engine.close_export(export_handle)
26    print(f"\nFile {__file__}:\n{RESULT}\n")
27except SzError as err:
28    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1{"RESOLVED_ENTITY":{"ENTITY_ID":1,"ENTITY_NAME":"","FEATURES":{},"RECORD_SUMMARY":[{"DATA_SOURCE":"TEST","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"TEST","RECORD_ID":"2","INTERNAL_ID":1,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:38:57Z","LAST_SEEN_DT":"2024-10-25T17:38:57Z"}]},"RELATED_ENTITIES":[]}
2{"RESOLVED_ENTITY":{"ENTITY_ID":35,"ENTITY_NAME":"Robert Smith","FEATURES":{"ADDRESS":[{"FEAT_DESC":"1515 Adela Lane Las Vegas NV 89111","LIB_FEAT_ID":22,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"1515 Adela Lane Las Vegas NV 89111","LIB_FEAT_ID":22}]},{"FEAT_DESC":"123 Main Street, Las Vegas NV 89132","LIB_FEAT_ID":3,"USAGE_TYPE":"MAILING","FEAT_DESC_VALUES":[{"FEAT_DESC":"123 Main Street, Las Vegas NV 89132","LIB_FEAT_ID":3}]}],"DOB":[{"FEAT_DESC":"12/11/1978","LIB_FEAT_ID":2,"FEAT_DESC_VALUES":[{"FEAT_DESC":"12/11/1978","LIB_FEAT_ID":2},{"FEAT_DESC":"11/12/1978","LIB_FEAT_ID":21}]}],"EMAIL":[{"FEAT_DESC":"bsmith@work.com","LIB_FEAT_ID":5,"FEAT_DESC_VALUES":[{"FEAT_DESC":"bsmith@work.com","LIB_FEAT_ID":5}]}],"NAME":[{"FEAT_DESC":"Robert Smith","LIB_FEAT_ID":1,"USAGE_TYPE":"PRIMARY","FEAT_DESC_VALUES":[{"FEAT_DESC":"Robert Smith","LIB_FEAT_ID":1},{"FEAT_DESC":"Bob J Smith","LIB_FEAT_ID":38},{"FEAT_DESC":"Bob Smith","LIB_FEAT_ID":20}]}],"PHONE":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4}]},{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4}]}],"RECORD_TYPE":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10,"FEAT_DESC_VALUES":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"CUSTOMERS","RECORD_COUNT":3}],"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1001","INTERNAL_ID":35,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"},{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1002","INTERNAL_ID":36,"MATCH_KEY":"+NAME+DOB+PHONE","MATCH_LEVEL_CODE":"RESOLVED","ERRULE_CODE":"CNAME_CFF_CEXCL","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"},{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1003","INTERNAL_ID":37,"MATCH_KEY":"+NAME+DOB+EMAIL","MATCH_LEVEL_CODE":"RESOLVED","ERRULE_CODE":"SF1_PNAME_CSTAB","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"}]},"RELATED_ENTITIES":[]}
3{"RESOLVED_ENTITY":{"ENTITY_ID":38,"ENTITY_NAME":"Edward Kusha","FEATURES":{"ADDRESS":[{"FEAT_DESC":"1304 Poppy Hills Dr Blacklick OH 43004","LIB_FEAT_ID":46,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"1304 Poppy Hills Dr Blacklick OH 43004","LIB_FEAT_ID":46}]}],"DOB":[{"FEAT_DESC":"3/1/1970","LIB_FEAT_ID":45,"FEAT_DESC_VALUES":[{"FEAT_DESC":"3/1/1970","LIB_FEAT_ID":45}]}],"EMAIL":[{"FEAT_DESC":"Kusha123@hmail.com","LIB_FEAT_ID":48,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Kusha123@hmail.com","LIB_FEAT_ID":48}]}],"NAME":[{"FEAT_DESC":"Edward Kusha","LIB_FEAT_ID":44,"USAGE_TYPE":"PRIMARY","FEAT_DESC_VALUES":[{"FEAT_DESC":"Edward Kusha","LIB_FEAT_ID":44}]}],"RECORD_TYPE":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10,"FEAT_DESC_VALUES":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10}]}],"SSN":[{"FEAT_DESC":"294-66-9999","LIB_FEAT_ID":47,"FEAT_DESC_VALUES":[{"FEAT_DESC":"294-66-9999","LIB_FEAT_ID":47}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"CUSTOMERS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1009","INTERNAL_ID":38,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"}]},"RELATED_ENTITIES":[]}
abstract fetch_next(export_handle: int) str[source]

The fetch_next method is used to scroll through an exported document one entity at a time. Successive calls of fetch_next will export successive rows of entity data until there is no more. It is part of the export_json_entity_report or export_json_entity_report, fetch_next, close_export lifecycle of a list of exported entities.

Parameters:

export_handle (int) – A handle created by export_json_entity_report or export_json_entity_report.

Returns:

TODO:

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
11    # Differs based on which senzing_xxxx package is used.
12}
13FLAGS = SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS
14
15try:
16    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
17    sz_engine = sz_abstract_factory.create_engine()
18    export_handle = sz_engine.export_json_entity_report(FLAGS)
19    RESULT = ""
20    while True:
21        FRAGMENT = sz_engine.fetch_next(export_handle)
22        if len(FRAGMENT) == 0:
23            break
24        RESULT += FRAGMENT
25    sz_engine.close_export(export_handle)
26    print(f"\nFile {__file__}:\n{RESULT}\n")
27except SzError as err:
28    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1{"RESOLVED_ENTITY":{"ENTITY_ID":1,"ENTITY_NAME":"","FEATURES":{},"RECORD_SUMMARY":[{"DATA_SOURCE":"TEST","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"TEST","RECORD_ID":"2","INTERNAL_ID":1,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:38:57Z","LAST_SEEN_DT":"2024-10-25T17:38:57Z"}]},"RELATED_ENTITIES":[]}
2{"RESOLVED_ENTITY":{"ENTITY_ID":35,"ENTITY_NAME":"Robert Smith","FEATURES":{"ADDRESS":[{"FEAT_DESC":"1515 Adela Lane Las Vegas NV 89111","LIB_FEAT_ID":22,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"1515 Adela Lane Las Vegas NV 89111","LIB_FEAT_ID":22}]},{"FEAT_DESC":"123 Main Street, Las Vegas NV 89132","LIB_FEAT_ID":3,"USAGE_TYPE":"MAILING","FEAT_DESC_VALUES":[{"FEAT_DESC":"123 Main Street, Las Vegas NV 89132","LIB_FEAT_ID":3}]}],"DOB":[{"FEAT_DESC":"12/11/1978","LIB_FEAT_ID":2,"FEAT_DESC_VALUES":[{"FEAT_DESC":"12/11/1978","LIB_FEAT_ID":2},{"FEAT_DESC":"11/12/1978","LIB_FEAT_ID":21}]}],"EMAIL":[{"FEAT_DESC":"bsmith@work.com","LIB_FEAT_ID":5,"FEAT_DESC_VALUES":[{"FEAT_DESC":"bsmith@work.com","LIB_FEAT_ID":5}]}],"NAME":[{"FEAT_DESC":"Robert Smith","LIB_FEAT_ID":1,"USAGE_TYPE":"PRIMARY","FEAT_DESC_VALUES":[{"FEAT_DESC":"Robert Smith","LIB_FEAT_ID":1},{"FEAT_DESC":"Bob J Smith","LIB_FEAT_ID":38},{"FEAT_DESC":"Bob Smith","LIB_FEAT_ID":20}]}],"PHONE":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4}]},{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4,"USAGE_TYPE":"MOBILE","FEAT_DESC_VALUES":[{"FEAT_DESC":"702-919-1300","LIB_FEAT_ID":4}]}],"RECORD_TYPE":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10,"FEAT_DESC_VALUES":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"CUSTOMERS","RECORD_COUNT":3}],"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1001","INTERNAL_ID":35,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"},{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1002","INTERNAL_ID":36,"MATCH_KEY":"+NAME+DOB+PHONE","MATCH_LEVEL_CODE":"RESOLVED","ERRULE_CODE":"CNAME_CFF_CEXCL","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"},{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1003","INTERNAL_ID":37,"MATCH_KEY":"+NAME+DOB+EMAIL","MATCH_LEVEL_CODE":"RESOLVED","ERRULE_CODE":"SF1_PNAME_CSTAB","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"}]},"RELATED_ENTITIES":[]}
3{"RESOLVED_ENTITY":{"ENTITY_ID":38,"ENTITY_NAME":"Edward Kusha","FEATURES":{"ADDRESS":[{"FEAT_DESC":"1304 Poppy Hills Dr Blacklick OH 43004","LIB_FEAT_ID":46,"USAGE_TYPE":"HOME","FEAT_DESC_VALUES":[{"FEAT_DESC":"1304 Poppy Hills Dr Blacklick OH 43004","LIB_FEAT_ID":46}]}],"DOB":[{"FEAT_DESC":"3/1/1970","LIB_FEAT_ID":45,"FEAT_DESC_VALUES":[{"FEAT_DESC":"3/1/1970","LIB_FEAT_ID":45}]}],"EMAIL":[{"FEAT_DESC":"Kusha123@hmail.com","LIB_FEAT_ID":48,"FEAT_DESC_VALUES":[{"FEAT_DESC":"Kusha123@hmail.com","LIB_FEAT_ID":48}]}],"NAME":[{"FEAT_DESC":"Edward Kusha","LIB_FEAT_ID":44,"USAGE_TYPE":"PRIMARY","FEAT_DESC_VALUES":[{"FEAT_DESC":"Edward Kusha","LIB_FEAT_ID":44}]}],"RECORD_TYPE":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10,"FEAT_DESC_VALUES":[{"FEAT_DESC":"PERSON","LIB_FEAT_ID":10}]}],"SSN":[{"FEAT_DESC":"294-66-9999","LIB_FEAT_ID":47,"FEAT_DESC_VALUES":[{"FEAT_DESC":"294-66-9999","LIB_FEAT_ID":47}]}]},"RECORD_SUMMARY":[{"DATA_SOURCE":"CUSTOMERS","RECORD_COUNT":1}],"RECORDS":[{"DATA_SOURCE":"CUSTOMERS","RECORD_ID":"1009","INTERNAL_ID":38,"MATCH_KEY":"","MATCH_LEVEL_CODE":"","ERRULE_CODE":"","FIRST_SEEN_DT":"2024-10-25T17:39:00Z","LAST_SEEN_DT":"2024-10-25T17:39:00Z"}]},"RELATED_ENTITIES":[]}
abstract find_interesting_entities_by_entity_id(entity_id: int, flags: int = 0) str[source]

TODO: Document find_interesting_entities_by_entity_id()

abstract find_interesting_entities_by_record_id(data_source_code: str, record_id: str, flags: int = 0) str[source]

TODO: Document find_interesting_entities_by_record_id()

abstract find_network_by_entity_id(entity_ids: ~typing.List[int], max_degrees: int, build_out_degrees: int, build_out_max_entities: int, flags: int = <SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS: 8589946880>) str[source]

The find_network_by_entity_id 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:
  • entity_ids (list(int)) – The entity IDs to find the network between.

  • max_degrees (int) – The maximum number of degrees in paths between search entities.

  • build_out_degrees (int) – The number of degrees of relationships to show around each search entity.

  • build_out_max_entities (int) – The maximum number of entities to return in the discovered network.

  • flags (int, optional) – The maximum number of entities to return in the discovered network. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10BUILD_OUT_DEGREES = 1
11ENTITY_LIST = [1, 4]
12FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
13    # Differs based on which senzing_xxxx package is used.
14}
15FLAGS = SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS
16MAX_DEGREES = 2
17MAX_ENTITIES = 10
18
19try:
20    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
21    sz_engine = sz_abstract_factory.create_engine()
22    RESULT = sz_engine.find_network_by_entity_id(ENTITY_LIST, MAX_DEGREES, BUILD_OUT_DEGREES, MAX_ENTITIES, FLAGS)
23    print(f"\nFile {__file__}:\n{RESULT}\n")
24except SzError as err:
25    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "ENTITY_PATHS": [
 5        {
 6            "START_ENTITY_ID": 1,
 7            "END_ENTITY_ID": 35,
 8            "ENTITIES": []
 9        }
10    ],
11    "ENTITY_NETWORK_LINKS": [],
12    "ENTITIES": [
13        {
14            "RESOLVED_ENTITY": {
15                "ENTITY_ID": 1,
16                "ENTITY_NAME": "",
17                "RECORD_SUMMARY": [
18                    {
19                        "DATA_SOURCE": "TEST",
20                        "RECORD_COUNT": 1
21                    }
22                ]
23            }
24        },
25        {
26            "RESOLVED_ENTITY": {
27                "ENTITY_ID": 35,
28                "ENTITY_NAME": "Robert Smith",
29                "RECORD_SUMMARY": [
30                    {
31                        "DATA_SOURCE": "CUSTOMERS",
32                        "RECORD_COUNT": 3
33                    }
34                ]
35            }
36        }
37    ]
38}
abstract find_network_by_record_id(record_keys: ~typing.List[~typing.Tuple[str, str]], max_degrees: int, build_out_degrees: int, build_out_max_entities: int, flags: int = <SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS: 8589946880>) str[source]

The find_network_by_record_id method 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:
  • record_keys (list(tuple(str, str))) – The data source codes and record IDs to find the network between.

  • max_degrees (int) – The maximum number of degrees in paths between search entities.

  • build_out_degrees (int) – The number of degrees of relationships to show around each search entity.

  • build_out_max_entities (int) – The maximum number of entities to return in the discovered network.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10BUILD_OUT_DEGREES = 1
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS
15MAX_DEGREES = 2
16MAX_ENTITIES = 10
17RECORD_LIST = [("CUSTOMERS", "1001"), ("CUSTOMERS", "1009")]
18
19try:
20    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
21    sz_engine = sz_abstract_factory.create_engine()
22    RESULT = sz_engine.find_network_by_record_id(RECORD_LIST, MAX_DEGREES, BUILD_OUT_DEGREES, MAX_ENTITIES, FLAGS)
23    print(f"\nFile {__file__}:\n{RESULT}\n")
24except SzError as err:
25    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "ENTITY_PATHS": [
 5        {
 6            "START_ENTITY_ID": 35,
 7            "END_ENTITY_ID": 38,
 8            "ENTITIES": []
 9        }
10    ],
11    "ENTITY_NETWORK_LINKS": [],
12    "ENTITIES": [
13        {
14            "RESOLVED_ENTITY": {
15                "ENTITY_ID": 35,
16                "ENTITY_NAME": "Robert Smith",
17                "RECORD_SUMMARY": [
18                    {
19                        "DATA_SOURCE": "CUSTOMERS",
20                        "RECORD_COUNT": 3
21                    }
22                ]
23            }
24        },
25        {
26            "RESOLVED_ENTITY": {
27                "ENTITY_ID": 38,
28                "ENTITY_NAME": "Edward Kusha",
29                "RECORD_SUMMARY": [
30                    {
31                        "DATA_SOURCE": "CUSTOMERS",
32                        "RECORD_COUNT": 1
33                    }
34                ]
35            }
36        }
37    ]
38}
abstract find_path_by_entity_id(start_entity_id: int, end_entity_id: int, max_degrees: int, avoid_entity_ids: ~typing.List[int] | None = None, required_data_sources: ~typing.List[str] | None = None, flags: int = <SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS: 1073754112>) str[source]

The find_path_by_entity_id method 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:
  • start_entity_id (int) – The entity ID for the starting entity of the search path.

  • end_entity_id (int) – The entity ID for the ending entity of the search path.

  • max_degrees (int) – The maximum number of degrees in paths between search entities.

  • avoid_entity_ids (list(int), optional) – The entity IDs to avoid when finding a path.

  • required_data_sources (list(str), optional) – The data source code(s) that must be in a path.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.

Returns:

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

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from typing import List
 4
 5from senzing_xxxx import (
 6    SzAbstractFactory,
 7    SzAbstractFactoryParameters,
 8    SzEngineFlags,
 9    SzError,
10)
11
12AVOID_ENTITY_IDS: List[int] = []
13END_ENTITY_ID = 4
14FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
15    # Differs based on which senzing_xxxx package is used.
16}
17FLAGS = SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS
18MAX_DEGREES = 2
19REQUIRED_DATA_SOURCES: List[str] = []
20START_ENTITY_ID = 1
21
22try:
23    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
24    sz_engine = sz_abstract_factory.create_engine()
25    RESULT = sz_engine.find_path_by_entity_id(
26        START_ENTITY_ID,
27        END_ENTITY_ID,
28        MAX_DEGREES,
29        AVOID_ENTITY_IDS,
30        REQUIRED_DATA_SOURCES,
31        FLAGS,
32    )
33    print(f"\nFile {__file__}:\n{RESULT}\n")
34except SzError as err:
35    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "ENTITY_PATHS": [
 5        {
 6            "START_ENTITY_ID": 1,
 7            "END_ENTITY_ID": 35,
 8            "ENTITIES": []
 9        }
10    ],
11    "ENTITY_PATH_LINKS": [],
12    "ENTITIES": [
13        {
14            "RESOLVED_ENTITY": {
15                "ENTITY_ID": 1,
16                "ENTITY_NAME": "",
17                "RECORD_SUMMARY": [
18                    {
19                        "DATA_SOURCE": "TEST",
20                        "RECORD_COUNT": 1
21                    }
22                ]
23            }
24        },
25        {
26            "RESOLVED_ENTITY": {
27                "ENTITY_ID": 35,
28                "ENTITY_NAME": "Robert Smith",
29                "RECORD_SUMMARY": [
30                    {
31                        "DATA_SOURCE": "CUSTOMERS",
32                        "RECORD_COUNT": 3
33                    }
34                ]
35            }
36        }
37    ]
38}
abstract find_path_by_record_id(start_data_source_code: str, start_record_id: str, end_data_source_code: str, end_record_id: str, max_degrees: int, avoid_record_keys: ~typing.List[~typing.Tuple[str, str]] | None = None, required_data_sources: ~typing.List[str] | None = None, flags: int = <SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS: 1073754112>) str[source]

The find_path_by_record_id method 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:
  • start_data_source_code (str) – Identifies the provenance of the record for the starting entity of the search path.

  • start_record_id (str) – The unique identifier within the records of the same data source for the starting entity of the search path.

  • end_data_source_code (str) – Identifies the provenance of the record for the ending entity of the search path.

  • end_record_id (str) – The unique identifier within the records of the same data source for the ending entity of the search path.

  • max_degrees (int) – The maximum number of degrees in paths between search entities.

  • avoid_record_keys (list(tuple(str, str)), optional) – The data source codes and record IDs to avoid when finding a path.

  • required_data_sources (list(str), optional) – The data source code(s) that must be in a path.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from typing import List, Tuple
 4
 5from senzing_xxxx import (
 6    SzAbstractFactory,
 7    SzAbstractFactoryParameters,
 8    SzEngineFlags,
 9    SzError,
10)
11
12AVOID_RECORD_KEYS: List[Tuple[str, str]] = []
13END_DATA_SOURCE_CODE = "CUSTOMERS"
14END_RECORD_ID = "1009"
15FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
16    # Differs based on which senzing_xxxx package is used.
17}
18FLAGS = SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS
19MAX_DEGREES = 2
20REQUIRED_DATA_SOURCES: List[str] = []
21START_DATA_SOURCE_CODE = "CUSTOMERS"
22START_RECORD_ID = "1001"
23
24try:
25    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
26    sz_engine = sz_abstract_factory.create_engine()
27    RESULT = sz_engine.find_path_by_record_id(
28        START_DATA_SOURCE_CODE,
29        START_RECORD_ID,
30        END_DATA_SOURCE_CODE,
31        END_RECORD_ID,
32        MAX_DEGREES,
33        AVOID_RECORD_KEYS,
34        REQUIRED_DATA_SOURCES,
35        FLAGS,
36    )
37    print(f"\nFile {__file__}:\n{RESULT}\n")
38except SzError as err:
39    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "ENTITY_PATHS": [
 5        {
 6            "START_ENTITY_ID": 35,
 7            "END_ENTITY_ID": 38,
 8            "ENTITIES": []
 9        }
10    ],
11    "ENTITY_PATH_LINKS": [],
12    "ENTITIES": [
13        {
14            "RESOLVED_ENTITY": {
15                "ENTITY_ID": 35,
16                "ENTITY_NAME": "Robert Smith",
17                "RECORD_SUMMARY": [
18                    {
19                        "DATA_SOURCE": "CUSTOMERS",
20                        "RECORD_COUNT": 3
21                    }
22                ]
23            }
24        },
25        {
26            "RESOLVED_ENTITY": {
27                "ENTITY_ID": 38,
28                "ENTITY_NAME": "Edward Kusha",
29                "RECORD_SUMMARY": [
30                    {
31                        "DATA_SOURCE": "CUSTOMERS",
32                        "RECORD_COUNT": 1
33                    }
34                ]
35            }
36        }
37    ]
38}
abstract get_active_config_id() int[source]

The get_active_config_id method returns the identifier of the currently active Senzing engine configuration.

Returns:

The identifier of the active Senzing Engine configuration.

Return type:

int

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_engine = sz_abstract_factory.create_engine()
12    RESULT = sz_engine.get_active_config_id()
13    print(f"\nFile {__file__}:\n{RESULT}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

14030462317
abstract get_entity_by_entity_id(entity_id: int, flags: int = <SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS: 3734464>) str[source]

The get_entity_by_entity_id method returns entity data based on the ID of a resolved identity.

Parameters:
  • entity_id (int) – The unique identifier of an entity.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10ENTITY_ID = 1
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS
15
16try:
17    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
18    sz_engine = sz_abstract_factory.create_engine()
19    RESULT = sz_engine.get_entity_by_entity_id(ENTITY_ID, FLAGS)
20    print(f"\nFile {__file__}:\n{RESULT}\n")
21except SzError as err:
22    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "RESOLVED_ENTITY": {
 5        "ENTITY_ID": 1,
 6        "ENTITY_NAME": "",
 7        "FEATURES": {},
 8        "RECORD_SUMMARY": [
 9            {
10                "DATA_SOURCE": "TEST",
11                "RECORD_COUNT": 1
12            }
13        ],
14        "RECORDS": [
15            {
16                "DATA_SOURCE": "TEST",
17                "RECORD_ID": "2",
18                "INTERNAL_ID": 1,
19                "MATCH_KEY": "",
20                "MATCH_LEVEL_CODE": "",
21                "ERRULE_CODE": "",
22                "FIRST_SEEN_DT": "YYYY-MM-DDThh:mm:ssZ",
23                "LAST_SEEN_DT": "YYYY-MM-DDThh:mm:ssZ"
24            }
25        ]
26    },
27    "RELATED_ENTITIES": []
28}
abstract get_entity_by_record_id(data_source_code: str, record_id: str, flags: int = <SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS: 3734464>) str[source]

The get_entity_by_record_id method returns entity data based on the ID of a record which is a member of the entity.

Parameters:
  • data_source_code (str) – Identifies the provenance of the data.

  • record_id (str) – The unique identifier within the records of the same data source.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10DATA_SOURCE_CODE = "CUSTOMERS"
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS
15RECORD_ID = "1001"
16
17try:
18    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
19    sz_engine = sz_abstract_factory.create_engine()
20    RESULT = sz_engine.get_entity_by_record_id(DATA_SOURCE_CODE, RECORD_ID, FLAGS)
21    print(f"\nFile {__file__}:\n{RESULT}\n")
22except SzError as err:
23    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted for easier reading.
  2
  3{
  4    "RESOLVED_ENTITY": {
  5        "ENTITY_ID": 35,
  6        "ENTITY_NAME": "Robert Smith",
  7        "FEATURES": {
  8            "ADDRESS": [
  9                {
 10                    "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 11                    "LIB_FEAT_ID": 22,
 12                    "USAGE_TYPE": "HOME",
 13                    "FEAT_DESC_VALUES": [
 14                        {
 15                            "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 16                            "LIB_FEAT_ID": 22
 17                        }
 18                    ]
 19                },
 20                {
 21                    "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 22                    "LIB_FEAT_ID": 3,
 23                    "USAGE_TYPE": "MAILING",
 24                    "FEAT_DESC_VALUES": [
 25                        {
 26                            "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 27                            "LIB_FEAT_ID": 3
 28                        }
 29                    ]
 30                }
 31            ],
 32            "DOB": [
 33                {
 34                    "FEAT_DESC": "12/11/1978",
 35                    "LIB_FEAT_ID": 2,
 36                    "FEAT_DESC_VALUES": [
 37                        {
 38                            "FEAT_DESC": "12/11/1978",
 39                            "LIB_FEAT_ID": 2
 40                        },
 41                        {
 42                            "FEAT_DESC": "11/12/1978",
 43                            "LIB_FEAT_ID": 21
 44                        }
 45                    ]
 46                }
 47            ],
 48            "EMAIL": [
 49                {
 50                    "FEAT_DESC": "bsmith@work.com",
 51                    "LIB_FEAT_ID": 5,
 52                    "FEAT_DESC_VALUES": [
 53                        {
 54                            "FEAT_DESC": "bsmith@work.com",
 55                            "LIB_FEAT_ID": 5
 56                        }
 57                    ]
 58                }
 59            ],
 60            "NAME": [
 61                {
 62                    "FEAT_DESC": "Robert Smith",
 63                    "LIB_FEAT_ID": 1,
 64                    "USAGE_TYPE": "PRIMARY",
 65                    "FEAT_DESC_VALUES": [
 66                        {
 67                            "FEAT_DESC": "Robert Smith",
 68                            "LIB_FEAT_ID": 1
 69                        },
 70                        {
 71                            "FEAT_DESC": "Bob J Smith",
 72                            "LIB_FEAT_ID": 38
 73                        },
 74                        {
 75                            "FEAT_DESC": "Bob Smith",
 76                            "LIB_FEAT_ID": 20
 77                        }
 78                    ]
 79                }
 80            ],
 81            "PHONE": [
 82                {
 83                    "FEAT_DESC": "702-919-1300",
 84                    "LIB_FEAT_ID": 4,
 85                    "USAGE_TYPE": "HOME",
 86                    "FEAT_DESC_VALUES": [
 87                        {
 88                            "FEAT_DESC": "702-919-1300",
 89                            "LIB_FEAT_ID": 4
 90                        }
 91                    ]
 92                },
 93                {
 94                    "FEAT_DESC": "702-919-1300",
 95                    "LIB_FEAT_ID": 4,
 96                    "USAGE_TYPE": "MOBILE",
 97                    "FEAT_DESC_VALUES": [
 98                        {
 99                            "FEAT_DESC": "702-919-1300",
100                            "LIB_FEAT_ID": 4
101                        }
102                    ]
103                }
104            ],
105            "RECORD_TYPE": [
106                {
107                    "FEAT_DESC": "PERSON",
108                    "LIB_FEAT_ID": 10,
109                    "FEAT_DESC_VALUES": [
110                        {
111                            "FEAT_DESC": "PERSON",
112                            "LIB_FEAT_ID": 10
113                        }
114                    ]
115                }
116            ]
117        },
118        "RECORD_SUMMARY": [
119            {
120                "DATA_SOURCE": "CUSTOMERS",
121                "RECORD_COUNT": 3
122            }
123        ],
124        "RECORDS": [
125            {
126                "DATA_SOURCE": "CUSTOMERS",
127                "RECORD_ID": "1001",
128                "INTERNAL_ID": 35,
129                "MATCH_KEY": "",
130                "MATCH_LEVEL_CODE": "",
131                "ERRULE_CODE": "",
132                "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
133                "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
134            },
135            {
136                "DATA_SOURCE": "CUSTOMERS",
137                "RECORD_ID": "1002",
138                "INTERNAL_ID": 36,
139                "MATCH_KEY": "+NAME+DOB+PHONE",
140                "MATCH_LEVEL_CODE": "RESOLVED",
141                "ERRULE_CODE": "CNAME_CFF_CEXCL",
142                "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
143                "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
144            },
145            {
146                "DATA_SOURCE": "CUSTOMERS",
147                "RECORD_ID": "1003",
148                "INTERNAL_ID": 37,
149                "MATCH_KEY": "+NAME+DOB+EMAIL",
150                "MATCH_LEVEL_CODE": "RESOLVED",
151                "ERRULE_CODE": "SF1_PNAME_CSTAB",
152                "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
153                "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
154            }
155        ]
156    },
157    "RELATED_ENTITIES": []
158}
abstract get_record(data_source_code: str, record_id: str, flags: int = <SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_JSON_DATA: 65536>) str[source]

The get_record method 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:
  • data_source_code (str) – Identifies the provenance of the data.

  • record_id (str) – The unique identifier within the records of the same data source.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS.

Returns:

A JSON document of a single record.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10DATA_SOURCE_CODE = "CUSTOMERS"
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS
15RECORD_ID = "1001"
16
17try:
18    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
19    sz_engine = sz_abstract_factory.create_engine()
20    RESULT = sz_engine.get_record(DATA_SOURCE_CODE, RECORD_ID, FLAGS)
21    print(f"\nFile {__file__}:\n{RESULT}\n")
22except SzError as err:
23    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "DATA_SOURCE": "CUSTOMERS",
 5    "RECORD_ID": "1001",
 6    "JSON_DATA": {
 7        "DATA_SOURCE": "CUSTOMERS",
 8        "RECORD_ID": "1001",
 9        "RECORD_TYPE": "PERSON",
10        "PRIMARY_NAME_LAST": "Smith",
11        "PRIMARY_NAME_FIRST": "Robert",
12        "DATE_OF_BIRTH": "12/11/1978",
13        "ADDR_TYPE": "MAILING",
14        "ADDR_LINE1": "123 Main Street, Las Vegas NV 89132",
15        "PHONE_TYPE": "HOME",
16        "PHONE_NUMBER": "702-919-1300",
17        "EMAIL_ADDRESS": "bsmith@work.com",
18        "DATE": "1/2/18",
19        "STATUS": "Active",
20        "AMOUNT": "100"
21    }
22}
abstract get_redo_record() str[source]

The get_redo_record method returns the next internally queued redo record from the Senzing repository. The process_redo_record method is called to process the redo record retrieved by get_redo_record.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_engine = sz_abstract_factory.create_engine()
12    RESULT = sz_engine.get_redo_record()
13    print(f"\nFile {__file__}:\n{RESULT}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1// Output has been formatted for easier reading.
2
3{
4    "REASON": "deferred delete",
5    "DATA_SOURCE": "CUSTOMERS",
6    "RECORD_ID": "1001",
7    "DSRC_ACTION": "X"
8}
abstract get_stats() str[source]

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

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_engine = sz_abstract_factory.create_engine()
12    RESULT = sz_engine.get_stats()
13    print(f"\nFile {__file__}:\n{RESULT}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted for easier reading.
  2
  3{
  4    "workload": {
  5        "apiVersion": "4.0.0.24289",
  6        "loadedRecords": 6,
  7        "addedRecords": 20,
  8        "bulkAddedRecords": 0,
  9        "optimizedOut": 3,
 10        "optimizedOutSkipped": 6,
 11        "newObsEnt": 18,
 12        "obsEntHashSame": 4,
 13        "obsEntHashDiff": 1,
 14        "partiallyResolved": 0,
 15        "deletedRecords": 15,
 16        "changeDeletes": 4,
 17        "reevaluations": 4,
 18        "repairedEntities": 6,
 19        "duration": 96,
 20        "retries": 0,
 21        "candidates": 11,
 22        "actualAmbiguousTest": 0,
 23        "cachedAmbiguousTest": 0,
 24        "libFeatCacheHit": 706,
 25        "libFeatCacheMiss": 589,
 26        "resFeatStatCacheHit": 6211,
 27        "resFeatStatCacheMiss": 1052,
 28        "libFeatInsert": 28,
 29        "resFeatStatInsert": 28,
 30        "resFeatStatUpdateAttempt": 522,
 31        "resFeatStatUpdateFail": 0,
 32        "unresolveTest": 4,
 33        "abortedUnresolve": 0,
 34        "lockWaits": {
 35            "maxRefreshLocksMS": 0,
 36            "totalRefreshLocksMS": 0,
 37            "countRefreshLocks": 0
 38        },
 39        "unresolveTriggers": {
 40            "normalResolve": 0,
 41            "update": 0,
 42            "relLink": 0,
 43            "extensiveResolve": 4,
 44            "ambiguousNoResolve": 0,
 45            "ambiguousMultiResolve": 0
 46        },
 47        "reresolveTriggers": {
 48            "abortRetry": 0,
 49            "unresolveMovement": 0,
 50            "multipleResolvableCandidates": 0,
 51            "resolveNewFeatures": 7,
 52            "newFeatureFTypes": [
 53                {
 54                    "ADDRESS": 5
 55                },
 56                {
 57                    "ADDR_KEY": 5
 58                },
 59                {
 60                    "DOB": 5
 61                },
 62                {
 63                    "NAME": 7
 64                },
 65                {
 66                    "NAMEADDR_KEY": 5
 67                },
 68                {
 69                    "NAMEDATE_KEY": 7
 70                },
 71                {
 72                    "NAMEPHONE_KEY": 5
 73                },
 74                {
 75                    "NAMEREGION_KEY": 5
 76                },
 77                {
 78                    "NAME_KEY": 7
 79                },
 80                {
 81                    "PHONE": 5
 82                }
 83            ]
 84        },
 85        "reresolveSkipped": 1,
 86        "filteredObsFeat": 0,
 87        "expressedFeatureCalls": [
 88            {
 89                "EFCALL_ID": 1,
 90                "EFUNC_CODE": "PHONE_HASHER",
 91                "numCalls": 20
 92            },
 93            {
 94                "EFCALL_ID": 7,
 95                "EFUNC_CODE": "NAME_HASHER",
 96                "numCalls": 45
 97            },
 98            {
 99                "EFCALL_ID": 9,
100                "EFUNC_CODE": "ADDR_HASHER",
101                "numCalls": 21
102            },
103            {
104                "EFCALL_ID": 10,
105                "EFUNC_CODE": "EXPRESS_BOM",
106                "numCalls": 1
107            },
108            {
109                "EFCALL_ID": 16,
110                "EFUNC_CODE": "EXPRESS_ID",
111                "numCalls": 1
112            },
113            {
114                "EFCALL_ID": 34,
115                "EFUNC_CODE": "FEAT_BUILDER",
116                "numCalls": 19
117            },
118            {
119                "EFCALL_ID": 92,
120                "EFUNC_CODE": "NAME_HASHER",
121                "numCalls": 21
122            },
123            {
124                "EFCALL_ID": 94,
125                "EFUNC_CODE": "NAME_HASHER",
126                "numCalls": 45
127            },
128            {
129                "EFCALL_ID": 95,
130                "EFUNC_CODE": "NAME_HASHER",
131                "numCalls": 2
132            },
133            {
134                "EFCALL_ID": 96,
135                "EFUNC_CODE": "NAME_HASHER",
136                "numCalls": 45
137            },
138            {
139                "EFCALL_ID": 97,
140                "EFUNC_CODE": "NAME_HASHER",
141                "numCalls": 45
142            },
143            {
144                "EFCALL_ID": 98,
145                "EFUNC_CODE": "NAME_HASHER",
146                "numCalls": 45
147            }
148        ],
149        "expressedFeaturesCreated": [
150            {
151                "ADDR_KEY": 42
152            },
153            {
154                "EMAIL_KEY": 19
155            },
156            {
157                "ID_KEY": 1
158            },
159            {
160                "NAMEADDR_KEY": 54
161            },
162            {
163                "NAMEDATE_KEY": 99
164            },
165            {
166                "NAMEID_KEY": 2
167            },
168            {
169                "NAMEPHONE_KEY": 25
170            },
171            {
172                "NAMEREGION_KEY": 54
173            },
174            {
175                "NAME_KEY": 35
176            },
177            {
178                "PHONE_KEY": 20
179            },
180            {
181                "SEARCH_KEY": 1
182            }
183        ],
184        "scoredPairs": [
185            {
186                "ADDRESS": 8
187            },
188            {
189                "DOB": 18
190            },
191            {
192                "EMAIL": 5
193            },
194            {
195                "NAME": 29
196            },
197            {
198                "PHONE": 9
199            },
200            {
201                "RECORD_TYPE": 10
202            }
203        ],
204        "cacheHit": [
205            {
206                "DOB": 1
207            },
208            {
209                "NAME": 3
210            }
211        ],
212        "cacheMiss": [
213            {
214                "ADDRESS": 8
215            },
216            {
217                "DOB": 17
218            },
219            {
220                "EMAIL": 5
221            },
222            {
223                "NAME": 26
224            },
225            {
226                "PHONE": 9
227            }
228        ],
229        "redoTriggers": [
230            {
231                "DEFERRED_DELETE": 6
232            }
233        ],
234        "latchContention": [],
235        "highContentionFeat": [],
236        "highContentionResEnt": [],
237        "genericDetect": [],
238        "candidateBuilders": [
239            {
240                "ADDR_KEY": 34
241            },
242            {
243                "DOB": 36
244            },
245            {
246                "EMAIL_KEY": 32
247            },
248            {
249                "ID_KEY": 1
250            },
251            {
252                "NAMEADDR_KEY": 34
253            },
254            {
255                "NAMEDATE_KEY": 36
256            },
257            {
258                "NAMEID_KEY": 1
259            },
260            {
261                "NAMEPHONE_KEY": 33
262            },
263            {
264                "NAMEREGION_KEY": 34
265            },
266            {
267                "NAME_KEY": 37
268            },
269            {
270                "PHONE_KEY": 33
271            },
272            {
273                "SEARCH_KEY": 1
274            },
275            {
276                "SSN": 1
277            }
278        ],
279        "suppressedCandidateBuilders": [],
280        "suppressedScoredFeatureType": [],
281        "suppressedCandidateBuildersForReresolve": [],
282        "suppressedScoredFeatureTypeForReresolve": [],
283        "suppressedDisclosedRelationshipDomainCount": 0,
284        "corruptEntityTestDiagnosis": {
285            "corruptionTypes": 0
286        },
287        "threadState": {
288            "active": 0,
289            "idle": 8,
290            "governorContention": 0,
291            "sqlExecuting": 0,
292            "loader": 0,
293            "resolver": 0,
294            "scoring": 0,
295            "dataLatchContention": 0,
296            "obsEntContention": 0,
297            "resEntContention": 0
298        },
299        "systemResources": {
300            "initResources": [
301                {
302                    "physicalCores": 16
303                },
304                {
305                    "logicalCores": 16
306                },
307                {
308                    "totalMemory": "62.6GB"
309                },
310                {
311                    "availableMemory": "52.7GB"
312                }
313            ],
314            "currResources": [
315                {
316                    "availableMemory": "48.5GB"
317                },
318                {
319                    "activeThreads": 0
320                },
321                {
322                    "workerThreads": 8
323                },
324                {
325                    "systemLoad": [
326                        {
327                            "cpuUser": 5.160142
328                        },
329                        {
330                            "cpuSystem": 3.932384
331                        },
332                        {
333                            "cpuIdle": 90.800713
334                        },
335                        {
336                            "cpuWait": 0.071174
337                        },
338                        {
339                            "cpuSoftIrq": 0.035587
340                        }
341                    ]
342                }
343            ]
344        }
345    }
346}
abstract get_virtual_entity_by_record_id(record_keys: ~typing.List[~typing.Tuple[str, str]], flags: int = <SzEngineFlags.SZ_ENTITY_CORE_FLAGS: 63488>) str[source]

The get_virtual_entity_by_record_id method 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:
  • record_keys (list(tuple(str, str))) – The data source codes and record IDs identifying records to create the virtual entity from.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
11    # Differs based on which senzing_xxxx package is used.
12}
13FLAGS = SzEngineFlags.SZ_VIRTUAL_ENTITY_DEFAULT_FLAGS
14RECORD_LIST = [
15    ("CUSTOMERS", "1001"),
16    ("CUSTOMERS", "1002"),
17]
18
19try:
20    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
21    sz_engine = sz_abstract_factory.create_engine()
22    RESULT = sz_engine.get_virtual_entity_by_record_id(RECORD_LIST, FLAGS)
23    print(f"\nFile {__file__}:\n{RESULT}\n")
24except SzError as err:
25    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted for easier reading.
  2
  3{
  4    "RESOLVED_ENTITY": {
  5        "ENTITY_ID": 35,
  6        "ENTITY_NAME": "Robert Smith",
  7        "FEATURES": {
  8            "ADDRESS": [
  9                {
 10                    "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 11                    "LIB_FEAT_ID": 22,
 12                    "USAGE_TYPE": "HOME",
 13                    "FEAT_DESC_VALUES": [
 14                        {
 15                            "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 16                            "LIB_FEAT_ID": 22
 17                        }
 18                    ]
 19                },
 20                {
 21                    "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 22                    "LIB_FEAT_ID": 3,
 23                    "USAGE_TYPE": "MAILING",
 24                    "FEAT_DESC_VALUES": [
 25                        {
 26                            "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 27                            "LIB_FEAT_ID": 3
 28                        }
 29                    ]
 30                }
 31            ],
 32            "DOB": [
 33                {
 34                    "FEAT_DESC": "12/11/1978",
 35                    "LIB_FEAT_ID": 2,
 36                    "FEAT_DESC_VALUES": [
 37                        {
 38                            "FEAT_DESC": "12/11/1978",
 39                            "LIB_FEAT_ID": 2
 40                        },
 41                        {
 42                            "FEAT_DESC": "11/12/1978",
 43                            "LIB_FEAT_ID": 21
 44                        }
 45                    ]
 46                }
 47            ],
 48            "EMAIL": [
 49                {
 50                    "FEAT_DESC": "bsmith@work.com",
 51                    "LIB_FEAT_ID": 5,
 52                    "FEAT_DESC_VALUES": [
 53                        {
 54                            "FEAT_DESC": "bsmith@work.com",
 55                            "LIB_FEAT_ID": 5
 56                        }
 57                    ]
 58                }
 59            ],
 60            "NAME": [
 61                {
 62                    "FEAT_DESC": "Robert Smith",
 63                    "LIB_FEAT_ID": 1,
 64                    "USAGE_TYPE": "PRIMARY",
 65                    "FEAT_DESC_VALUES": [
 66                        {
 67                            "FEAT_DESC": "Robert Smith",
 68                            "LIB_FEAT_ID": 1
 69                        },
 70                        {
 71                            "FEAT_DESC": "Bob Smith",
 72                            "LIB_FEAT_ID": 20
 73                        }
 74                    ]
 75                }
 76            ],
 77            "PHONE": [
 78                {
 79                    "FEAT_DESC": "702-919-1300",
 80                    "LIB_FEAT_ID": 4,
 81                    "USAGE_TYPE": "HOME",
 82                    "FEAT_DESC_VALUES": [
 83                        {
 84                            "FEAT_DESC": "702-919-1300",
 85                            "LIB_FEAT_ID": 4
 86                        }
 87                    ]
 88                },
 89                {
 90                    "FEAT_DESC": "702-919-1300",
 91                    "LIB_FEAT_ID": 4,
 92                    "USAGE_TYPE": "MOBILE",
 93                    "FEAT_DESC_VALUES": [
 94                        {
 95                            "FEAT_DESC": "702-919-1300",
 96                            "LIB_FEAT_ID": 4
 97                        }
 98                    ]
 99                }
100            ],
101            "RECORD_TYPE": [
102                {
103                    "FEAT_DESC": "PERSON",
104                    "LIB_FEAT_ID": 10,
105                    "FEAT_DESC_VALUES": [
106                        {
107                            "FEAT_DESC": "PERSON",
108                            "LIB_FEAT_ID": 10
109                        }
110                    ]
111                }
112            ]
113        },
114        "RECORD_SUMMARY": [
115            {
116                "DATA_SOURCE": "CUSTOMERS",
117                "RECORD_COUNT": 2
118            }
119        ],
120        "RECORDS": [
121            {
122                "DATA_SOURCE": "CUSTOMERS",
123                "RECORD_ID": "1001",
124                "INTERNAL_ID": 35,
125                "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
126                "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
127            },
128            {
129                "DATA_SOURCE": "CUSTOMERS",
130                "RECORD_ID": "1002",
131                "INTERNAL_ID": 36,
132                "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
133                "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
134            }
135        ]
136    }
137}
help(method_name: str = '') str[source]

Return the help for a particular message.

Parameters:

method_name (str) – The name of the method. (e.g. “init”). If empty, a list of methods and descriptions is returned.

Returns:

The Help information about the requested method

Return type:

str

abstract how_entity_by_entity_id(entity_id: int, flags: int = <SzEngineFlags.SZ_INCLUDE_FEATURE_SCORES: 67108864>) str[source]

The how_entity_by_entity_id method 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:
  • entity_id (int) – The unique identifier of an entity.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10ENTITY_ID = 1
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS
15
16try:
17    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
18    sz_engine = sz_abstract_factory.create_engine()
19    RESULT = sz_engine.how_entity_by_entity_id(ENTITY_ID, FLAGS)
20    print(f"\nFile {__file__}:\n{RESULT}\n")
21except SzError as err:
22    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "HOW_RESULTS": {
 5        "RESOLUTION_STEPS": [],
 6        "FINAL_STATE": {
 7            "NEED_REEVALUATION": 0,
 8            "VIRTUAL_ENTITIES": [
 9                {
10                    "VIRTUAL_ENTITY_ID": "V1",
11                    "MEMBER_RECORDS": [
12                        {
13                            "INTERNAL_ID": 1,
14                            "RECORDS": [
15                                {
16                                    "DATA_SOURCE": "TEST",
17                                    "RECORD_ID": "2"
18                                }
19                            ]
20                        }
21                    ]
22                }
23            ]
24        }
25    }
26}
abstract preprocess_record(record_definition: str, flags: int = <SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_JSON_DATA: 65536>) str[source]

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

Parameters:
  • record_definition (str) – A JSON document containing the record to be tested.

  • flags (int, optional) – Flags used to control information returned. Defaults to 0.

Returns:

A JSON document containing metadata as specified by the flags.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
11    # Differs based on which senzing_xxxx package is used.
12}
13FLAGS = SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS
14RECORD_DEFINITION = (
15    "{"
16    '"RECORD_TYPE": "PERSON",'
17    '"PRIMARY_NAME_LAST": "Smith",'
18    '"PRIMARY_NAME_FIRST": "Robert",'
19    '"DATE_OF_BIRTH": "12/11/1978",'
20    '"ADDR_TYPE": "MAILING",'
21    '"ADDR_LINE1": "123 Main Street, Las Vegas NV 89132",'
22    '"PHONE_TYPE": "HOME",'
23    '"PHONE_NUMBER": "702-919-1300",'
24    '"EMAIL_ADDRESS": "bsmith@work.com",'
25    '"DATE": "1/2/18",'
26    '"STATUS": "Active",'
27    '"AMOUNT": "100"'
28    "}"
29)
30
31try:
32    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
33    sz_engine = sz_abstract_factory.create_engine()
34    RESULT = sz_engine.preprocess_record(RECORD_DEFINITION, FLAGS)
35    print(f"\nFile {__file__}:\n{RESULT}\n")
36except SzError as err:
37    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

1
abstract prime_engine() None[source]

The prime_engine method 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.

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_engine = sz_abstract_factory.create_engine()
12    sz_engine.prime_engine()
13except SzError as err:
14    print(f"\nFile {__file__}:\nError:\n{err}\n")
abstract process_redo_record(redo_record: str, flags: int = 0) str[source]

The process_redo_record method is called to process the redo record retrieved by get_redo_record.

Parameters:
  • redo_record (str) – A redo record retrieved from get_redo_record.

  • flags (int, optional) – Flags used to control information returned. Defaults to 0.

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
11    # Differs based on which senzing_xxxx package is used.
12}
13FLAGS = SzEngineFlags.SZ_WITH_INFO
14
15try:
16    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
17    sz_engine = sz_abstract_factory.create_engine()
18    while sz_engine.count_redo_records() > 0:
19        REDO_RECORD = sz_engine.get_redo_record()
20        RESULT = sz_engine.process_redo_record(REDO_RECORD, FLAGS)
21        print(f"\nFile {__file__}:\n{RESULT}\n")
22except SzError as err:
23    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4  "DATA_SOURCE": "CUSTOMERS",
 5  "RECORD_ID": "2207",
 6  "AFFECTED_ENTITIES": [
 7    {
 8      "ENTITY_ID": 305
 9    }
10  ],
11  "INTERESTING_ENTITIES": {
12    "ENTITIES": []
13  }
14}
abstract reevaluate_entity(entity_id: int, flags: int = 0) str[source]

The reevaluate_entity method reevaluates the specified entity.

Parameters:
  • entity_id (int) – The unique identifier of an entity.

  • flags (int, optional) – Flags used to control information returned. Defaults to 0.

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10ENTITY_ID = 1
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_WITH_INFO
15
16try:
17    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
18    sz_engine = sz_abstract_factory.create_engine()
19    RESULT = sz_engine.reevaluate_entity(ENTITY_ID, FLAGS)
20    print(f"\nFile {__file__}:\n{RESULT}\n")
21except SzError as err:
22    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "DATA_SOURCE": "TEST",
 5    "RECORD_ID": "2",
 6    "AFFECTED_ENTITIES": [
 7        {
 8            "ENTITY_ID": 1
 9        }
10    ],
11    "INTERESTING_ENTITIES": {
12        "ENTITIES": []
13    }
14}
abstract reevaluate_record(data_source_code: str, record_id: str, flags: int = 0) str[source]

The reevaluate_record method reevaluates a specific record.

Parameters:
  • data_source_code (str) – Identifies the provenance of the data.

  • record_id (str) – The unique identifier within the records of the same data source.

  • flags (int, optional) – Flags used to control information returned. Defaults to 0.

Returns:

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

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10DATA_SOURCE_CODE = "CUSTOMERS"
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_WITH_INFO
15RECORD_ID = "1001"
16
17try:
18    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
19    sz_engine = sz_abstract_factory.create_engine()
20    RESULT = sz_engine.reevaluate_record(DATA_SOURCE_CODE, RECORD_ID, FLAGS)
21    print(f"\nFile {__file__}:\n{RESULT}\n")
22except SzError as err:
23    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "DATA_SOURCE": "CUSTOMERS",
 5    "RECORD_ID": "1001",
 6    "AFFECTED_ENTITIES": [
 7        {
 8            "ENTITY_ID": 35
 9        }
10    ],
11    "INTERESTING_ENTITIES": {
12        "ENTITIES": []
13    }
14}
abstract search_by_attributes(attributes: str, flags: int = <SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_ALL: 67123215>, search_profile: str = '') str[source]

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

Parameters:
  • attributes (str) – A JSON document with the attribute data to search for.

  • flags (int, optional) – _description_. Defaults to SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS.

  • search_profile (str) – The name of a configured search profile. Defaults to SEARCH.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3import json
 4
 5from senzing_xxxx import (
 6    SzAbstractFactory,
 7    SzAbstractFactoryParameters,
 8    SzEngineFlags,
 9    SzError,
10)
11
12ATTRIBUTES = json.dumps({"NAME_FULL": "BOB SMITH", "EMAIL_ADDRESS": "bsmith@work.com"})
13FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
14    # Differs based on which senzing_xxxx package is used.
15}
16FLAGS = SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS
17SEARCH_PROFILE = ""
18
19try:
20    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
21    sz_engine = sz_abstract_factory.create_engine()
22    RESULT = sz_engine.search_by_attributes(ATTRIBUTES, FLAGS, SEARCH_PROFILE)
23    print(f"\nFile {__file__}:\n{RESULT}\n")
24except SzError as err:
25    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted for easier reading.
  2{
  3    "RESOLVED_ENTITIES": [
  4        {
  5            "MATCH_INFO": {
  6                "MATCH_LEVEL_CODE": "RESOLVED",
  7                "MATCH_KEY": "+NAME+EMAIL",
  8                "ERRULE_CODE": "SF1_CNAME",
  9                "FEATURE_SCORES": {
 10                    "EMAIL": [
 11                        {
 12                            "INBOUND_FEAT_ID": 5,
 13                            "INBOUND_FEAT_DESC": "bsmith@work.com",
 14                            "INBOUND_FEAT_USAGE_TYPE": "",
 15                            "CANDIDATE_FEAT_ID": 5,
 16                            "CANDIDATE_FEAT_DESC": "bsmith@work.com",
 17                            "CANDIDATE_FEAT_USAGE_TYPE": "",
 18                            "SCORE": 100,
 19                            "ADDITIONAL_SCORES": {
 20                                "FULL_SCORE": 100
 21                            },
 22                            "SCORE_BUCKET": "SAME",
 23                            "SCORE_BEHAVIOR": "F1"
 24                        }
 25                    ],
 26                    "NAME": [
 27                        {
 28                            "INBOUND_FEAT_ID": -2,
 29                            "INBOUND_FEAT_DESC": "BOB SMITH",
 30                            "INBOUND_FEAT_USAGE_TYPE": "",
 31                            "CANDIDATE_FEAT_ID": 38,
 32                            "CANDIDATE_FEAT_DESC": "Bob J Smith",
 33                            "CANDIDATE_FEAT_USAGE_TYPE": "PRIMARY",
 34                            "SCORE": 93,
 35                            "ADDITIONAL_SCORES": {
 36                                "GENERATION_MATCH": -1,
 37                                "GNR_FN": 93,
 38                                "GNR_GN": -1,
 39                                "GNR_ON": -1,
 40                                "GNR_SN": -1
 41                            },
 42                            "SCORE_BUCKET": "CLOSE",
 43                            "SCORE_BEHAVIOR": "NAME"
 44                        },
 45                        {
 46                            "INBOUND_FEAT_ID": -2,
 47                            "INBOUND_FEAT_DESC": "BOB SMITH",
 48                            "INBOUND_FEAT_USAGE_TYPE": "",
 49                            "CANDIDATE_FEAT_ID": 1,
 50                            "CANDIDATE_FEAT_DESC": "Robert Smith",
 51                            "CANDIDATE_FEAT_USAGE_TYPE": "PRIMARY",
 52                            "SCORE": 97,
 53                            "ADDITIONAL_SCORES": {
 54                                "GENERATION_MATCH": -1,
 55                                "GNR_FN": 97,
 56                                "GNR_GN": -1,
 57                                "GNR_ON": -1,
 58                                "GNR_SN": -1
 59                            },
 60                            "SCORE_BUCKET": "CLOSE",
 61                            "SCORE_BEHAVIOR": "NAME"
 62                        }
 63                    ]
 64                }
 65            },
 66            "ENTITY": {
 67                "RESOLVED_ENTITY": {
 68                    "ENTITY_ID": 35,
 69                    "ENTITY_NAME": "Robert Smith",
 70                    "FEATURES": {
 71                        "ADDRESS": [
 72                            {
 73                                "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 74                                "LIB_FEAT_ID": 22,
 75                                "USAGE_TYPE": "HOME",
 76                                "FEAT_DESC_VALUES": [
 77                                    {
 78                                        "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 79                                        "LIB_FEAT_ID": 22
 80                                    }
 81                                ]
 82                            },
 83                            {
 84                                "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 85                                "LIB_FEAT_ID": 3,
 86                                "USAGE_TYPE": "MAILING",
 87                                "FEAT_DESC_VALUES": [
 88                                    {
 89                                        "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 90                                        "LIB_FEAT_ID": 3
 91                                    }
 92                                ]
 93                            }
 94                        ],
 95                        "DOB": [
 96                            {
 97                                "FEAT_DESC": "12/11/1978",
 98                                "LIB_FEAT_ID": 2,
 99                                "FEAT_DESC_VALUES": [
100                                    {
101                                        "FEAT_DESC": "12/11/1978",
102                                        "LIB_FEAT_ID": 2
103                                    },
104                                    {
105                                        "FEAT_DESC": "11/12/1978",
106                                        "LIB_FEAT_ID": 21
107                                    }
108                                ]
109                            }
110                        ],
111                        "EMAIL": [
112                            {
113                                "FEAT_DESC": "bsmith@work.com",
114                                "LIB_FEAT_ID": 5,
115                                "FEAT_DESC_VALUES": [
116                                    {
117                                        "FEAT_DESC": "bsmith@work.com",
118                                        "LIB_FEAT_ID": 5
119                                    }
120                                ]
121                            }
122                        ],
123                        "NAME": [
124                            {
125                                "FEAT_DESC": "Robert Smith",
126                                "LIB_FEAT_ID": 1,
127                                "USAGE_TYPE": "PRIMARY",
128                                "FEAT_DESC_VALUES": [
129                                    {
130                                        "FEAT_DESC": "Robert Smith",
131                                        "LIB_FEAT_ID": 1
132                                    },
133                                    {
134                                        "FEAT_DESC": "Bob J Smith",
135                                        "LIB_FEAT_ID": 38
136                                    },
137                                    {
138                                        "FEAT_DESC": "Bob Smith",
139                                        "LIB_FEAT_ID": 20
140                                    }
141                                ]
142                            }
143                        ],
144                        "PHONE": [
145                            {
146                                "FEAT_DESC": "702-919-1300",
147                                "LIB_FEAT_ID": 4,
148                                "USAGE_TYPE": "HOME",
149                                "FEAT_DESC_VALUES": [
150                                    {
151                                        "FEAT_DESC": "702-919-1300",
152                                        "LIB_FEAT_ID": 4
153                                    }
154                                ]
155                            },
156                            {
157                                "FEAT_DESC": "702-919-1300",
158                                "LIB_FEAT_ID": 4,
159                                "USAGE_TYPE": "MOBILE",
160                                "FEAT_DESC_VALUES": [
161                                    {
162                                        "FEAT_DESC": "702-919-1300",
163                                        "LIB_FEAT_ID": 4
164                                    }
165                                ]
166                            }
167                        ],
168                        "RECORD_TYPE": [
169                            {
170                                "FEAT_DESC": "PERSON",
171                                "LIB_FEAT_ID": 10,
172                                "FEAT_DESC_VALUES": [
173                                    {
174                                        "FEAT_DESC": "PERSON",
175                                        "LIB_FEAT_ID": 10
176                                    }
177                                ]
178                            }
179                        ]
180                    },
181                    "RECORD_SUMMARY": [
182                        {
183                            "DATA_SOURCE": "CUSTOMERS",
184                            "RECORD_COUNT": 3
185                        }
186                    ]
187                }
188            }
189        }
190    ]
191}
abstract why_entities(entity_id_1: int, entity_id_2: int, flags: int = <SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS: 96009152>) str[source]

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

Parameters:
  • entity_id_1 (int) – The entity ID for the starting entity of the search path.

  • entity_id_2 (int) – The entity ID for the ending entity of the search path.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_WHY_ENTITY_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10ENTITY_ID_1 = 1
11ENTITY_ID_2 = 4
12FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
13    # Differs based on which senzing_xxxx package is used.
14}
15FLAGS = SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS
16
17try:
18    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
19    sz_engine = sz_abstract_factory.create_engine()
20    RESULT = sz_engine.why_entities(
21        ENTITY_ID_1,
22        ENTITY_ID_2,
23        FLAGS,
24    )
25    print(f"\nFile {__file__}:\n{RESULT}\n")
26except SzError as err:
27    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted for easier reading.
  2
  3{
  4    "WHY_RESULTS": [
  5        {
  6            "ENTITY_ID": 1,
  7            "ENTITY_ID_2": 35,
  8            "MATCH_INFO": {
  9                "WHY_KEY": "",
 10                "WHY_ERRULE_CODE": "",
 11                "MATCH_LEVEL_CODE": "",
 12                "CANDIDATE_KEYS": {},
 13                "DISCLOSED_RELATIONS": {},
 14                "FEATURE_SCORES": {}
 15            }
 16        }
 17    ],
 18    "ENTITIES": [
 19        {
 20            "RESOLVED_ENTITY": {
 21                "ENTITY_ID": 1,
 22                "ENTITY_NAME": "",
 23                "FEATURES": {},
 24                "RECORD_SUMMARY": [
 25                    {
 26                        "DATA_SOURCE": "TEST",
 27                        "RECORD_COUNT": 1
 28                    }
 29                ],
 30                "RECORDS": [
 31                    {
 32                        "DATA_SOURCE": "TEST",
 33                        "RECORD_ID": "2",
 34                        "INTERNAL_ID": 1,
 35                        "MATCH_KEY": "",
 36                        "MATCH_LEVEL_CODE": "",
 37                        "ERRULE_CODE": "",
 38                        "FIRST_SEEN_DT": "2024-10-25T17:38:57Z",
 39                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
 40                    }
 41                ]
 42            },
 43            "RELATED_ENTITIES": []
 44        },
 45        {
 46            "RESOLVED_ENTITY": {
 47                "ENTITY_ID": 35,
 48                "ENTITY_NAME": "Robert Smith",
 49                "FEATURES": {
 50                    "ADDRESS": [
 51                        {
 52                            "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 53                            "LIB_FEAT_ID": 22,
 54                            "USAGE_TYPE": "HOME",
 55                            "FEAT_DESC_VALUES": [
 56                                {
 57                                    "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 58                                    "LIB_FEAT_ID": 22,
 59                                    "USED_FOR_CAND": "N",
 60                                    "USED_FOR_SCORING": "Y",
 61                                    "ENTITY_COUNT": 1,
 62                                    "CANDIDATE_CAP_REACHED": "N",
 63                                    "SCORING_CAP_REACHED": "N",
 64                                    "SUPPRESSED": "N"
 65                                }
 66                            ]
 67                        },
 68                        {
 69                            "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 70                            "LIB_FEAT_ID": 3,
 71                            "USAGE_TYPE": "MAILING",
 72                            "FEAT_DESC_VALUES": [
 73                                {
 74                                    "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 75                                    "LIB_FEAT_ID": 3,
 76                                    "USED_FOR_CAND": "N",
 77                                    "USED_FOR_SCORING": "Y",
 78                                    "ENTITY_COUNT": 1,
 79                                    "CANDIDATE_CAP_REACHED": "N",
 80                                    "SCORING_CAP_REACHED": "N",
 81                                    "SUPPRESSED": "N"
 82                                }
 83                            ]
 84                        }
 85                    ],
 86                    "ADDR_KEY": [
 87                        {
 88                            "FEAT_DESC": "123|MN||89132",
 89                            "LIB_FEAT_ID": 8,
 90                            "FEAT_DESC_VALUES": [
 91                                {
 92                                    "FEAT_DESC": "123|MN||89132",
 93                                    "LIB_FEAT_ID": 8,
 94                                    "USED_FOR_CAND": "Y",
 95                                    "USED_FOR_SCORING": "N",
 96                                    "ENTITY_COUNT": 1,
 97                                    "CANDIDATE_CAP_REACHED": "N",
 98                                    "SCORING_CAP_REACHED": "N",
 99                                    "SUPPRESSED": "N"
100                                }
101                            ]
102                        },
103                        {
104                            "FEAT_DESC": "123|MN||LS FKS",
105                            "LIB_FEAT_ID": 7,
106                            "FEAT_DESC_VALUES": [
107                                {
108                                    "FEAT_DESC": "123|MN||LS FKS",
109                                    "LIB_FEAT_ID": 7,
110                                    "USED_FOR_CAND": "Y",
111                                    "USED_FOR_SCORING": "N",
112                                    "ENTITY_COUNT": 1,
113                                    "CANDIDATE_CAP_REACHED": "N",
114                                    "SCORING_CAP_REACHED": "N",
115                                    "SUPPRESSED": "N"
116                                }
117                            ]
118                        },
119                        {
120                            "FEAT_DESC": "1515|ATL||89111",
121                            "LIB_FEAT_ID": 24,
122                            "FEAT_DESC_VALUES": [
123                                {
124                                    "FEAT_DESC": "1515|ATL||89111",
125                                    "LIB_FEAT_ID": 24,
126                                    "USED_FOR_CAND": "Y",
127                                    "USED_FOR_SCORING": "N",
128                                    "ENTITY_COUNT": 1,
129                                    "CANDIDATE_CAP_REACHED": "N",
130                                    "SCORING_CAP_REACHED": "N",
131                                    "SUPPRESSED": "N"
132                                }
133                            ]
134                        },
135                        {
136                            "FEAT_DESC": "1515|ATL||LS FKS",
137                            "LIB_FEAT_ID": 25,
138                            "FEAT_DESC_VALUES": [
139                                {
140                                    "FEAT_DESC": "1515|ATL||LS FKS",
141                                    "LIB_FEAT_ID": 25,
142                                    "USED_FOR_CAND": "Y",
143                                    "USED_FOR_SCORING": "N",
144                                    "ENTITY_COUNT": 1,
145                                    "CANDIDATE_CAP_REACHED": "N",
146                                    "SCORING_CAP_REACHED": "N",
147                                    "SUPPRESSED": "N"
148                                }
149                            ]
150                        }
151                    ],
152                    "DOB": [
153                        {
154                            "FEAT_DESC": "12/11/1978",
155                            "LIB_FEAT_ID": 2,
156                            "FEAT_DESC_VALUES": [
157                                {
158                                    "FEAT_DESC": "12/11/1978",
159                                    "LIB_FEAT_ID": 2,
160                                    "USED_FOR_CAND": "Y",
161                                    "USED_FOR_SCORING": "Y",
162                                    "ENTITY_COUNT": 1,
163                                    "CANDIDATE_CAP_REACHED": "N",
164                                    "SCORING_CAP_REACHED": "N",
165                                    "SUPPRESSED": "N"
166                                },
167                                {
168                                    "FEAT_DESC": "11/12/1978",
169                                    "LIB_FEAT_ID": 21,
170                                    "USED_FOR_CAND": "Y",
171                                    "USED_FOR_SCORING": "Y",
172                                    "ENTITY_COUNT": 1,
173                                    "CANDIDATE_CAP_REACHED": "N",
174                                    "SCORING_CAP_REACHED": "N",
175                                    "SUPPRESSED": "N"
176                                }
177                            ]
178                        }
179                    ],
180                    "EMAIL": [
181                        {
182                            "FEAT_DESC": "bsmith@work.com",
183                            "LIB_FEAT_ID": 5,
184                            "FEAT_DESC_VALUES": [
185                                {
186                                    "FEAT_DESC": "bsmith@work.com",
187                                    "LIB_FEAT_ID": 5,
188                                    "USED_FOR_CAND": "N",
189                                    "USED_FOR_SCORING": "Y",
190                                    "ENTITY_COUNT": 1,
191                                    "CANDIDATE_CAP_REACHED": "N",
192                                    "SCORING_CAP_REACHED": "N",
193                                    "SUPPRESSED": "N"
194                                }
195                            ]
196                        }
197                    ],
198                    "EMAIL_KEY": [
199                        {
200                            "FEAT_DESC": "bsmith@WORK.COM",
201                            "LIB_FEAT_ID": 11,
202                            "FEAT_DESC_VALUES": [
203                                {
204                                    "FEAT_DESC": "bsmith@WORK.COM",
205                                    "LIB_FEAT_ID": 11,
206                                    "USED_FOR_CAND": "Y",
207                                    "USED_FOR_SCORING": "N",
208                                    "ENTITY_COUNT": 1,
209                                    "CANDIDATE_CAP_REACHED": "N",
210                                    "SCORING_CAP_REACHED": "N",
211                                    "SUPPRESSED": "N"
212                                }
213                            ]
214                        }
215                    ],
216                    "NAME": [
217                        {
218                            "FEAT_DESC": "Robert Smith",
219                            "LIB_FEAT_ID": 1,
220                            "USAGE_TYPE": "PRIMARY",
221                            "FEAT_DESC_VALUES": [
222                                {
223                                    "FEAT_DESC": "Robert Smith",
224                                    "LIB_FEAT_ID": 1,
225                                    "USED_FOR_CAND": "N",
226                                    "USED_FOR_SCORING": "Y",
227                                    "ENTITY_COUNT": 1,
228                                    "CANDIDATE_CAP_REACHED": "N",
229                                    "SCORING_CAP_REACHED": "N",
230                                    "SUPPRESSED": "N"
231                                },
232                                {
233                                    "FEAT_DESC": "Bob J Smith",
234                                    "LIB_FEAT_ID": 38,
235                                    "USED_FOR_CAND": "N",
236                                    "USED_FOR_SCORING": "Y",
237                                    "ENTITY_COUNT": 1,
238                                    "CANDIDATE_CAP_REACHED": "N",
239                                    "SCORING_CAP_REACHED": "N",
240                                    "SUPPRESSED": "N"
241                                },
242                                {
243                                    "FEAT_DESC": "Bob Smith",
244                                    "LIB_FEAT_ID": 20,
245                                    "USED_FOR_CAND": "N",
246                                    "USED_FOR_SCORING": "Y",
247                                    "ENTITY_COUNT": 1,
248                                    "CANDIDATE_CAP_REACHED": "N",
249                                    "SCORING_CAP_REACHED": "N",
250                                    "SUPPRESSED": "Y"
251                                }
252                            ]
253                        }
254                    ],
255                    "NAMEADDR_KEY": [
256                        {
257                            "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
258                            "LIB_FEAT_ID": 27,
259                            "FEAT_DESC_VALUES": [
260                                {
261                                    "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
262                                    "LIB_FEAT_ID": 27,
263                                    "USED_FOR_CAND": "Y",
264                                    "USED_FOR_SCORING": "N",
265                                    "ENTITY_COUNT": 1,
266                                    "CANDIDATE_CAP_REACHED": "N",
267                                    "SCORING_CAP_REACHED": "N",
268                                    "SUPPRESSED": "N"
269                                }
270                            ]
271                        },
272                        {
273                            "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
274                            "LIB_FEAT_ID": 28,
275                            "FEAT_DESC_VALUES": [
276                                {
277                                    "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
278                                    "LIB_FEAT_ID": 28,
279                                    "USED_FOR_CAND": "Y",
280                                    "USED_FOR_SCORING": "N",
281                                    "ENTITY_COUNT": 1,
282                                    "CANDIDATE_CAP_REACHED": "N",
283                                    "SCORING_CAP_REACHED": "N",
284                                    "SUPPRESSED": "N"
285                                }
286                            ]
287                        },
288                        {
289                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||89132",
290                            "LIB_FEAT_ID": 12,
291                            "FEAT_DESC_VALUES": [
292                                {
293                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||89132",
294                                    "LIB_FEAT_ID": 12,
295                                    "USED_FOR_CAND": "Y",
296                                    "USED_FOR_SCORING": "N",
297                                    "ENTITY_COUNT": 1,
298                                    "CANDIDATE_CAP_REACHED": "N",
299                                    "SCORING_CAP_REACHED": "N",
300                                    "SUPPRESSED": "N"
301                                }
302                            ]
303                        },
304                        {
305                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||LS FKS",
306                            "LIB_FEAT_ID": 13,
307                            "FEAT_DESC_VALUES": [
308                                {
309                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||LS FKS",
310                                    "LIB_FEAT_ID": 13,
311                                    "USED_FOR_CAND": "Y",
312                                    "USED_FOR_SCORING": "N",
313                                    "ENTITY_COUNT": 1,
314                                    "CANDIDATE_CAP_REACHED": "N",
315                                    "SCORING_CAP_REACHED": "N",
316                                    "SUPPRESSED": "N"
317                                }
318                            ]
319                        },
320                        {
321                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
322                            "LIB_FEAT_ID": 29,
323                            "FEAT_DESC_VALUES": [
324                                {
325                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
326                                    "LIB_FEAT_ID": 29,
327                                    "USED_FOR_CAND": "Y",
328                                    "USED_FOR_SCORING": "N",
329                                    "ENTITY_COUNT": 1,
330                                    "CANDIDATE_CAP_REACHED": "N",
331                                    "SCORING_CAP_REACHED": "N",
332                                    "SUPPRESSED": "N"
333                                }
334                            ]
335                        },
336                        {
337                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
338                            "LIB_FEAT_ID": 26,
339                            "FEAT_DESC_VALUES": [
340                                {
341                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
342                                    "LIB_FEAT_ID": 26,
343                                    "USED_FOR_CAND": "Y",
344                                    "USED_FOR_SCORING": "N",
345                                    "ENTITY_COUNT": 1,
346                                    "CANDIDATE_CAP_REACHED": "N",
347                                    "SCORING_CAP_REACHED": "N",
348                                    "SUPPRESSED": "N"
349                                }
350                            ]
351                        }
352                    ],
353                    "NAMEDATE_KEY": [
354                        {
355                            "FEAT_DESC": "J|PP|SM0|DOB.MMDD_HASH=1211",
356                            "LIB_FEAT_ID": 43,
357                            "FEAT_DESC_VALUES": [
358                                {
359                                    "FEAT_DESC": "J|PP|SM0|DOB.MMDD_HASH=1211",
360                                    "LIB_FEAT_ID": 43,
361                                    "USED_FOR_CAND": "Y",
362                                    "USED_FOR_SCORING": "N",
363                                    "ENTITY_COUNT": 1,
364                                    "CANDIDATE_CAP_REACHED": "N",
365                                    "SCORING_CAP_REACHED": "N",
366                                    "SUPPRESSED": "N"
367                                }
368                            ]
369                        },
370                        {
371                            "FEAT_DESC": "J|PP|SM0|DOB.MMYY_HASH=1278",
372                            "LIB_FEAT_ID": 41,
373                            "FEAT_DESC_VALUES": [
374                                {
375                                    "FEAT_DESC": "J|PP|SM0|DOB.MMYY_HASH=1278",
376                                    "LIB_FEAT_ID": 41,
377                                    "USED_FOR_CAND": "Y",
378                                    "USED_FOR_SCORING": "N",
379                                    "ENTITY_COUNT": 1,
380                                    "CANDIDATE_CAP_REACHED": "N",
381                                    "SCORING_CAP_REACHED": "N",
382                                    "SUPPRESSED": "N"
383                                }
384                            ]
385                        },
386                        {
387                            "FEAT_DESC": "J|PP|SM0|DOB=71211",
388                            "LIB_FEAT_ID": 40,
389                            "FEAT_DESC_VALUES": [
390                                {
391                                    "FEAT_DESC": "J|PP|SM0|DOB=71211",
392                                    "LIB_FEAT_ID": 40,
393                                    "USED_FOR_CAND": "Y",
394                                    "USED_FOR_SCORING": "N",
395                                    "ENTITY_COUNT": 1,
396                                    "CANDIDATE_CAP_REACHED": "N",
397                                    "SCORING_CAP_REACHED": "N",
398                                    "SUPPRESSED": "N"
399                                }
400                            ]
401                        },
402                        {
403                            "FEAT_DESC": "PP|SM0|DOB.MMDD_HASH=1211",
404                            "LIB_FEAT_ID": 32,
405                            "FEAT_DESC_VALUES": [
406                                {
407                                    "FEAT_DESC": "PP|SM0|DOB.MMDD_HASH=1211",
408                                    "LIB_FEAT_ID": 32,
409                                    "USED_FOR_CAND": "Y",
410                                    "USED_FOR_SCORING": "N",
411                                    "ENTITY_COUNT": 1,
412                                    "CANDIDATE_CAP_REACHED": "N",
413                                    "SCORING_CAP_REACHED": "N",
414                                    "SUPPRESSED": "N"
415                                }
416                            ]
417                        },
418                        {
419                            "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1178",
420                            "LIB_FEAT_ID": 33,
421                            "FEAT_DESC_VALUES": [
422                                {
423                                    "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1178",
424                                    "LIB_FEAT_ID": 33,
425                                    "USED_FOR_CAND": "Y",
426                                    "USED_FOR_SCORING": "N",
427                                    "ENTITY_COUNT": 1,
428                                    "CANDIDATE_CAP_REACHED": "N",
429                                    "SCORING_CAP_REACHED": "N",
430                                    "SUPPRESSED": "N"
431                                }
432                            ]
433                        },
434                        {
435                            "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1278",
436                            "LIB_FEAT_ID": 42,
437                            "FEAT_DESC_VALUES": [
438                                {
439                                    "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1278",
440                                    "LIB_FEAT_ID": 42,
441                                    "USED_FOR_CAND": "Y",
442                                    "USED_FOR_SCORING": "N",
443                                    "ENTITY_COUNT": 1,
444                                    "CANDIDATE_CAP_REACHED": "N",
445                                    "SCORING_CAP_REACHED": "N",
446                                    "SUPPRESSED": "N"
447                                }
448                            ]
449                        },
450                        {
451                            "FEAT_DESC": "PP|SM0|DOB=71211",
452                            "LIB_FEAT_ID": 31,
453                            "FEAT_DESC_VALUES": [
454                                {
455                                    "FEAT_DESC": "PP|SM0|DOB=71211",
456                                    "LIB_FEAT_ID": 31,
457                                    "USED_FOR_CAND": "Y",
458                                    "USED_FOR_SCORING": "N",
459                                    "ENTITY_COUNT": 1,
460                                    "CANDIDATE_CAP_REACHED": "N",
461                                    "SCORING_CAP_REACHED": "N",
462                                    "SUPPRESSED": "N"
463                                }
464                            ]
465                        },
466                        {
467                            "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211",
468                            "LIB_FEAT_ID": 14,
469                            "FEAT_DESC_VALUES": [
470                                {
471                                    "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211",
472                                    "LIB_FEAT_ID": 14,
473                                    "USED_FOR_CAND": "Y",
474                                    "USED_FOR_SCORING": "N",
475                                    "ENTITY_COUNT": 1,
476                                    "CANDIDATE_CAP_REACHED": "N",
477                                    "SCORING_CAP_REACHED": "N",
478                                    "SUPPRESSED": "N"
479                                }
480                            ]
481                        },
482                        {
483                            "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1178",
484                            "LIB_FEAT_ID": 30,
485                            "FEAT_DESC_VALUES": [
486                                {
487                                    "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1178",
488                                    "LIB_FEAT_ID": 30,
489                                    "USED_FOR_CAND": "Y",
490                                    "USED_FOR_SCORING": "N",
491                                    "ENTITY_COUNT": 1,
492                                    "CANDIDATE_CAP_REACHED": "N",
493                                    "SCORING_CAP_REACHED": "N",
494                                    "SUPPRESSED": "N"
495                                }
496                            ]
497                        },
498                        {
499                            "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1278",
500                            "LIB_FEAT_ID": 16,
501                            "FEAT_DESC_VALUES": [
502                                {
503                                    "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1278",
504                                    "LIB_FEAT_ID": 16,
505                                    "USED_FOR_CAND": "Y",
506                                    "USED_FOR_SCORING": "N",
507                                    "ENTITY_COUNT": 1,
508                                    "CANDIDATE_CAP_REACHED": "N",
509                                    "SCORING_CAP_REACHED": "N",
510                                    "SUPPRESSED": "N"
511                                }
512                            ]
513                        },
514                        {
515                            "FEAT_DESC": "RPRT|SM0|DOB=71211",
516                            "LIB_FEAT_ID": 15,
517                            "FEAT_DESC_VALUES": [
518                                {
519                                    "FEAT_DESC": "RPRT|SM0|DOB=71211",
520                                    "LIB_FEAT_ID": 15,
521                                    "USED_FOR_CAND": "Y",
522                                    "USED_FOR_SCORING": "N",
523                                    "ENTITY_COUNT": 1,
524                                    "CANDIDATE_CAP_REACHED": "N",
525                                    "SCORING_CAP_REACHED": "N",
526                                    "SUPPRESSED": "N"
527                                }
528                            ]
529                        }
530                    ],
531                    "NAMEPHONE_KEY": [
532                        {
533                            "FEAT_DESC": "PP|SM0|PHONE.PHONE_LAST_5=91300",
534                            "LIB_FEAT_ID": 37,
535                            "FEAT_DESC_VALUES": [
536                                {
537                                    "FEAT_DESC": "PP|SM0|PHONE.PHONE_LAST_5=91300",
538                                    "LIB_FEAT_ID": 37,
539                                    "USED_FOR_CAND": "Y",
540                                    "USED_FOR_SCORING": "N",
541                                    "ENTITY_COUNT": 1,
542                                    "CANDIDATE_CAP_REACHED": "N",
543                                    "SCORING_CAP_REACHED": "N",
544                                    "SUPPRESSED": "N"
545                                }
546                            ]
547                        },
548                        {
549                            "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300",
550                            "LIB_FEAT_ID": 19,
551                            "FEAT_DESC_VALUES": [
552                                {
553                                    "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300",
554                                    "LIB_FEAT_ID": 19,
555                                    "USED_FOR_CAND": "Y",
556                                    "USED_FOR_SCORING": "N",
557                                    "ENTITY_COUNT": 1,
558                                    "CANDIDATE_CAP_REACHED": "N",
559                                    "SCORING_CAP_REACHED": "N",
560                                    "SUPPRESSED": "N"
561                                }
562                            ]
563                        }
564                    ],
565                    "NAMEREGION_KEY": [
566                        {
567                            "FEAT_DESC": "PP|SM0|ADDRESS.CITY_STD=LS FKS",
568                            "LIB_FEAT_ID": 36,
569                            "FEAT_DESC_VALUES": [
570                                {
571                                    "FEAT_DESC": "PP|SM0|ADDRESS.CITY_STD=LS FKS",
572                                    "LIB_FEAT_ID": 36,
573                                    "USED_FOR_CAND": "Y",
574                                    "USED_FOR_SCORING": "N",
575                                    "ENTITY_COUNT": 1,
576                                    "CANDIDATE_CAP_REACHED": "N",
577                                    "SCORING_CAP_REACHED": "N",
578                                    "SUPPRESSED": "N"
579                                }
580                            ]
581                        },
582                        {
583                            "FEAT_DESC": "PP|SM0|POST=89111",
584                            "LIB_FEAT_ID": 35,
585                            "FEAT_DESC_VALUES": [
586                                {
587                                    "FEAT_DESC": "PP|SM0|POST=89111",
588                                    "LIB_FEAT_ID": 35,
589                                    "USED_FOR_CAND": "Y",
590                                    "USED_FOR_SCORING": "N",
591                                    "ENTITY_COUNT": 1,
592                                    "CANDIDATE_CAP_REACHED": "N",
593                                    "SCORING_CAP_REACHED": "N",
594                                    "SUPPRESSED": "N"
595                                }
596                            ]
597                        },
598                        {
599                            "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS",
600                            "LIB_FEAT_ID": 18,
601                            "FEAT_DESC_VALUES": [
602                                {
603                                    "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS",
604                                    "LIB_FEAT_ID": 18,
605                                    "USED_FOR_CAND": "Y",
606                                    "USED_FOR_SCORING": "N",
607                                    "ENTITY_COUNT": 1,
608                                    "CANDIDATE_CAP_REACHED": "N",
609                                    "SCORING_CAP_REACHED": "N",
610                                    "SUPPRESSED": "N"
611                                }
612                            ]
613                        },
614                        {
615                            "FEAT_DESC": "RPRT|SM0|POST=89111",
616                            "LIB_FEAT_ID": 34,
617                            "FEAT_DESC_VALUES": [
618                                {
619                                    "FEAT_DESC": "RPRT|SM0|POST=89111",
620                                    "LIB_FEAT_ID": 34,
621                                    "USED_FOR_CAND": "Y",
622                                    "USED_FOR_SCORING": "N",
623                                    "ENTITY_COUNT": 1,
624                                    "CANDIDATE_CAP_REACHED": "N",
625                                    "SCORING_CAP_REACHED": "N",
626                                    "SUPPRESSED": "N"
627                                }
628                            ]
629                        },
630                        {
631                            "FEAT_DESC": "RPRT|SM0|POST=89132",
632                            "LIB_FEAT_ID": 17,
633                            "FEAT_DESC_VALUES": [
634                                {
635                                    "FEAT_DESC": "RPRT|SM0|POST=89132",
636                                    "LIB_FEAT_ID": 17,
637                                    "USED_FOR_CAND": "Y",
638                                    "USED_FOR_SCORING": "N",
639                                    "ENTITY_COUNT": 1,
640                                    "CANDIDATE_CAP_REACHED": "N",
641                                    "SCORING_CAP_REACHED": "N",
642                                    "SUPPRESSED": "N"
643                                }
644                            ]
645                        }
646                    ],
647                    "NAME_KEY": [
648                        {
649                            "FEAT_DESC": "J|PP|SM0",
650                            "LIB_FEAT_ID": 39,
651                            "FEAT_DESC_VALUES": [
652                                {
653                                    "FEAT_DESC": "J|PP|SM0",
654                                    "LIB_FEAT_ID": 39,
655                                    "USED_FOR_CAND": "Y",
656                                    "USED_FOR_SCORING": "N",
657                                    "ENTITY_COUNT": 1,
658                                    "CANDIDATE_CAP_REACHED": "N",
659                                    "SCORING_CAP_REACHED": "N",
660                                    "SUPPRESSED": "N"
661                                }
662                            ]
663                        },
664                        {
665                            "FEAT_DESC": "PP|SM0",
666                            "LIB_FEAT_ID": 23,
667                            "FEAT_DESC_VALUES": [
668                                {
669                                    "FEAT_DESC": "PP|SM0",
670                                    "LIB_FEAT_ID": 23,
671                                    "USED_FOR_CAND": "Y",
672                                    "USED_FOR_SCORING": "N",
673                                    "ENTITY_COUNT": 1,
674                                    "CANDIDATE_CAP_REACHED": "N",
675                                    "SCORING_CAP_REACHED": "N",
676                                    "SUPPRESSED": "N"
677                                }
678                            ]
679                        },
680                        {
681                            "FEAT_DESC": "RPRT|SM0",
682                            "LIB_FEAT_ID": 6,
683                            "FEAT_DESC_VALUES": [
684                                {
685                                    "FEAT_DESC": "RPRT|SM0",
686                                    "LIB_FEAT_ID": 6,
687                                    "USED_FOR_CAND": "Y",
688                                    "USED_FOR_SCORING": "N",
689                                    "ENTITY_COUNT": 1,
690                                    "CANDIDATE_CAP_REACHED": "N",
691                                    "SCORING_CAP_REACHED": "N",
692                                    "SUPPRESSED": "N"
693                                }
694                            ]
695                        }
696                    ],
697                    "PHONE": [
698                        {
699                            "FEAT_DESC": "702-919-1300",
700                            "LIB_FEAT_ID": 4,
701                            "USAGE_TYPE": "HOME",
702                            "FEAT_DESC_VALUES": [
703                                {
704                                    "FEAT_DESC": "702-919-1300",
705                                    "LIB_FEAT_ID": 4,
706                                    "USED_FOR_CAND": "N",
707                                    "USED_FOR_SCORING": "Y",
708                                    "ENTITY_COUNT": 1,
709                                    "CANDIDATE_CAP_REACHED": "N",
710                                    "SCORING_CAP_REACHED": "N",
711                                    "SUPPRESSED": "N"
712                                }
713                            ]
714                        },
715                        {
716                            "FEAT_DESC": "702-919-1300",
717                            "LIB_FEAT_ID": 4,
718                            "USAGE_TYPE": "MOBILE",
719                            "FEAT_DESC_VALUES": [
720                                {
721                                    "FEAT_DESC": "702-919-1300",
722                                    "LIB_FEAT_ID": 4,
723                                    "USED_FOR_CAND": "N",
724                                    "USED_FOR_SCORING": "Y",
725                                    "ENTITY_COUNT": 1,
726                                    "CANDIDATE_CAP_REACHED": "N",
727                                    "SCORING_CAP_REACHED": "N",
728                                    "SUPPRESSED": "N"
729                                }
730                            ]
731                        }
732                    ],
733                    "PHONE_KEY": [
734                        {
735                            "FEAT_DESC": "7029191300",
736                            "LIB_FEAT_ID": 9,
737                            "FEAT_DESC_VALUES": [
738                                {
739                                    "FEAT_DESC": "7029191300",
740                                    "LIB_FEAT_ID": 9,
741                                    "USED_FOR_CAND": "Y",
742                                    "USED_FOR_SCORING": "N",
743                                    "ENTITY_COUNT": 1,
744                                    "CANDIDATE_CAP_REACHED": "N",
745                                    "SCORING_CAP_REACHED": "N",
746                                    "SUPPRESSED": "N"
747                                }
748                            ]
749                        }
750                    ],
751                    "RECORD_TYPE": [
752                        {
753                            "FEAT_DESC": "PERSON",
754                            "LIB_FEAT_ID": 10,
755                            "FEAT_DESC_VALUES": [
756                                {
757                                    "FEAT_DESC": "PERSON",
758                                    "LIB_FEAT_ID": 10,
759                                    "USED_FOR_CAND": "N",
760                                    "USED_FOR_SCORING": "Y",
761                                    "ENTITY_COUNT": 100,
762                                    "CANDIDATE_CAP_REACHED": "N",
763                                    "SCORING_CAP_REACHED": "N",
764                                    "SUPPRESSED": "N"
765                                }
766                            ]
767                        }
768                    ]
769                },
770                "RECORD_SUMMARY": [
771                    {
772                        "DATA_SOURCE": "CUSTOMERS",
773                        "RECORD_COUNT": 3
774                    }
775                ],
776                "RECORDS": [
777                    {
778                        "DATA_SOURCE": "CUSTOMERS",
779                        "RECORD_ID": "1001",
780                        "INTERNAL_ID": 35,
781                        "MATCH_KEY": "",
782                        "MATCH_LEVEL_CODE": "",
783                        "ERRULE_CODE": "",
784                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
785                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
786                    },
787                    {
788                        "DATA_SOURCE": "CUSTOMERS",
789                        "RECORD_ID": "1002",
790                        "INTERNAL_ID": 36,
791                        "MATCH_KEY": "+NAME+DOB+PHONE",
792                        "MATCH_LEVEL_CODE": "RESOLVED",
793                        "ERRULE_CODE": "CNAME_CFF_CEXCL",
794                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
795                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
796                    },
797                    {
798                        "DATA_SOURCE": "CUSTOMERS",
799                        "RECORD_ID": "1003",
800                        "INTERNAL_ID": 37,
801                        "MATCH_KEY": "+NAME+DOB+EMAIL",
802                        "MATCH_LEVEL_CODE": "RESOLVED",
803                        "ERRULE_CODE": "SF1_PNAME_CSTAB",
804                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
805                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
806                    }
807                ]
808            },
809            "RELATED_ENTITIES": []
810        }
811    ]
812}
abstract why_record_in_entity(data_source_code: str, record_id: str, flags: int = <SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS: 96009152>) str[source]

The why_record_in_entity method determines why a record is included in an entity.

Parameters:
  • data_source_code (str) – Identifies the provenance of the data.

  • record_id (str) – The unique identifier within the records of the same data source.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_WHY_ENTITY_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10DATA_SOURCE_CODE = "CUSTOMERS"
11FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
12    # Differs based on which senzing_xxxx package is used.
13}
14FLAGS = SzEngineFlags.SZ_WHY_RECORDS_DEFAULT_FLAGS
15RECORD_ID = "1001"
16
17try:
18    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
19    sz_engine = sz_abstract_factory.create_engine()
20    RESULT = sz_engine.why_record_in_entity(
21        DATA_SOURCE_CODE,
22        RECORD_ID,
23        FLAGS,
24    )
25    print(f"\nFile {__file__}:\n{RESULT}\n")
26except SzError as err:
27    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted for easier reading.
  2{
  3    "WHY_RESULTS": [
  4        {
  5            "INTERNAL_ID": 35,
  6            "ENTITY_ID": 35,
  7            "FOCUS_RECORDS": [
  8                {
  9                    "DATA_SOURCE": "CUSTOMERS",
 10                    "RECORD_ID": "1001"
 11                }
 12            ],
 13            "MATCH_INFO": {
 14                "WHY_KEY": "+NAME+DOB+PHONE+EMAIL",
 15                "WHY_ERRULE_CODE": "SF1_SNAME_CFF_CSTAB",
 16                "MATCH_LEVEL_CODE": "RESOLVED",
 17                "CANDIDATE_KEYS": {
 18                    "DOB": [
 19                        {
 20                            "FEAT_ID": 2,
 21                            "FEAT_DESC": "12/11/1978"
 22                        }
 23                    ],
 24                    "EMAIL_KEY": [
 25                        {
 26                            "FEAT_ID": 11,
 27                            "FEAT_DESC": "bsmith@WORK.COM"
 28                        }
 29                    ],
 30                    "NAMEDATE_KEY": [
 31                        {
 32                            "FEAT_ID": 14,
 33                            "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211"
 34                        },
 35                        {
 36                            "FEAT_ID": 15,
 37                            "FEAT_DESC": "RPRT|SM0|DOB=71211"
 38                        },
 39                        {
 40                            "FEAT_ID": 16,
 41                            "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1278"
 42                        }
 43                    ],
 44                    "NAMEPHONE_KEY": [
 45                        {
 46                            "FEAT_ID": 19,
 47                            "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300"
 48                        }
 49                    ],
 50                    "NAMEREGION_KEY": [
 51                        {
 52                            "FEAT_ID": 18,
 53                            "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS"
 54                        }
 55                    ],
 56                    "NAME_KEY": [
 57                        {
 58                            "FEAT_ID": 6,
 59                            "FEAT_DESC": "RPRT|SM0"
 60                        }
 61                    ],
 62                    "PHONE_KEY": [
 63                        {
 64                            "FEAT_ID": 9,
 65                            "FEAT_DESC": "7029191300"
 66                        }
 67                    ]
 68                },
 69                "FEATURE_SCORES": {
 70                    "ADDRESS": [
 71                        {
 72                            "INBOUND_FEAT_ID": 3,
 73                            "INBOUND_FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 74                            "INBOUND_FEAT_USAGE_TYPE": "MAILING",
 75                            "CANDIDATE_FEAT_ID": 22,
 76                            "CANDIDATE_FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 77                            "CANDIDATE_FEAT_USAGE_TYPE": "HOME",
 78                            "SCORE": 42,
 79                            "ADDITIONAL_SCORES": {
 80                                "FULL_SCORE": 42
 81                            },
 82                            "SCORE_BUCKET": "NO_CHANCE",
 83                            "SCORE_BEHAVIOR": "FF"
 84                        }
 85                    ],
 86                    "DOB": [
 87                        {
 88                            "INBOUND_FEAT_ID": 2,
 89                            "INBOUND_FEAT_DESC": "12/11/1978",
 90                            "INBOUND_FEAT_USAGE_TYPE": "",
 91                            "CANDIDATE_FEAT_ID": 2,
 92                            "CANDIDATE_FEAT_DESC": "12/11/1978",
 93                            "CANDIDATE_FEAT_USAGE_TYPE": "",
 94                            "SCORE": 100,
 95                            "ADDITIONAL_SCORES": {
 96                                "FULL_SCORE": 100
 97                            },
 98                            "SCORE_BUCKET": "SAME",
 99                            "SCORE_BEHAVIOR": "FMES"
100                        }
101                    ],
102                    "EMAIL": [
103                        {
104                            "INBOUND_FEAT_ID": 5,
105                            "INBOUND_FEAT_DESC": "bsmith@work.com",
106                            "INBOUND_FEAT_USAGE_TYPE": "",
107                            "CANDIDATE_FEAT_ID": 5,
108                            "CANDIDATE_FEAT_DESC": "bsmith@work.com",
109                            "CANDIDATE_FEAT_USAGE_TYPE": "",
110                            "SCORE": 100,
111                            "ADDITIONAL_SCORES": {
112                                "FULL_SCORE": 100
113                            },
114                            "SCORE_BUCKET": "SAME",
115                            "SCORE_BEHAVIOR": "F1"
116                        }
117                    ],
118                    "NAME": [
119                        {
120                            "INBOUND_FEAT_ID": 1,
121                            "INBOUND_FEAT_DESC": "Robert Smith",
122                            "INBOUND_FEAT_USAGE_TYPE": "PRIMARY",
123                            "CANDIDATE_FEAT_ID": 38,
124                            "CANDIDATE_FEAT_DESC": "Bob J Smith",
125                            "CANDIDATE_FEAT_USAGE_TYPE": "PRIMARY",
126                            "SCORE": 90,
127                            "ADDITIONAL_SCORES": {
128                                "GENERATION_MATCH": -1,
129                                "GNR_FN": 90,
130                                "GNR_GN": 88,
131                                "GNR_ON": -1,
132                                "GNR_SN": 100
133                            },
134                            "SCORE_BUCKET": "CLOSE",
135                            "SCORE_BEHAVIOR": "NAME"
136                        },
137                        {
138                            "INBOUND_FEAT_ID": 1,
139                            "INBOUND_FEAT_DESC": "Robert Smith",
140                            "INBOUND_FEAT_USAGE_TYPE": "PRIMARY",
141                            "CANDIDATE_FEAT_ID": 20,
142                            "CANDIDATE_FEAT_DESC": "Bob Smith",
143                            "CANDIDATE_FEAT_USAGE_TYPE": "PRIMARY",
144                            "SCORE": 97,
145                            "ADDITIONAL_SCORES": {
146                                "GENERATION_MATCH": -1,
147                                "GNR_FN": 97,
148                                "GNR_GN": 95,
149                                "GNR_ON": -1,
150                                "GNR_SN": 100
151                            },
152                            "SCORE_BUCKET": "CLOSE",
153                            "SCORE_BEHAVIOR": "NAME"
154                        }
155                    ],
156                    "PHONE": [
157                        {
158                            "INBOUND_FEAT_ID": 4,
159                            "INBOUND_FEAT_DESC": "702-919-1300",
160                            "INBOUND_FEAT_USAGE_TYPE": "HOME",
161                            "CANDIDATE_FEAT_ID": 4,
162                            "CANDIDATE_FEAT_DESC": "702-919-1300",
163                            "CANDIDATE_FEAT_USAGE_TYPE": "MOBILE",
164                            "SCORE": 100,
165                            "ADDITIONAL_SCORES": {
166                                "FULL_SCORE": 100
167                            },
168                            "SCORE_BUCKET": "SAME",
169                            "SCORE_BEHAVIOR": "FF"
170                        }
171                    ],
172                    "RECORD_TYPE": [
173                        {
174                            "INBOUND_FEAT_ID": 10,
175                            "INBOUND_FEAT_DESC": "PERSON",
176                            "INBOUND_FEAT_USAGE_TYPE": "",
177                            "CANDIDATE_FEAT_ID": 10,
178                            "CANDIDATE_FEAT_DESC": "PERSON",
179                            "CANDIDATE_FEAT_USAGE_TYPE": "",
180                            "SCORE": 100,
181                            "ADDITIONAL_SCORES": {
182                                "FULL_SCORE": 100
183                            },
184                            "SCORE_BUCKET": "SAME",
185                            "SCORE_BEHAVIOR": "FVME"
186                        }
187                    ]
188                }
189            }
190        }
191    ],
192    "ENTITIES": [
193        {
194            "RESOLVED_ENTITY": {
195                "ENTITY_ID": 35,
196                "ENTITY_NAME": "Robert Smith",
197                "FEATURES": {
198                    "ADDRESS": [
199                        {
200                            "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
201                            "LIB_FEAT_ID": 22,
202                            "USAGE_TYPE": "HOME",
203                            "FEAT_DESC_VALUES": [
204                                {
205                                    "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
206                                    "LIB_FEAT_ID": 22,
207                                    "USED_FOR_CAND": "N",
208                                    "USED_FOR_SCORING": "Y",
209                                    "ENTITY_COUNT": 1,
210                                    "CANDIDATE_CAP_REACHED": "N",
211                                    "SCORING_CAP_REACHED": "N",
212                                    "SUPPRESSED": "N"
213                                }
214                            ]
215                        },
216                        {
217                            "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
218                            "LIB_FEAT_ID": 3,
219                            "USAGE_TYPE": "MAILING",
220                            "FEAT_DESC_VALUES": [
221                                {
222                                    "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
223                                    "LIB_FEAT_ID": 3,
224                                    "USED_FOR_CAND": "N",
225                                    "USED_FOR_SCORING": "Y",
226                                    "ENTITY_COUNT": 1,
227                                    "CANDIDATE_CAP_REACHED": "N",
228                                    "SCORING_CAP_REACHED": "N",
229                                    "SUPPRESSED": "N"
230                                }
231                            ]
232                        }
233                    ],
234                    "ADDR_KEY": [
235                        {
236                            "FEAT_DESC": "123|MN||89132",
237                            "LIB_FEAT_ID": 8,
238                            "FEAT_DESC_VALUES": [
239                                {
240                                    "FEAT_DESC": "123|MN||89132",
241                                    "LIB_FEAT_ID": 8,
242                                    "USED_FOR_CAND": "Y",
243                                    "USED_FOR_SCORING": "N",
244                                    "ENTITY_COUNT": 1,
245                                    "CANDIDATE_CAP_REACHED": "N",
246                                    "SCORING_CAP_REACHED": "N",
247                                    "SUPPRESSED": "N"
248                                }
249                            ]
250                        },
251                        {
252                            "FEAT_DESC": "123|MN||LS FKS",
253                            "LIB_FEAT_ID": 7,
254                            "FEAT_DESC_VALUES": [
255                                {
256                                    "FEAT_DESC": "123|MN||LS FKS",
257                                    "LIB_FEAT_ID": 7,
258                                    "USED_FOR_CAND": "Y",
259                                    "USED_FOR_SCORING": "N",
260                                    "ENTITY_COUNT": 1,
261                                    "CANDIDATE_CAP_REACHED": "N",
262                                    "SCORING_CAP_REACHED": "N",
263                                    "SUPPRESSED": "N"
264                                }
265                            ]
266                        },
267                        {
268                            "FEAT_DESC": "1515|ATL||89111",
269                            "LIB_FEAT_ID": 24,
270                            "FEAT_DESC_VALUES": [
271                                {
272                                    "FEAT_DESC": "1515|ATL||89111",
273                                    "LIB_FEAT_ID": 24,
274                                    "USED_FOR_CAND": "Y",
275                                    "USED_FOR_SCORING": "N",
276                                    "ENTITY_COUNT": 1,
277                                    "CANDIDATE_CAP_REACHED": "N",
278                                    "SCORING_CAP_REACHED": "N",
279                                    "SUPPRESSED": "N"
280                                }
281                            ]
282                        },
283                        {
284                            "FEAT_DESC": "1515|ATL||LS FKS",
285                            "LIB_FEAT_ID": 25,
286                            "FEAT_DESC_VALUES": [
287                                {
288                                    "FEAT_DESC": "1515|ATL||LS FKS",
289                                    "LIB_FEAT_ID": 25,
290                                    "USED_FOR_CAND": "Y",
291                                    "USED_FOR_SCORING": "N",
292                                    "ENTITY_COUNT": 1,
293                                    "CANDIDATE_CAP_REACHED": "N",
294                                    "SCORING_CAP_REACHED": "N",
295                                    "SUPPRESSED": "N"
296                                }
297                            ]
298                        }
299                    ],
300                    "DOB": [
301                        {
302                            "FEAT_DESC": "12/11/1978",
303                            "LIB_FEAT_ID": 2,
304                            "FEAT_DESC_VALUES": [
305                                {
306                                    "FEAT_DESC": "12/11/1978",
307                                    "LIB_FEAT_ID": 2,
308                                    "USED_FOR_CAND": "Y",
309                                    "USED_FOR_SCORING": "Y",
310                                    "ENTITY_COUNT": 1,
311                                    "CANDIDATE_CAP_REACHED": "N",
312                                    "SCORING_CAP_REACHED": "N",
313                                    "SUPPRESSED": "N"
314                                },
315                                {
316                                    "FEAT_DESC": "11/12/1978",
317                                    "LIB_FEAT_ID": 21,
318                                    "USED_FOR_CAND": "Y",
319                                    "USED_FOR_SCORING": "Y",
320                                    "ENTITY_COUNT": 1,
321                                    "CANDIDATE_CAP_REACHED": "N",
322                                    "SCORING_CAP_REACHED": "N",
323                                    "SUPPRESSED": "N"
324                                }
325                            ]
326                        }
327                    ],
328                    "EMAIL": [
329                        {
330                            "FEAT_DESC": "bsmith@work.com",
331                            "LIB_FEAT_ID": 5,
332                            "FEAT_DESC_VALUES": [
333                                {
334                                    "FEAT_DESC": "bsmith@work.com",
335                                    "LIB_FEAT_ID": 5,
336                                    "USED_FOR_CAND": "N",
337                                    "USED_FOR_SCORING": "Y",
338                                    "ENTITY_COUNT": 1,
339                                    "CANDIDATE_CAP_REACHED": "N",
340                                    "SCORING_CAP_REACHED": "N",
341                                    "SUPPRESSED": "N"
342                                }
343                            ]
344                        }
345                    ],
346                    "EMAIL_KEY": [
347                        {
348                            "FEAT_DESC": "bsmith@WORK.COM",
349                            "LIB_FEAT_ID": 11,
350                            "FEAT_DESC_VALUES": [
351                                {
352                                    "FEAT_DESC": "bsmith@WORK.COM",
353                                    "LIB_FEAT_ID": 11,
354                                    "USED_FOR_CAND": "Y",
355                                    "USED_FOR_SCORING": "N",
356                                    "ENTITY_COUNT": 1,
357                                    "CANDIDATE_CAP_REACHED": "N",
358                                    "SCORING_CAP_REACHED": "N",
359                                    "SUPPRESSED": "N"
360                                }
361                            ]
362                        }
363                    ],
364                    "NAME": [
365                        {
366                            "FEAT_DESC": "Robert Smith",
367                            "LIB_FEAT_ID": 1,
368                            "USAGE_TYPE": "PRIMARY",
369                            "FEAT_DESC_VALUES": [
370                                {
371                                    "FEAT_DESC": "Robert Smith",
372                                    "LIB_FEAT_ID": 1,
373                                    "USED_FOR_CAND": "N",
374                                    "USED_FOR_SCORING": "Y",
375                                    "ENTITY_COUNT": 1,
376                                    "CANDIDATE_CAP_REACHED": "N",
377                                    "SCORING_CAP_REACHED": "N",
378                                    "SUPPRESSED": "N"
379                                },
380                                {
381                                    "FEAT_DESC": "Bob J Smith",
382                                    "LIB_FEAT_ID": 38,
383                                    "USED_FOR_CAND": "N",
384                                    "USED_FOR_SCORING": "Y",
385                                    "ENTITY_COUNT": 1,
386                                    "CANDIDATE_CAP_REACHED": "N",
387                                    "SCORING_CAP_REACHED": "N",
388                                    "SUPPRESSED": "N"
389                                },
390                                {
391                                    "FEAT_DESC": "Bob Smith",
392                                    "LIB_FEAT_ID": 20,
393                                    "USED_FOR_CAND": "N",
394                                    "USED_FOR_SCORING": "Y",
395                                    "ENTITY_COUNT": 1,
396                                    "CANDIDATE_CAP_REACHED": "N",
397                                    "SCORING_CAP_REACHED": "N",
398                                    "SUPPRESSED": "Y"
399                                }
400                            ]
401                        }
402                    ],
403                    "NAMEADDR_KEY": [
404                        {
405                            "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
406                            "LIB_FEAT_ID": 27,
407                            "FEAT_DESC_VALUES": [
408                                {
409                                    "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
410                                    "LIB_FEAT_ID": 27,
411                                    "USED_FOR_CAND": "Y",
412                                    "USED_FOR_SCORING": "N",
413                                    "ENTITY_COUNT": 1,
414                                    "CANDIDATE_CAP_REACHED": "N",
415                                    "SCORING_CAP_REACHED": "N",
416                                    "SUPPRESSED": "N"
417                                }
418                            ]
419                        },
420                        {
421                            "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
422                            "LIB_FEAT_ID": 28,
423                            "FEAT_DESC_VALUES": [
424                                {
425                                    "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
426                                    "LIB_FEAT_ID": 28,
427                                    "USED_FOR_CAND": "Y",
428                                    "USED_FOR_SCORING": "N",
429                                    "ENTITY_COUNT": 1,
430                                    "CANDIDATE_CAP_REACHED": "N",
431                                    "SCORING_CAP_REACHED": "N",
432                                    "SUPPRESSED": "N"
433                                }
434                            ]
435                        },
436                        {
437                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||89132",
438                            "LIB_FEAT_ID": 12,
439                            "FEAT_DESC_VALUES": [
440                                {
441                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||89132",
442                                    "LIB_FEAT_ID": 12,
443                                    "USED_FOR_CAND": "Y",
444                                    "USED_FOR_SCORING": "N",
445                                    "ENTITY_COUNT": 1,
446                                    "CANDIDATE_CAP_REACHED": "N",
447                                    "SCORING_CAP_REACHED": "N",
448                                    "SUPPRESSED": "N"
449                                }
450                            ]
451                        },
452                        {
453                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||LS FKS",
454                            "LIB_FEAT_ID": 13,
455                            "FEAT_DESC_VALUES": [
456                                {
457                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||LS FKS",
458                                    "LIB_FEAT_ID": 13,
459                                    "USED_FOR_CAND": "Y",
460                                    "USED_FOR_SCORING": "N",
461                                    "ENTITY_COUNT": 1,
462                                    "CANDIDATE_CAP_REACHED": "N",
463                                    "SCORING_CAP_REACHED": "N",
464                                    "SUPPRESSED": "N"
465                                }
466                            ]
467                        },
468                        {
469                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
470                            "LIB_FEAT_ID": 29,
471                            "FEAT_DESC_VALUES": [
472                                {
473                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
474                                    "LIB_FEAT_ID": 29,
475                                    "USED_FOR_CAND": "Y",
476                                    "USED_FOR_SCORING": "N",
477                                    "ENTITY_COUNT": 1,
478                                    "CANDIDATE_CAP_REACHED": "N",
479                                    "SCORING_CAP_REACHED": "N",
480                                    "SUPPRESSED": "N"
481                                }
482                            ]
483                        },
484                        {
485                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
486                            "LIB_FEAT_ID": 26,
487                            "FEAT_DESC_VALUES": [
488                                {
489                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
490                                    "LIB_FEAT_ID": 26,
491                                    "USED_FOR_CAND": "Y",
492                                    "USED_FOR_SCORING": "N",
493                                    "ENTITY_COUNT": 1,
494                                    "CANDIDATE_CAP_REACHED": "N",
495                                    "SCORING_CAP_REACHED": "N",
496                                    "SUPPRESSED": "N"
497                                }
498                            ]
499                        }
500                    ],
501                    "NAMEDATE_KEY": [
502                        {
503                            "FEAT_DESC": "J|PP|SM0|DOB.MMDD_HASH=1211",
504                            "LIB_FEAT_ID": 43,
505                            "FEAT_DESC_VALUES": [
506                                {
507                                    "FEAT_DESC": "J|PP|SM0|DOB.MMDD_HASH=1211",
508                                    "LIB_FEAT_ID": 43,
509                                    "USED_FOR_CAND": "Y",
510                                    "USED_FOR_SCORING": "N",
511                                    "ENTITY_COUNT": 1,
512                                    "CANDIDATE_CAP_REACHED": "N",
513                                    "SCORING_CAP_REACHED": "N",
514                                    "SUPPRESSED": "N"
515                                }
516                            ]
517                        },
518                        {
519                            "FEAT_DESC": "J|PP|SM0|DOB.MMYY_HASH=1278",
520                            "LIB_FEAT_ID": 41,
521                            "FEAT_DESC_VALUES": [
522                                {
523                                    "FEAT_DESC": "J|PP|SM0|DOB.MMYY_HASH=1278",
524                                    "LIB_FEAT_ID": 41,
525                                    "USED_FOR_CAND": "Y",
526                                    "USED_FOR_SCORING": "N",
527                                    "ENTITY_COUNT": 1,
528                                    "CANDIDATE_CAP_REACHED": "N",
529                                    "SCORING_CAP_REACHED": "N",
530                                    "SUPPRESSED": "N"
531                                }
532                            ]
533                        },
534                        {
535                            "FEAT_DESC": "J|PP|SM0|DOB=71211",
536                            "LIB_FEAT_ID": 40,
537                            "FEAT_DESC_VALUES": [
538                                {
539                                    "FEAT_DESC": "J|PP|SM0|DOB=71211",
540                                    "LIB_FEAT_ID": 40,
541                                    "USED_FOR_CAND": "Y",
542                                    "USED_FOR_SCORING": "N",
543                                    "ENTITY_COUNT": 1,
544                                    "CANDIDATE_CAP_REACHED": "N",
545                                    "SCORING_CAP_REACHED": "N",
546                                    "SUPPRESSED": "N"
547                                }
548                            ]
549                        },
550                        {
551                            "FEAT_DESC": "PP|SM0|DOB.MMDD_HASH=1211",
552                            "LIB_FEAT_ID": 32,
553                            "FEAT_DESC_VALUES": [
554                                {
555                                    "FEAT_DESC": "PP|SM0|DOB.MMDD_HASH=1211",
556                                    "LIB_FEAT_ID": 32,
557                                    "USED_FOR_CAND": "Y",
558                                    "USED_FOR_SCORING": "N",
559                                    "ENTITY_COUNT": 1,
560                                    "CANDIDATE_CAP_REACHED": "N",
561                                    "SCORING_CAP_REACHED": "N",
562                                    "SUPPRESSED": "N"
563                                }
564                            ]
565                        },
566                        {
567                            "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1178",
568                            "LIB_FEAT_ID": 33,
569                            "FEAT_DESC_VALUES": [
570                                {
571                                    "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1178",
572                                    "LIB_FEAT_ID": 33,
573                                    "USED_FOR_CAND": "Y",
574                                    "USED_FOR_SCORING": "N",
575                                    "ENTITY_COUNT": 1,
576                                    "CANDIDATE_CAP_REACHED": "N",
577                                    "SCORING_CAP_REACHED": "N",
578                                    "SUPPRESSED": "N"
579                                }
580                            ]
581                        },
582                        {
583                            "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1278",
584                            "LIB_FEAT_ID": 42,
585                            "FEAT_DESC_VALUES": [
586                                {
587                                    "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1278",
588                                    "LIB_FEAT_ID": 42,
589                                    "USED_FOR_CAND": "Y",
590                                    "USED_FOR_SCORING": "N",
591                                    "ENTITY_COUNT": 1,
592                                    "CANDIDATE_CAP_REACHED": "N",
593                                    "SCORING_CAP_REACHED": "N",
594                                    "SUPPRESSED": "N"
595                                }
596                            ]
597                        },
598                        {
599                            "FEAT_DESC": "PP|SM0|DOB=71211",
600                            "LIB_FEAT_ID": 31,
601                            "FEAT_DESC_VALUES": [
602                                {
603                                    "FEAT_DESC": "PP|SM0|DOB=71211",
604                                    "LIB_FEAT_ID": 31,
605                                    "USED_FOR_CAND": "Y",
606                                    "USED_FOR_SCORING": "N",
607                                    "ENTITY_COUNT": 1,
608                                    "CANDIDATE_CAP_REACHED": "N",
609                                    "SCORING_CAP_REACHED": "N",
610                                    "SUPPRESSED": "N"
611                                }
612                            ]
613                        },
614                        {
615                            "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211",
616                            "LIB_FEAT_ID": 14,
617                            "FEAT_DESC_VALUES": [
618                                {
619                                    "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211",
620                                    "LIB_FEAT_ID": 14,
621                                    "USED_FOR_CAND": "Y",
622                                    "USED_FOR_SCORING": "N",
623                                    "ENTITY_COUNT": 1,
624                                    "CANDIDATE_CAP_REACHED": "N",
625                                    "SCORING_CAP_REACHED": "N",
626                                    "SUPPRESSED": "N"
627                                }
628                            ]
629                        },
630                        {
631                            "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1178",
632                            "LIB_FEAT_ID": 30,
633                            "FEAT_DESC_VALUES": [
634                                {
635                                    "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1178",
636                                    "LIB_FEAT_ID": 30,
637                                    "USED_FOR_CAND": "Y",
638                                    "USED_FOR_SCORING": "N",
639                                    "ENTITY_COUNT": 1,
640                                    "CANDIDATE_CAP_REACHED": "N",
641                                    "SCORING_CAP_REACHED": "N",
642                                    "SUPPRESSED": "N"
643                                }
644                            ]
645                        },
646                        {
647                            "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1278",
648                            "LIB_FEAT_ID": 16,
649                            "FEAT_DESC_VALUES": [
650                                {
651                                    "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1278",
652                                    "LIB_FEAT_ID": 16,
653                                    "USED_FOR_CAND": "Y",
654                                    "USED_FOR_SCORING": "N",
655                                    "ENTITY_COUNT": 1,
656                                    "CANDIDATE_CAP_REACHED": "N",
657                                    "SCORING_CAP_REACHED": "N",
658                                    "SUPPRESSED": "N"
659                                }
660                            ]
661                        },
662                        {
663                            "FEAT_DESC": "RPRT|SM0|DOB=71211",
664                            "LIB_FEAT_ID": 15,
665                            "FEAT_DESC_VALUES": [
666                                {
667                                    "FEAT_DESC": "RPRT|SM0|DOB=71211",
668                                    "LIB_FEAT_ID": 15,
669                                    "USED_FOR_CAND": "Y",
670                                    "USED_FOR_SCORING": "N",
671                                    "ENTITY_COUNT": 1,
672                                    "CANDIDATE_CAP_REACHED": "N",
673                                    "SCORING_CAP_REACHED": "N",
674                                    "SUPPRESSED": "N"
675                                }
676                            ]
677                        }
678                    ],
679                    "NAMEPHONE_KEY": [
680                        {
681                            "FEAT_DESC": "PP|SM0|PHONE.PHONE_LAST_5=91300",
682                            "LIB_FEAT_ID": 37,
683                            "FEAT_DESC_VALUES": [
684                                {
685                                    "FEAT_DESC": "PP|SM0|PHONE.PHONE_LAST_5=91300",
686                                    "LIB_FEAT_ID": 37,
687                                    "USED_FOR_CAND": "Y",
688                                    "USED_FOR_SCORING": "N",
689                                    "ENTITY_COUNT": 1,
690                                    "CANDIDATE_CAP_REACHED": "N",
691                                    "SCORING_CAP_REACHED": "N",
692                                    "SUPPRESSED": "N"
693                                }
694                            ]
695                        },
696                        {
697                            "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300",
698                            "LIB_FEAT_ID": 19,
699                            "FEAT_DESC_VALUES": [
700                                {
701                                    "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300",
702                                    "LIB_FEAT_ID": 19,
703                                    "USED_FOR_CAND": "Y",
704                                    "USED_FOR_SCORING": "N",
705                                    "ENTITY_COUNT": 1,
706                                    "CANDIDATE_CAP_REACHED": "N",
707                                    "SCORING_CAP_REACHED": "N",
708                                    "SUPPRESSED": "N"
709                                }
710                            ]
711                        }
712                    ],
713                    "NAMEREGION_KEY": [
714                        {
715                            "FEAT_DESC": "PP|SM0|ADDRESS.CITY_STD=LS FKS",
716                            "LIB_FEAT_ID": 36,
717                            "FEAT_DESC_VALUES": [
718                                {
719                                    "FEAT_DESC": "PP|SM0|ADDRESS.CITY_STD=LS FKS",
720                                    "LIB_FEAT_ID": 36,
721                                    "USED_FOR_CAND": "Y",
722                                    "USED_FOR_SCORING": "N",
723                                    "ENTITY_COUNT": 1,
724                                    "CANDIDATE_CAP_REACHED": "N",
725                                    "SCORING_CAP_REACHED": "N",
726                                    "SUPPRESSED": "N"
727                                }
728                            ]
729                        },
730                        {
731                            "FEAT_DESC": "PP|SM0|POST=89111",
732                            "LIB_FEAT_ID": 35,
733                            "FEAT_DESC_VALUES": [
734                                {
735                                    "FEAT_DESC": "PP|SM0|POST=89111",
736                                    "LIB_FEAT_ID": 35,
737                                    "USED_FOR_CAND": "Y",
738                                    "USED_FOR_SCORING": "N",
739                                    "ENTITY_COUNT": 1,
740                                    "CANDIDATE_CAP_REACHED": "N",
741                                    "SCORING_CAP_REACHED": "N",
742                                    "SUPPRESSED": "N"
743                                }
744                            ]
745                        },
746                        {
747                            "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS",
748                            "LIB_FEAT_ID": 18,
749                            "FEAT_DESC_VALUES": [
750                                {
751                                    "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS",
752                                    "LIB_FEAT_ID": 18,
753                                    "USED_FOR_CAND": "Y",
754                                    "USED_FOR_SCORING": "N",
755                                    "ENTITY_COUNT": 1,
756                                    "CANDIDATE_CAP_REACHED": "N",
757                                    "SCORING_CAP_REACHED": "N",
758                                    "SUPPRESSED": "N"
759                                }
760                            ]
761                        },
762                        {
763                            "FEAT_DESC": "RPRT|SM0|POST=89111",
764                            "LIB_FEAT_ID": 34,
765                            "FEAT_DESC_VALUES": [
766                                {
767                                    "FEAT_DESC": "RPRT|SM0|POST=89111",
768                                    "LIB_FEAT_ID": 34,
769                                    "USED_FOR_CAND": "Y",
770                                    "USED_FOR_SCORING": "N",
771                                    "ENTITY_COUNT": 1,
772                                    "CANDIDATE_CAP_REACHED": "N",
773                                    "SCORING_CAP_REACHED": "N",
774                                    "SUPPRESSED": "N"
775                                }
776                            ]
777                        },
778                        {
779                            "FEAT_DESC": "RPRT|SM0|POST=89132",
780                            "LIB_FEAT_ID": 17,
781                            "FEAT_DESC_VALUES": [
782                                {
783                                    "FEAT_DESC": "RPRT|SM0|POST=89132",
784                                    "LIB_FEAT_ID": 17,
785                                    "USED_FOR_CAND": "Y",
786                                    "USED_FOR_SCORING": "N",
787                                    "ENTITY_COUNT": 1,
788                                    "CANDIDATE_CAP_REACHED": "N",
789                                    "SCORING_CAP_REACHED": "N",
790                                    "SUPPRESSED": "N"
791                                }
792                            ]
793                        }
794                    ],
795                    "NAME_KEY": [
796                        {
797                            "FEAT_DESC": "J|PP|SM0",
798                            "LIB_FEAT_ID": 39,
799                            "FEAT_DESC_VALUES": [
800                                {
801                                    "FEAT_DESC": "J|PP|SM0",
802                                    "LIB_FEAT_ID": 39,
803                                    "USED_FOR_CAND": "Y",
804                                    "USED_FOR_SCORING": "N",
805                                    "ENTITY_COUNT": 1,
806                                    "CANDIDATE_CAP_REACHED": "N",
807                                    "SCORING_CAP_REACHED": "N",
808                                    "SUPPRESSED": "N"
809                                }
810                            ]
811                        },
812                        {
813                            "FEAT_DESC": "PP|SM0",
814                            "LIB_FEAT_ID": 23,
815                            "FEAT_DESC_VALUES": [
816                                {
817                                    "FEAT_DESC": "PP|SM0",
818                                    "LIB_FEAT_ID": 23,
819                                    "USED_FOR_CAND": "Y",
820                                    "USED_FOR_SCORING": "N",
821                                    "ENTITY_COUNT": 1,
822                                    "CANDIDATE_CAP_REACHED": "N",
823                                    "SCORING_CAP_REACHED": "N",
824                                    "SUPPRESSED": "N"
825                                }
826                            ]
827                        },
828                        {
829                            "FEAT_DESC": "RPRT|SM0",
830                            "LIB_FEAT_ID": 6,
831                            "FEAT_DESC_VALUES": [
832                                {
833                                    "FEAT_DESC": "RPRT|SM0",
834                                    "LIB_FEAT_ID": 6,
835                                    "USED_FOR_CAND": "Y",
836                                    "USED_FOR_SCORING": "N",
837                                    "ENTITY_COUNT": 1,
838                                    "CANDIDATE_CAP_REACHED": "N",
839                                    "SCORING_CAP_REACHED": "N",
840                                    "SUPPRESSED": "N"
841                                }
842                            ]
843                        }
844                    ],
845                    "PHONE": [
846                        {
847                            "FEAT_DESC": "702-919-1300",
848                            "LIB_FEAT_ID": 4,
849                            "USAGE_TYPE": "HOME",
850                            "FEAT_DESC_VALUES": [
851                                {
852                                    "FEAT_DESC": "702-919-1300",
853                                    "LIB_FEAT_ID": 4,
854                                    "USED_FOR_CAND": "N",
855                                    "USED_FOR_SCORING": "Y",
856                                    "ENTITY_COUNT": 1,
857                                    "CANDIDATE_CAP_REACHED": "N",
858                                    "SCORING_CAP_REACHED": "N",
859                                    "SUPPRESSED": "N"
860                                }
861                            ]
862                        },
863                        {
864                            "FEAT_DESC": "702-919-1300",
865                            "LIB_FEAT_ID": 4,
866                            "USAGE_TYPE": "MOBILE",
867                            "FEAT_DESC_VALUES": [
868                                {
869                                    "FEAT_DESC": "702-919-1300",
870                                    "LIB_FEAT_ID": 4,
871                                    "USED_FOR_CAND": "N",
872                                    "USED_FOR_SCORING": "Y",
873                                    "ENTITY_COUNT": 1,
874                                    "CANDIDATE_CAP_REACHED": "N",
875                                    "SCORING_CAP_REACHED": "N",
876                                    "SUPPRESSED": "N"
877                                }
878                            ]
879                        }
880                    ],
881                    "PHONE_KEY": [
882                        {
883                            "FEAT_DESC": "7029191300",
884                            "LIB_FEAT_ID": 9,
885                            "FEAT_DESC_VALUES": [
886                                {
887                                    "FEAT_DESC": "7029191300",
888                                    "LIB_FEAT_ID": 9,
889                                    "USED_FOR_CAND": "Y",
890                                    "USED_FOR_SCORING": "N",
891                                    "ENTITY_COUNT": 1,
892                                    "CANDIDATE_CAP_REACHED": "N",
893                                    "SCORING_CAP_REACHED": "N",
894                                    "SUPPRESSED": "N"
895                                }
896                            ]
897                        }
898                    ],
899                    "RECORD_TYPE": [
900                        {
901                            "FEAT_DESC": "PERSON",
902                            "LIB_FEAT_ID": 10,
903                            "FEAT_DESC_VALUES": [
904                                {
905                                    "FEAT_DESC": "PERSON",
906                                    "LIB_FEAT_ID": 10,
907                                    "USED_FOR_CAND": "N",
908                                    "USED_FOR_SCORING": "Y",
909                                    "ENTITY_COUNT": 100,
910                                    "CANDIDATE_CAP_REACHED": "N",
911                                    "SCORING_CAP_REACHED": "N",
912                                    "SUPPRESSED": "N"
913                                }
914                            ]
915                        }
916                    ]
917                },
918                "RECORD_SUMMARY": [
919                    {
920                        "DATA_SOURCE": "CUSTOMERS",
921                        "RECORD_COUNT": 3
922                    }
923                ],
924                "RECORDS": [
925                    {
926                        "DATA_SOURCE": "CUSTOMERS",
927                        "RECORD_ID": "1001",
928                        "INTERNAL_ID": 35,
929                        "MATCH_KEY": "",
930                        "MATCH_LEVEL_CODE": "",
931                        "ERRULE_CODE": "",
932                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
933                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
934                    },
935                    {
936                        "DATA_SOURCE": "CUSTOMERS",
937                        "RECORD_ID": "1002",
938                        "INTERNAL_ID": 36,
939                        "MATCH_KEY": "+NAME+DOB+PHONE",
940                        "MATCH_LEVEL_CODE": "RESOLVED",
941                        "ERRULE_CODE": "CNAME_CFF_CEXCL",
942                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
943                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
944                    },
945                    {
946                        "DATA_SOURCE": "CUSTOMERS",
947                        "RECORD_ID": "1003",
948                        "INTERNAL_ID": 37,
949                        "MATCH_KEY": "+NAME+DOB+EMAIL",
950                        "MATCH_LEVEL_CODE": "RESOLVED",
951                        "ERRULE_CODE": "SF1_PNAME_CSTAB",
952                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
953                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
954                    }
955                ]
956            },
957            "RELATED_ENTITIES": []
958        }
959    ]
960}
abstract why_records(data_source_code_1: str, record_id_1: str, data_source_code_2: str, record_id_2: str, flags: int = <SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS: 96009152>) str[source]

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

Parameters:
  • data_source_code_1 (str) – Identifies the provenance of the data.

  • record_id_1 (str) – The unique identifier within the records of the same data source.

  • data_source_code_2 (str) – Identifies the provenance of the data.

  • record_id_2 (str) – The unique identifier within the records of the same data source.

  • flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_WHY_ENTITY_DEFAULT_FLAGS.

Returns:

A JSON document.

Return type:

str

Raises:

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import (
 4    SzAbstractFactory,
 5    SzAbstractFactoryParameters,
 6    SzEngineFlags,
 7    SzError,
 8)
 9
10DATA_SOURCE_CODE_1 = "CUSTOMERS"
11DATA_SOURCE_CODE_2 = "CUSTOMERS"
12FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
13    # Differs based on which senzing_xxxx package is used.
14}
15FLAGS = SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS
16RECORD_ID_1 = "1001"
17RECORD_ID_2 = "1002"
18
19try:
20    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
21    sz_engine = sz_abstract_factory.create_engine()
22    RESULT = sz_engine.why_records(
23        DATA_SOURCE_CODE_1,
24        RECORD_ID_1,
25        DATA_SOURCE_CODE_2,
26        RECORD_ID_2,
27        FLAGS,
28    )
29    print(f"\nFile {__file__}:\n{RESULT}\n")
30except SzError as err:
31    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

  1// Output has been formatted and pruned for easier reading.
  2
  3{
  4    "WHY_RESULTS": [
  5        {
  6            "INTERNAL_ID": 35,
  7            "ENTITY_ID": 35,
  8            "FOCUS_RECORDS": [
  9                {
 10                    "DATA_SOURCE": "CUSTOMERS",
 11                    "RECORD_ID": "1001"
 12                }
 13            ],
 14            "INTERNAL_ID_2": 36,
 15            "ENTITY_ID_2": 35,
 16            "FOCUS_RECORDS_2": [
 17                {
 18                    "DATA_SOURCE": "CUSTOMERS",
 19                    "RECORD_ID": "1002"
 20                }
 21            ],
 22            "MATCH_INFO": {
 23                "WHY_KEY": "+NAME+DOB+PHONE",
 24                "WHY_ERRULE_CODE": "CNAME_CFF_CEXCL",
 25                "MATCH_LEVEL_CODE": "RESOLVED",
 26                "CANDIDATE_KEYS": {
 27                    "NAMEDATE_KEY": [
 28                        {
 29                            "FEAT_ID": 14,
 30                            "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211"
 31                        },
 32                        {
 33                            "FEAT_ID": 15,
 34                            "FEAT_DESC": "RPRT|SM0|DOB=71211"
 35                        }
 36                    ],
 37                    "NAMEPHONE_KEY": [
 38                        {
 39                            "FEAT_ID": 19,
 40                            "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300"
 41                        }
 42                    ],
 43                    "NAMEREGION_KEY": [
 44                        {
 45                            "FEAT_ID": 18,
 46                            "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS"
 47                        }
 48                    ],
 49                    "NAME_KEY": [
 50                        {
 51                            "FEAT_ID": 6,
 52                            "FEAT_DESC": "RPRT|SM0"
 53                        }
 54                    ],
 55                    "PHONE_KEY": [
 56                        {
 57                            "FEAT_ID": 9,
 58                            "FEAT_DESC": "7029191300"
 59                        }
 60                    ]
 61                },
 62                "DISCLOSED_RELATIONS": {},
 63                "FEATURE_SCORES": {
 64                    "ADDRESS": [
 65                        {
 66                            "INBOUND_FEAT_ID": 3,
 67                            "INBOUND_FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
 68                            "INBOUND_FEAT_USAGE_TYPE": "MAILING",
 69                            "CANDIDATE_FEAT_ID": 22,
 70                            "CANDIDATE_FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
 71                            "CANDIDATE_FEAT_USAGE_TYPE": "HOME",
 72                            "SCORE": 42,
 73                            "ADDITIONAL_SCORES": {
 74                                "FULL_SCORE": 42
 75                            },
 76                            "SCORE_BUCKET": "NO_CHANCE",
 77                            "SCORE_BEHAVIOR": "FF"
 78                        }
 79                    ],
 80                    "DOB": [
 81                        {
 82                            "INBOUND_FEAT_ID": 2,
 83                            "INBOUND_FEAT_DESC": "12/11/1978",
 84                            "INBOUND_FEAT_USAGE_TYPE": "",
 85                            "CANDIDATE_FEAT_ID": 21,
 86                            "CANDIDATE_FEAT_DESC": "11/12/1978",
 87                            "CANDIDATE_FEAT_USAGE_TYPE": "",
 88                            "SCORE": 95,
 89                            "ADDITIONAL_SCORES": {
 90                                "FULL_SCORE": 95
 91                            },
 92                            "SCORE_BUCKET": "CLOSE",
 93                            "SCORE_BEHAVIOR": "FMES"
 94                        }
 95                    ],
 96                    "NAME": [
 97                        {
 98                            "INBOUND_FEAT_ID": 1,
 99                            "INBOUND_FEAT_DESC": "Robert Smith",
100                            "INBOUND_FEAT_USAGE_TYPE": "PRIMARY",
101                            "CANDIDATE_FEAT_ID": 20,
102                            "CANDIDATE_FEAT_DESC": "Bob Smith",
103                            "CANDIDATE_FEAT_USAGE_TYPE": "PRIMARY",
104                            "SCORE": 97,
105                            "ADDITIONAL_SCORES": {
106                                "GENERATION_MATCH": -1,
107                                "GNR_FN": 97,
108                                "GNR_GN": 95,
109                                "GNR_ON": -1,
110                                "GNR_SN": 100
111                            },
112                            "SCORE_BUCKET": "CLOSE",
113                            "SCORE_BEHAVIOR": "NAME"
114                        }
115                    ],
116                    "PHONE": [
117                        {
118                            "INBOUND_FEAT_ID": 4,
119                            "INBOUND_FEAT_DESC": "702-919-1300",
120                            "INBOUND_FEAT_USAGE_TYPE": "HOME",
121                            "CANDIDATE_FEAT_ID": 4,
122                            "CANDIDATE_FEAT_DESC": "702-919-1300",
123                            "CANDIDATE_FEAT_USAGE_TYPE": "MOBILE",
124                            "SCORE": 100,
125                            "ADDITIONAL_SCORES": {
126                                "FULL_SCORE": 100
127                            },
128                            "SCORE_BUCKET": "SAME",
129                            "SCORE_BEHAVIOR": "FF"
130                        }
131                    ],
132                    "RECORD_TYPE": [
133                        {
134                            "INBOUND_FEAT_ID": 10,
135                            "INBOUND_FEAT_DESC": "PERSON",
136                            "INBOUND_FEAT_USAGE_TYPE": "",
137                            "CANDIDATE_FEAT_ID": 10,
138                            "CANDIDATE_FEAT_DESC": "PERSON",
139                            "CANDIDATE_FEAT_USAGE_TYPE": "",
140                            "SCORE": 100,
141                            "ADDITIONAL_SCORES": {
142                                "FULL_SCORE": 100
143                            },
144                            "SCORE_BUCKET": "SAME",
145                            "SCORE_BEHAVIOR": "FVME"
146                        }
147                    ]
148                }
149            }
150        }
151    ],
152    "ENTITIES": [
153        {
154            "RESOLVED_ENTITY": {
155                "ENTITY_ID": 35,
156                "ENTITY_NAME": "Robert Smith",
157                "FEATURES": {
158                    "ADDRESS": [
159                        {
160                            "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
161                            "LIB_FEAT_ID": 22,
162                            "USAGE_TYPE": "HOME",
163                            "FEAT_DESC_VALUES": [
164                                {
165                                    "FEAT_DESC": "1515 Adela Lane Las Vegas NV 89111",
166                                    "LIB_FEAT_ID": 22,
167                                    "USED_FOR_CAND": "N",
168                                    "USED_FOR_SCORING": "Y",
169                                    "ENTITY_COUNT": 1,
170                                    "CANDIDATE_CAP_REACHED": "N",
171                                    "SCORING_CAP_REACHED": "N",
172                                    "SUPPRESSED": "N"
173                                }
174                            ]
175                        },
176                        {
177                            "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
178                            "LIB_FEAT_ID": 3,
179                            "USAGE_TYPE": "MAILING",
180                            "FEAT_DESC_VALUES": [
181                                {
182                                    "FEAT_DESC": "123 Main Street, Las Vegas NV 89132",
183                                    "LIB_FEAT_ID": 3,
184                                    "USED_FOR_CAND": "N",
185                                    "USED_FOR_SCORING": "Y",
186                                    "ENTITY_COUNT": 1,
187                                    "CANDIDATE_CAP_REACHED": "N",
188                                    "SCORING_CAP_REACHED": "N",
189                                    "SUPPRESSED": "N"
190                                }
191                            ]
192                        }
193                    ],
194                    "ADDR_KEY": [
195                        {
196                            "FEAT_DESC": "123|MN||89132",
197                            "LIB_FEAT_ID": 8,
198                            "FEAT_DESC_VALUES": [
199                                {
200                                    "FEAT_DESC": "123|MN||89132",
201                                    "LIB_FEAT_ID": 8,
202                                    "USED_FOR_CAND": "Y",
203                                    "USED_FOR_SCORING": "N",
204                                    "ENTITY_COUNT": 1,
205                                    "CANDIDATE_CAP_REACHED": "N",
206                                    "SCORING_CAP_REACHED": "N",
207                                    "SUPPRESSED": "N"
208                                }
209                            ]
210                        },
211                        {
212                            "FEAT_DESC": "123|MN||LS FKS",
213                            "LIB_FEAT_ID": 7,
214                            "FEAT_DESC_VALUES": [
215                                {
216                                    "FEAT_DESC": "123|MN||LS FKS",
217                                    "LIB_FEAT_ID": 7,
218                                    "USED_FOR_CAND": "Y",
219                                    "USED_FOR_SCORING": "N",
220                                    "ENTITY_COUNT": 1,
221                                    "CANDIDATE_CAP_REACHED": "N",
222                                    "SCORING_CAP_REACHED": "N",
223                                    "SUPPRESSED": "N"
224                                }
225                            ]
226                        },
227                        {
228                            "FEAT_DESC": "1515|ATL||89111",
229                            "LIB_FEAT_ID": 24,
230                            "FEAT_DESC_VALUES": [
231                                {
232                                    "FEAT_DESC": "1515|ATL||89111",
233                                    "LIB_FEAT_ID": 24,
234                                    "USED_FOR_CAND": "Y",
235                                    "USED_FOR_SCORING": "N",
236                                    "ENTITY_COUNT": 1,
237                                    "CANDIDATE_CAP_REACHED": "N",
238                                    "SCORING_CAP_REACHED": "N",
239                                    "SUPPRESSED": "N"
240                                }
241                            ]
242                        },
243                        {
244                            "FEAT_DESC": "1515|ATL||LS FKS",
245                            "LIB_FEAT_ID": 25,
246                            "FEAT_DESC_VALUES": [
247                                {
248                                    "FEAT_DESC": "1515|ATL||LS FKS",
249                                    "LIB_FEAT_ID": 25,
250                                    "USED_FOR_CAND": "Y",
251                                    "USED_FOR_SCORING": "N",
252                                    "ENTITY_COUNT": 1,
253                                    "CANDIDATE_CAP_REACHED": "N",
254                                    "SCORING_CAP_REACHED": "N",
255                                    "SUPPRESSED": "N"
256                                }
257                            ]
258                        }
259                    ],
260                    "DOB": [
261                        {
262                            "FEAT_DESC": "12/11/1978",
263                            "LIB_FEAT_ID": 2,
264                            "FEAT_DESC_VALUES": [
265                                {
266                                    "FEAT_DESC": "12/11/1978",
267                                    "LIB_FEAT_ID": 2,
268                                    "USED_FOR_CAND": "Y",
269                                    "USED_FOR_SCORING": "Y",
270                                    "ENTITY_COUNT": 1,
271                                    "CANDIDATE_CAP_REACHED": "N",
272                                    "SCORING_CAP_REACHED": "N",
273                                    "SUPPRESSED": "N"
274                                },
275                                {
276                                    "FEAT_DESC": "11/12/1978",
277                                    "LIB_FEAT_ID": 21,
278                                    "USED_FOR_CAND": "Y",
279                                    "USED_FOR_SCORING": "Y",
280                                    "ENTITY_COUNT": 1,
281                                    "CANDIDATE_CAP_REACHED": "N",
282                                    "SCORING_CAP_REACHED": "N",
283                                    "SUPPRESSED": "N"
284                                }
285                            ]
286                        }
287                    ],
288                    "EMAIL": [
289                        {
290                            "FEAT_DESC": "bsmith@work.com",
291                            "LIB_FEAT_ID": 5,
292                            "FEAT_DESC_VALUES": [
293                                {
294                                    "FEAT_DESC": "bsmith@work.com",
295                                    "LIB_FEAT_ID": 5,
296                                    "USED_FOR_CAND": "N",
297                                    "USED_FOR_SCORING": "Y",
298                                    "ENTITY_COUNT": 1,
299                                    "CANDIDATE_CAP_REACHED": "N",
300                                    "SCORING_CAP_REACHED": "N",
301                                    "SUPPRESSED": "N"
302                                }
303                            ]
304                        }
305                    ],
306                    "EMAIL_KEY": [
307                        {
308                            "FEAT_DESC": "bsmith@WORK.COM",
309                            "LIB_FEAT_ID": 11,
310                            "FEAT_DESC_VALUES": [
311                                {
312                                    "FEAT_DESC": "bsmith@WORK.COM",
313                                    "LIB_FEAT_ID": 11,
314                                    "USED_FOR_CAND": "Y",
315                                    "USED_FOR_SCORING": "N",
316                                    "ENTITY_COUNT": 1,
317                                    "CANDIDATE_CAP_REACHED": "N",
318                                    "SCORING_CAP_REACHED": "N",
319                                    "SUPPRESSED": "N"
320                                }
321                            ]
322                        }
323                    ],
324                    "NAME": [
325                        {
326                            "FEAT_DESC": "Robert Smith",
327                            "LIB_FEAT_ID": 1,
328                            "USAGE_TYPE": "PRIMARY",
329                            "FEAT_DESC_VALUES": [
330                                {
331                                    "FEAT_DESC": "Robert Smith",
332                                    "LIB_FEAT_ID": 1,
333                                    "USED_FOR_CAND": "N",
334                                    "USED_FOR_SCORING": "Y",
335                                    "ENTITY_COUNT": 1,
336                                    "CANDIDATE_CAP_REACHED": "N",
337                                    "SCORING_CAP_REACHED": "N",
338                                    "SUPPRESSED": "N"
339                                },
340                                {
341                                    "FEAT_DESC": "Bob J Smith",
342                                    "LIB_FEAT_ID": 38,
343                                    "USED_FOR_CAND": "N",
344                                    "USED_FOR_SCORING": "Y",
345                                    "ENTITY_COUNT": 1,
346                                    "CANDIDATE_CAP_REACHED": "N",
347                                    "SCORING_CAP_REACHED": "N",
348                                    "SUPPRESSED": "N"
349                                },
350                                {
351                                    "FEAT_DESC": "Bob Smith",
352                                    "LIB_FEAT_ID": 20,
353                                    "USED_FOR_CAND": "N",
354                                    "USED_FOR_SCORING": "Y",
355                                    "ENTITY_COUNT": 1,
356                                    "CANDIDATE_CAP_REACHED": "N",
357                                    "SCORING_CAP_REACHED": "N",
358                                    "SUPPRESSED": "Y"
359                                }
360                            ]
361                        }
362                    ],
363                    "NAMEADDR_KEY": [
364                        {
365                            "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
366                            "LIB_FEAT_ID": 27,
367                            "FEAT_DESC_VALUES": [
368                                {
369                                    "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
370                                    "LIB_FEAT_ID": 27,
371                                    "USED_FOR_CAND": "Y",
372                                    "USED_FOR_SCORING": "N",
373                                    "ENTITY_COUNT": 1,
374                                    "CANDIDATE_CAP_REACHED": "N",
375                                    "SCORING_CAP_REACHED": "N",
376                                    "SUPPRESSED": "N"
377                                }
378                            ]
379                        },
380                        {
381                            "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
382                            "LIB_FEAT_ID": 28,
383                            "FEAT_DESC_VALUES": [
384                                {
385                                    "FEAT_DESC": "PP|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
386                                    "LIB_FEAT_ID": 28,
387                                    "USED_FOR_CAND": "Y",
388                                    "USED_FOR_SCORING": "N",
389                                    "ENTITY_COUNT": 1,
390                                    "CANDIDATE_CAP_REACHED": "N",
391                                    "SCORING_CAP_REACHED": "N",
392                                    "SUPPRESSED": "N"
393                                }
394                            ]
395                        },
396                        {
397                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||89132",
398                            "LIB_FEAT_ID": 12,
399                            "FEAT_DESC_VALUES": [
400                                {
401                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||89132",
402                                    "LIB_FEAT_ID": 12,
403                                    "USED_FOR_CAND": "Y",
404                                    "USED_FOR_SCORING": "N",
405                                    "ENTITY_COUNT": 1,
406                                    "CANDIDATE_CAP_REACHED": "N",
407                                    "SCORING_CAP_REACHED": "N",
408                                    "SUPPRESSED": "N"
409                                }
410                            ]
411                        },
412                        {
413                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||LS FKS",
414                            "LIB_FEAT_ID": 13,
415                            "FEAT_DESC_VALUES": [
416                                {
417                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=123|MN||LS FKS",
418                                    "LIB_FEAT_ID": 13,
419                                    "USED_FOR_CAND": "Y",
420                                    "USED_FOR_SCORING": "N",
421                                    "ENTITY_COUNT": 1,
422                                    "CANDIDATE_CAP_REACHED": "N",
423                                    "SCORING_CAP_REACHED": "N",
424                                    "SUPPRESSED": "N"
425                                }
426                            ]
427                        },
428                        {
429                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
430                            "LIB_FEAT_ID": 29,
431                            "FEAT_DESC_VALUES": [
432                                {
433                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||89111",
434                                    "LIB_FEAT_ID": 29,
435                                    "USED_FOR_CAND": "Y",
436                                    "USED_FOR_SCORING": "N",
437                                    "ENTITY_COUNT": 1,
438                                    "CANDIDATE_CAP_REACHED": "N",
439                                    "SCORING_CAP_REACHED": "N",
440                                    "SUPPRESSED": "N"
441                                }
442                            ]
443                        },
444                        {
445                            "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
446                            "LIB_FEAT_ID": 26,
447                            "FEAT_DESC_VALUES": [
448                                {
449                                    "FEAT_DESC": "RPRT|SM0|ADDR_KEY.EXPRESSION=1515|ATL||LS FKS",
450                                    "LIB_FEAT_ID": 26,
451                                    "USED_FOR_CAND": "Y",
452                                    "USED_FOR_SCORING": "N",
453                                    "ENTITY_COUNT": 1,
454                                    "CANDIDATE_CAP_REACHED": "N",
455                                    "SCORING_CAP_REACHED": "N",
456                                    "SUPPRESSED": "N"
457                                }
458                            ]
459                        }
460                    ],
461                    "NAMEDATE_KEY": [
462                        {
463                            "FEAT_DESC": "J|PP|SM0|DOB.MMDD_HASH=1211",
464                            "LIB_FEAT_ID": 43,
465                            "FEAT_DESC_VALUES": [
466                                {
467                                    "FEAT_DESC": "J|PP|SM0|DOB.MMDD_HASH=1211",
468                                    "LIB_FEAT_ID": 43,
469                                    "USED_FOR_CAND": "Y",
470                                    "USED_FOR_SCORING": "N",
471                                    "ENTITY_COUNT": 1,
472                                    "CANDIDATE_CAP_REACHED": "N",
473                                    "SCORING_CAP_REACHED": "N",
474                                    "SUPPRESSED": "N"
475                                }
476                            ]
477                        },
478                        {
479                            "FEAT_DESC": "J|PP|SM0|DOB.MMYY_HASH=1278",
480                            "LIB_FEAT_ID": 41,
481                            "FEAT_DESC_VALUES": [
482                                {
483                                    "FEAT_DESC": "J|PP|SM0|DOB.MMYY_HASH=1278",
484                                    "LIB_FEAT_ID": 41,
485                                    "USED_FOR_CAND": "Y",
486                                    "USED_FOR_SCORING": "N",
487                                    "ENTITY_COUNT": 1,
488                                    "CANDIDATE_CAP_REACHED": "N",
489                                    "SCORING_CAP_REACHED": "N",
490                                    "SUPPRESSED": "N"
491                                }
492                            ]
493                        },
494                        {
495                            "FEAT_DESC": "J|PP|SM0|DOB=71211",
496                            "LIB_FEAT_ID": 40,
497                            "FEAT_DESC_VALUES": [
498                                {
499                                    "FEAT_DESC": "J|PP|SM0|DOB=71211",
500                                    "LIB_FEAT_ID": 40,
501                                    "USED_FOR_CAND": "Y",
502                                    "USED_FOR_SCORING": "N",
503                                    "ENTITY_COUNT": 1,
504                                    "CANDIDATE_CAP_REACHED": "N",
505                                    "SCORING_CAP_REACHED": "N",
506                                    "SUPPRESSED": "N"
507                                }
508                            ]
509                        },
510                        {
511                            "FEAT_DESC": "PP|SM0|DOB.MMDD_HASH=1211",
512                            "LIB_FEAT_ID": 32,
513                            "FEAT_DESC_VALUES": [
514                                {
515                                    "FEAT_DESC": "PP|SM0|DOB.MMDD_HASH=1211",
516                                    "LIB_FEAT_ID": 32,
517                                    "USED_FOR_CAND": "Y",
518                                    "USED_FOR_SCORING": "N",
519                                    "ENTITY_COUNT": 1,
520                                    "CANDIDATE_CAP_REACHED": "N",
521                                    "SCORING_CAP_REACHED": "N",
522                                    "SUPPRESSED": "N"
523                                }
524                            ]
525                        },
526                        {
527                            "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1178",
528                            "LIB_FEAT_ID": 33,
529                            "FEAT_DESC_VALUES": [
530                                {
531                                    "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1178",
532                                    "LIB_FEAT_ID": 33,
533                                    "USED_FOR_CAND": "Y",
534                                    "USED_FOR_SCORING": "N",
535                                    "ENTITY_COUNT": 1,
536                                    "CANDIDATE_CAP_REACHED": "N",
537                                    "SCORING_CAP_REACHED": "N",
538                                    "SUPPRESSED": "N"
539                                }
540                            ]
541                        },
542                        {
543                            "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1278",
544                            "LIB_FEAT_ID": 42,
545                            "FEAT_DESC_VALUES": [
546                                {
547                                    "FEAT_DESC": "PP|SM0|DOB.MMYY_HASH=1278",
548                                    "LIB_FEAT_ID": 42,
549                                    "USED_FOR_CAND": "Y",
550                                    "USED_FOR_SCORING": "N",
551                                    "ENTITY_COUNT": 1,
552                                    "CANDIDATE_CAP_REACHED": "N",
553                                    "SCORING_CAP_REACHED": "N",
554                                    "SUPPRESSED": "N"
555                                }
556                            ]
557                        },
558                        {
559                            "FEAT_DESC": "PP|SM0|DOB=71211",
560                            "LIB_FEAT_ID": 31,
561                            "FEAT_DESC_VALUES": [
562                                {
563                                    "FEAT_DESC": "PP|SM0|DOB=71211",
564                                    "LIB_FEAT_ID": 31,
565                                    "USED_FOR_CAND": "Y",
566                                    "USED_FOR_SCORING": "N",
567                                    "ENTITY_COUNT": 1,
568                                    "CANDIDATE_CAP_REACHED": "N",
569                                    "SCORING_CAP_REACHED": "N",
570                                    "SUPPRESSED": "N"
571                                }
572                            ]
573                        },
574                        {
575                            "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211",
576                            "LIB_FEAT_ID": 14,
577                            "FEAT_DESC_VALUES": [
578                                {
579                                    "FEAT_DESC": "RPRT|SM0|DOB.MMDD_HASH=1211",
580                                    "LIB_FEAT_ID": 14,
581                                    "USED_FOR_CAND": "Y",
582                                    "USED_FOR_SCORING": "N",
583                                    "ENTITY_COUNT": 1,
584                                    "CANDIDATE_CAP_REACHED": "N",
585                                    "SCORING_CAP_REACHED": "N",
586                                    "SUPPRESSED": "N"
587                                }
588                            ]
589                        },
590                        {
591                            "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1178",
592                            "LIB_FEAT_ID": 30,
593                            "FEAT_DESC_VALUES": [
594                                {
595                                    "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1178",
596                                    "LIB_FEAT_ID": 30,
597                                    "USED_FOR_CAND": "Y",
598                                    "USED_FOR_SCORING": "N",
599                                    "ENTITY_COUNT": 1,
600                                    "CANDIDATE_CAP_REACHED": "N",
601                                    "SCORING_CAP_REACHED": "N",
602                                    "SUPPRESSED": "N"
603                                }
604                            ]
605                        },
606                        {
607                            "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1278",
608                            "LIB_FEAT_ID": 16,
609                            "FEAT_DESC_VALUES": [
610                                {
611                                    "FEAT_DESC": "RPRT|SM0|DOB.MMYY_HASH=1278",
612                                    "LIB_FEAT_ID": 16,
613                                    "USED_FOR_CAND": "Y",
614                                    "USED_FOR_SCORING": "N",
615                                    "ENTITY_COUNT": 1,
616                                    "CANDIDATE_CAP_REACHED": "N",
617                                    "SCORING_CAP_REACHED": "N",
618                                    "SUPPRESSED": "N"
619                                }
620                            ]
621                        },
622                        {
623                            "FEAT_DESC": "RPRT|SM0|DOB=71211",
624                            "LIB_FEAT_ID": 15,
625                            "FEAT_DESC_VALUES": [
626                                {
627                                    "FEAT_DESC": "RPRT|SM0|DOB=71211",
628                                    "LIB_FEAT_ID": 15,
629                                    "USED_FOR_CAND": "Y",
630                                    "USED_FOR_SCORING": "N",
631                                    "ENTITY_COUNT": 1,
632                                    "CANDIDATE_CAP_REACHED": "N",
633                                    "SCORING_CAP_REACHED": "N",
634                                    "SUPPRESSED": "N"
635                                }
636                            ]
637                        }
638                    ],
639                    "NAMEPHONE_KEY": [
640                        {
641                            "FEAT_DESC": "PP|SM0|PHONE.PHONE_LAST_5=91300",
642                            "LIB_FEAT_ID": 37,
643                            "FEAT_DESC_VALUES": [
644                                {
645                                    "FEAT_DESC": "PP|SM0|PHONE.PHONE_LAST_5=91300",
646                                    "LIB_FEAT_ID": 37,
647                                    "USED_FOR_CAND": "Y",
648                                    "USED_FOR_SCORING": "N",
649                                    "ENTITY_COUNT": 1,
650                                    "CANDIDATE_CAP_REACHED": "N",
651                                    "SCORING_CAP_REACHED": "N",
652                                    "SUPPRESSED": "N"
653                                }
654                            ]
655                        },
656                        {
657                            "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300",
658                            "LIB_FEAT_ID": 19,
659                            "FEAT_DESC_VALUES": [
660                                {
661                                    "FEAT_DESC": "RPRT|SM0|PHONE.PHONE_LAST_5=91300",
662                                    "LIB_FEAT_ID": 19,
663                                    "USED_FOR_CAND": "Y",
664                                    "USED_FOR_SCORING": "N",
665                                    "ENTITY_COUNT": 1,
666                                    "CANDIDATE_CAP_REACHED": "N",
667                                    "SCORING_CAP_REACHED": "N",
668                                    "SUPPRESSED": "N"
669                                }
670                            ]
671                        }
672                    ],
673                    "NAMEREGION_KEY": [
674                        {
675                            "FEAT_DESC": "PP|SM0|ADDRESS.CITY_STD=LS FKS",
676                            "LIB_FEAT_ID": 36,
677                            "FEAT_DESC_VALUES": [
678                                {
679                                    "FEAT_DESC": "PP|SM0|ADDRESS.CITY_STD=LS FKS",
680                                    "LIB_FEAT_ID": 36,
681                                    "USED_FOR_CAND": "Y",
682                                    "USED_FOR_SCORING": "N",
683                                    "ENTITY_COUNT": 1,
684                                    "CANDIDATE_CAP_REACHED": "N",
685                                    "SCORING_CAP_REACHED": "N",
686                                    "SUPPRESSED": "N"
687                                }
688                            ]
689                        },
690                        {
691                            "FEAT_DESC": "PP|SM0|POST=89111",
692                            "LIB_FEAT_ID": 35,
693                            "FEAT_DESC_VALUES": [
694                                {
695                                    "FEAT_DESC": "PP|SM0|POST=89111",
696                                    "LIB_FEAT_ID": 35,
697                                    "USED_FOR_CAND": "Y",
698                                    "USED_FOR_SCORING": "N",
699                                    "ENTITY_COUNT": 1,
700                                    "CANDIDATE_CAP_REACHED": "N",
701                                    "SCORING_CAP_REACHED": "N",
702                                    "SUPPRESSED": "N"
703                                }
704                            ]
705                        },
706                        {
707                            "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS",
708                            "LIB_FEAT_ID": 18,
709                            "FEAT_DESC_VALUES": [
710                                {
711                                    "FEAT_DESC": "RPRT|SM0|ADDRESS.CITY_STD=LS FKS",
712                                    "LIB_FEAT_ID": 18,
713                                    "USED_FOR_CAND": "Y",
714                                    "USED_FOR_SCORING": "N",
715                                    "ENTITY_COUNT": 1,
716                                    "CANDIDATE_CAP_REACHED": "N",
717                                    "SCORING_CAP_REACHED": "N",
718                                    "SUPPRESSED": "N"
719                                }
720                            ]
721                        },
722                        {
723                            "FEAT_DESC": "RPRT|SM0|POST=89111",
724                            "LIB_FEAT_ID": 34,
725                            "FEAT_DESC_VALUES": [
726                                {
727                                    "FEAT_DESC": "RPRT|SM0|POST=89111",
728                                    "LIB_FEAT_ID": 34,
729                                    "USED_FOR_CAND": "Y",
730                                    "USED_FOR_SCORING": "N",
731                                    "ENTITY_COUNT": 1,
732                                    "CANDIDATE_CAP_REACHED": "N",
733                                    "SCORING_CAP_REACHED": "N",
734                                    "SUPPRESSED": "N"
735                                }
736                            ]
737                        },
738                        {
739                            "FEAT_DESC": "RPRT|SM0|POST=89132",
740                            "LIB_FEAT_ID": 17,
741                            "FEAT_DESC_VALUES": [
742                                {
743                                    "FEAT_DESC": "RPRT|SM0|POST=89132",
744                                    "LIB_FEAT_ID": 17,
745                                    "USED_FOR_CAND": "Y",
746                                    "USED_FOR_SCORING": "N",
747                                    "ENTITY_COUNT": 1,
748                                    "CANDIDATE_CAP_REACHED": "N",
749                                    "SCORING_CAP_REACHED": "N",
750                                    "SUPPRESSED": "N"
751                                }
752                            ]
753                        }
754                    ],
755                    "NAME_KEY": [
756                        {
757                            "FEAT_DESC": "J|PP|SM0",
758                            "LIB_FEAT_ID": 39,
759                            "FEAT_DESC_VALUES": [
760                                {
761                                    "FEAT_DESC": "J|PP|SM0",
762                                    "LIB_FEAT_ID": 39,
763                                    "USED_FOR_CAND": "Y",
764                                    "USED_FOR_SCORING": "N",
765                                    "ENTITY_COUNT": 1,
766                                    "CANDIDATE_CAP_REACHED": "N",
767                                    "SCORING_CAP_REACHED": "N",
768                                    "SUPPRESSED": "N"
769                                }
770                            ]
771                        },
772                        {
773                            "FEAT_DESC": "PP|SM0",
774                            "LIB_FEAT_ID": 23,
775                            "FEAT_DESC_VALUES": [
776                                {
777                                    "FEAT_DESC": "PP|SM0",
778                                    "LIB_FEAT_ID": 23,
779                                    "USED_FOR_CAND": "Y",
780                                    "USED_FOR_SCORING": "N",
781                                    "ENTITY_COUNT": 1,
782                                    "CANDIDATE_CAP_REACHED": "N",
783                                    "SCORING_CAP_REACHED": "N",
784                                    "SUPPRESSED": "N"
785                                }
786                            ]
787                        },
788                        {
789                            "FEAT_DESC": "RPRT|SM0",
790                            "LIB_FEAT_ID": 6,
791                            "FEAT_DESC_VALUES": [
792                                {
793                                    "FEAT_DESC": "RPRT|SM0",
794                                    "LIB_FEAT_ID": 6,
795                                    "USED_FOR_CAND": "Y",
796                                    "USED_FOR_SCORING": "N",
797                                    "ENTITY_COUNT": 1,
798                                    "CANDIDATE_CAP_REACHED": "N",
799                                    "SCORING_CAP_REACHED": "N",
800                                    "SUPPRESSED": "N"
801                                }
802                            ]
803                        }
804                    ],
805                    "PHONE": [
806                        {
807                            "FEAT_DESC": "702-919-1300",
808                            "LIB_FEAT_ID": 4,
809                            "USAGE_TYPE": "HOME",
810                            "FEAT_DESC_VALUES": [
811                                {
812                                    "FEAT_DESC": "702-919-1300",
813                                    "LIB_FEAT_ID": 4,
814                                    "USED_FOR_CAND": "N",
815                                    "USED_FOR_SCORING": "Y",
816                                    "ENTITY_COUNT": 1,
817                                    "CANDIDATE_CAP_REACHED": "N",
818                                    "SCORING_CAP_REACHED": "N",
819                                    "SUPPRESSED": "N"
820                                }
821                            ]
822                        },
823                        {
824                            "FEAT_DESC": "702-919-1300",
825                            "LIB_FEAT_ID": 4,
826                            "USAGE_TYPE": "MOBILE",
827                            "FEAT_DESC_VALUES": [
828                                {
829                                    "FEAT_DESC": "702-919-1300",
830                                    "LIB_FEAT_ID": 4,
831                                    "USED_FOR_CAND": "N",
832                                    "USED_FOR_SCORING": "Y",
833                                    "ENTITY_COUNT": 1,
834                                    "CANDIDATE_CAP_REACHED": "N",
835                                    "SCORING_CAP_REACHED": "N",
836                                    "SUPPRESSED": "N"
837                                }
838                            ]
839                        }
840                    ],
841                    "PHONE_KEY": [
842                        {
843                            "FEAT_DESC": "7029191300",
844                            "LIB_FEAT_ID": 9,
845                            "FEAT_DESC_VALUES": [
846                                {
847                                    "FEAT_DESC": "7029191300",
848                                    "LIB_FEAT_ID": 9,
849                                    "USED_FOR_CAND": "Y",
850                                    "USED_FOR_SCORING": "N",
851                                    "ENTITY_COUNT": 1,
852                                    "CANDIDATE_CAP_REACHED": "N",
853                                    "SCORING_CAP_REACHED": "N",
854                                    "SUPPRESSED": "N"
855                                }
856                            ]
857                        }
858                    ],
859                    "RECORD_TYPE": [
860                        {
861                            "FEAT_DESC": "PERSON",
862                            "LIB_FEAT_ID": 10,
863                            "FEAT_DESC_VALUES": [
864                                {
865                                    "FEAT_DESC": "PERSON",
866                                    "LIB_FEAT_ID": 10,
867                                    "USED_FOR_CAND": "N",
868                                    "USED_FOR_SCORING": "Y",
869                                    "ENTITY_COUNT": 100,
870                                    "CANDIDATE_CAP_REACHED": "N",
871                                    "SCORING_CAP_REACHED": "N",
872                                    "SUPPRESSED": "N"
873                                }
874                            ]
875                        }
876                    ]
877                },
878                "RECORD_SUMMARY": [
879                    {
880                        "DATA_SOURCE": "CUSTOMERS",
881                        "RECORD_COUNT": 3
882                    }
883                ],
884                "RECORDS": [
885                    {
886                        "DATA_SOURCE": "CUSTOMERS",
887                        "RECORD_ID": "1001",
888                        "INTERNAL_ID": 35,
889                        "MATCH_KEY": "",
890                        "MATCH_LEVEL_CODE": "",
891                        "ERRULE_CODE": "",
892                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
893                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
894                    },
895                    {
896                        "DATA_SOURCE": "CUSTOMERS",
897                        "RECORD_ID": "1002",
898                        "INTERNAL_ID": 36,
899                        "MATCH_KEY": "+NAME+DOB+PHONE",
900                        "MATCH_LEVEL_CODE": "RESOLVED",
901                        "ERRULE_CODE": "CNAME_CFF_CEXCL",
902                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
903                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
904                    },
905                    {
906                        "DATA_SOURCE": "CUSTOMERS",
907                        "RECORD_ID": "1003",
908                        "INTERNAL_ID": 37,
909                        "MATCH_KEY": "+NAME+DOB+EMAIL",
910                        "MATCH_LEVEL_CODE": "RESOLVED",
911                        "ERRULE_CODE": "SF1_PNAME_CSTAB",
912                        "FIRST_SEEN_DT": "2024-10-25T17:39:00Z",
913                        "LAST_SEEN_DT": "2024-10-25T17:39:00Z"
914                    }
915                ]
916            },
917            "RELATED_ENTITIES": []
918        }
919    ]
920}
class senzing.SzEngineFlags(value)[source]

Bases: IntFlag

Engine Flags

SZ_ENTITY_BRIEF_DEFAULT_FLAGS = 1082304
SZ_ENTITY_CORE_FLAGS = 63488
SZ_ENTITY_DEFAULT_FLAGS = 3734464
SZ_ENTITY_INCLUDE_ALL_FEATURES = 1024
SZ_ENTITY_INCLUDE_ALL_RELATIONS = 960
SZ_ENTITY_INCLUDE_DISCLOSED_RELATIONS = 512
SZ_ENTITY_INCLUDE_ENTITY_NAME = 4096
SZ_ENTITY_INCLUDE_FEATURE_STATS = 16777216
SZ_ENTITY_INCLUDE_INTERNAL_FEATURES = 8388608
SZ_ENTITY_INCLUDE_NAME_ONLY_RELATIONS = 256
SZ_ENTITY_INCLUDE_POSSIBLY_SAME_RELATIONS = 64
SZ_ENTITY_INCLUDE_RECORD_DATA = 16384
SZ_ENTITY_INCLUDE_RECORD_FEATURE_DETAILS = 34359738368
SZ_ENTITY_INCLUDE_RECORD_FEATURE_IDS = 262144
SZ_ENTITY_INCLUDE_RECORD_FEATURE_STATS = 68719476736
SZ_ENTITY_INCLUDE_RECORD_JSON_DATA = 65536
SZ_ENTITY_INCLUDE_RECORD_MATCHING_INFO = 32768
SZ_ENTITY_INCLUDE_RECORD_SUMMARY = 8192
SZ_ENTITY_INCLUDE_RECORD_TYPES = 268435456
SZ_ENTITY_INCLUDE_RECORD_UNMAPPED_DATA = 2147483648
SZ_ENTITY_INCLUDE_REPRESENTATIVE_FEATURES = 2048
SZ_EXPORT_DEFAULT_FLAGS = 3734497
SZ_EXPORT_INCLUDE_ALL_ENTITIES = 33
SZ_EXPORT_INCLUDE_ALL_HAVING_RELATIONSHIPS = 30
SZ_EXPORT_INCLUDE_DISCLOSED = 16
SZ_EXPORT_INCLUDE_MULTI_RECORD_ENTITIES = 1
SZ_EXPORT_INCLUDE_NAME_ONLY = 8
SZ_EXPORT_INCLUDE_POSSIBLY_SAME = 2
SZ_EXPORT_INCLUDE_SINGLE_RECORD_ENTITIES = 32
SZ_FIND_NETWORK_DEFAULT_FLAGS = 8589946880
SZ_FIND_NETWORK_INCLUDE_MATCHING_INFO = 8589934592
SZ_FIND_PATH_DEFAULT_FLAGS = 1073754112
SZ_FIND_PATH_INCLUDE_MATCHING_INFO = 1073741824
SZ_FIND_PATH_STRICT_AVOID = 33554432
SZ_HOW_ENTITY_DEFAULT_FLAGS = 67108864
SZ_INCLUDE_FEATURE_SCORES = 67108864
SZ_INCLUDE_MATCH_KEY_DETAILS = 17179869184
SZ_RECORD_DEFAULT_FLAGS = 65536
SZ_SEARCH_BY_ATTRIBUTES_ALL = 67123215
SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS = 67123215
SZ_SEARCH_BY_ATTRIBUTES_MINIMAL_ALL = 15
SZ_SEARCH_BY_ATTRIBUTES_MINIMAL_STRONG = 3
SZ_SEARCH_BY_ATTRIBUTES_STRONG = 67123203
SZ_SEARCH_INCLUDE_ALL_ENTITIES = 15
SZ_SEARCH_INCLUDE_NAME_ONLY = 8
SZ_SEARCH_INCLUDE_POSSIBLY_SAME = 2
SZ_SEARCH_INCLUDE_RESOLVED = 1
SZ_SEARCH_INCLUDE_STATS = 134217728
SZ_VIRTUAL_ENTITY_DEFAULT_FLAGS = 63488
SZ_WHY_ENTITIES_DEFAULT_FLAGS = 96009152
SZ_WHY_RECORDS_DEFAULT_FLAGS = 96009152
SZ_WHY_RECORD_IN_ENTITY_DEFAULT_FLAGS = 96009152
SZ_WITH_INFO = 4611686018427387904
classmethod combine_flags(flags: List[Self] | List[str]) int[source]

The combine_flags method ORs together all flags in a list of strings.

Parameters:

flags (List[str]) – A list of strings each representing an engine flag.

Returns:

Value of ORing flags together.

Return type:

int

Raises:

Example:
1#! /usr/bin/env python3

Output:

1// Output has been formatted for easier reading.
2
3{
4    "DSRC_ID": 1001
5}
classmethod get_flag_int(flag: Self | str) int[source]

TODO:

exception senzing.SzError[source]

Bases: Exception

Base exception for Sz related python code.

exception senzing.SzLicenseError[source]

Bases: SzUnrecoverableError

License exception

exception senzing.SzNotFoundError[source]

Bases: SzBadInputError

Not found

exception senzing.SzNotInitializedError[source]

Bases: SzUnrecoverableError

Not initialized

class senzing.SzProduct[source]

Bases: ABC

SzProduct is the definition of the Senzing Python SDK that is implemented by packages such as szproduct.py.

abstract get_license() str[source]

The get_license method retrieves information about the currently used license.

Returns:

A JSON document containing Senzing license metadata.

Return type:

str

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_product = sz_abstract_factory.create_product()
12    RESULT = sz_product.get_license()
13    print(f"\nFile {__file__}:\n{RESULT}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "customer": "Senzing Public Test License",
 5    "contract": "EVALUATION - support@senzing.com",
 6    "issueDate": "2024-10-15",
 7    "licenseType": "EVAL (Solely for non-productive use)",
 8    "licenseLevel": "STANDARD",
 9    "billing": "MONTHLY",
10    "expireDate": "2025-10-16",
11    "recordLimit": 500
12}
abstract get_version() str[source]

The get_version method returns the version of Senzing.

Returns:

A JSON document containing metadata about the Senzing Engine version being used.

Return type:

str

Example:
 1#! /usr/bin/env python3
 2
 3from senzing_xxxx import SzAbstractFactory, SzAbstractFactoryParameters, SzError
 4
 5FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
 6    # Differs based on which senzing_xxxx package is used.
 7}
 8
 9try:
10    sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
11    sz_product = sz_abstract_factory.create_product()
12    RESULT = sz_product.get_version()
13    print(f"\nFile {__file__}:\n{RESULT}\n")
14except SzError as err:
15    print(f"\nFile {__file__}:\nError:\n{err}\n")

Output:

 1// Output has been formatted for easier reading.
 2
 3{
 4    "PRODUCT_NAME": "Senzing API",
 5    "VERSION": "4.0.0",
 6    "BUILD_VERSION": "4.0.0.24289",
 7    "BUILD_DATE": "2024-10-15",
 8    "BUILD_NUMBER": "2024_10_15__14_21",
 9    "COMPATIBILITY_VERSION": {
10        "CONFIG_VERSION": "11"
11    },
12    "SCHEMA_VERSION": {
13        "ENGINE_SCHEMA_VERSION": "4.0",
14        "MINIMUM_REQUIRED_SCHEMA_VERSION": "4.0",
15        "MAXIMUM_REQUIRED_SCHEMA_VERSION": "4.99"
16    }
17}
help(method_name: str = '') str[source]

Return the help for a particular message.

Parameters:

method_name (str) – The name of the method. (e.g. “init”). If empty, a list of methods and descriptions is returned.

Returns:

The Help information about the requested method

Return type:

str

exception senzing.SzReplaceConflictError[source]

Bases: SzError

The program can provide a remedy and continue.

exception senzing.SzRetryTimeoutExceededError[source]

Bases: SzRetryableError

Retry timeout exceeded time limit

exception senzing.SzRetryableError[source]

Bases: SzError

The program can provide a remedy and continue.

exception senzing.SzUnhandledError[source]

Bases: SzUnrecoverableError

Could not handle exception

exception senzing.SzUnknownDataSourceError[source]

Bases: SzBadInputError

Unknown DataSource

exception senzing.SzUnrecoverableError[source]

Bases: SzError

System failure, can’t continue.