diff --git a/.buildinfo b/.buildinfo new file mode 100644 index 0000000..0202064 --- /dev/null +++ b/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 911cc15ec8845b27730b48e7e5b32f05 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle new file mode 100644 index 0000000..a06a430 Binary files /dev/null and b/.doctrees/environment.pickle differ diff --git a/.doctrees/index.doctree b/.doctrees/index.doctree new file mode 100644 index 0000000..7446875 Binary files /dev/null and b/.doctrees/index.doctree differ diff --git a/.doctrees/modules.doctree b/.doctrees/modules.doctree new file mode 100644 index 0000000..9daf09c Binary files /dev/null and b/.doctrees/modules.doctree differ diff --git a/.doctrees/senzing_abstract.doctree b/.doctrees/senzing_abstract.doctree new file mode 100644 index 0000000..ad113ee Binary files /dev/null and b/.doctrees/senzing_abstract.doctree differ diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/_modules/index.html b/_modules/index.html new file mode 100644 index 0000000..ba5a69f --- /dev/null +++ b/_modules/index.html @@ -0,0 +1,107 @@ + + +
+ + +
+#! /usr/bin/env python3
+
+"""
+szconfig_abstract.py is the abstract class for all implementations of szconfig.
+"""
+
+# TODO: Determine specific SzErrors, Errors for "Raises:" documentation.
+
+from abc import ABC, abstractmethod
+from typing import Any, Dict, Union
+
+# Metadata
+
+__all__ = ["SzConfigAbstract"]
+__version__ = "0.0.1" # See https://www.python.org/dev/peps/pep-0396/
+__date__ = "2023-10-30"
+__updated__ = "2023-11-08"
+
+# -----------------------------------------------------------------------------
+# SzConfigAbstract
+# -----------------------------------------------------------------------------
+
+
+
+[docs]
+class SzConfigAbstract(ABC):
+ """
+ SzConfigAbstract is the definition of the Senzing Python API that is
+ implemented by packages such as szconfig.py.
+ """
+
+ # -------------------------------------------------------------------------
+ # Messages
+ # -------------------------------------------------------------------------
+
+ PREFIX = "szconfig."
+ ID_MESSAGES = {
+ 4001: PREFIX + "add_data_source({0}) failed. Return code: {1}",
+ 4002: PREFIX + "close_config() failed. Return code: {0}",
+ 4003: PREFIX + "create_config() failed. Return code: {0}",
+ 4004: PREFIX + "delete_data_source({0}) failed. Return code: {1}",
+ 4005: PREFIX + "destroy() failed. Return code: {0}",
+ 4006: PREFIX + "export_config() failed. Return code: {0}",
+ 4007: PREFIX + "get_data_sources() failed. Return code: {0}",
+ 4008: PREFIX + "initialize({0}, {1}, {2}) failed. Return code: {3}",
+ 4009: PREFIX + "import_config({0}) failed. Return code: {1}",
+ 4010: PREFIX
+ + "SzConfig({0}, {1}) failed. instance_name and settings must both be set or both be empty",
+ }
+
+ # -------------------------------------------------------------------------
+ # Interface definition
+ # -------------------------------------------------------------------------
+
+
+[docs]
+ @abstractmethod
+ def add_data_source(
+ self,
+ config_handle: int,
+ # data_source_code: Union[str, Dict[Any, Any]],
+ data_source_code: str,
+ **kwargs: Any
+ ) -> str:
+ """
+ The `add_data_source` method adds a data source to an existing in-memory configuration.
+
+ Args:
+ 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:
+ str: A string containing a JSON document listing the newly created data source.
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfig/add_data_source.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szconfig/add_data_source.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def close_config(self, config_handle: int, **kwargs: Any) -> None:
+ """
+ The `close_config` method cleans up the Senzing SzConfig object pointed to by the `config_handle`.
+
+ Args:
+ 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.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfig/create_and_close.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def create_config(self, **kwargs: Any) -> int:
+ """
+ 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:
+ int: A pointer to an in-memory Senzing configuration.
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfig/create_and_close.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def delete_data_source(
+ self, config_handle: int, data_source_code: str, **kwargs: Any
+ ) -> None:
+ """
+ The `delete_data_source` method removes a data source from an existing in-memory configuration.
+
+ Args:
+ 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.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfig/delete_data_source.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def destroy(self, **kwargs: Any) -> None:
+ """
+ The `destroy` method will destroy and perform cleanup for the Senzing SzConfig object.
+ It should be called after all other calls are complete.
+
+ **Note:** If the `SzConfig` constructor was called with parameters,
+ the destructor will automatically call the destroy() method.
+ In this case, a separate call to `destroy()` is not needed.
+
+ Raises:
+ szerror.SzError:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfig/szconfig_initialize_and_destroy.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def export_config(self, config_handle: int, **kwargs: Any) -> str:
+ """
+ The `export_config` method creates a JSON string representation of the Senzing SzConfig object.
+
+ Args:
+ config_handle (int): An identifier of an in-memory configuration. Usually created by the `create` or `load` methods
+
+ Returns:
+ str: A string containing a JSON Document representation of the Senzing SzConfig object.
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfig/export_config.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szconfig/export_config.txt
+ :linenos:
+ :language: json
+
+ **Create, export, import, and close example**
+
+ .. literalinclude:: ../../examples/szconfig/create_export_import_close.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def get_data_sources(self, config_handle: int, **kwargs: Any) -> str:
+ """
+ The `get_data_sources` method returns a JSON document of data sources
+ contained in an in-memory configuration.
+
+ Args:
+ config_handle (int): An identifier of an in-memory configuration. Usually created by the `create` or `load` methods
+
+ Returns:
+ str: A string containing a JSON document listing all of the data sources.
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfig/get_data_sources.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szconfig/get_data_sources.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def initialize(
+ self,
+ instance_name: str,
+ settings: Union[str, Dict[Any, Any]],
+ verbose_logging: int = 0,
+ **kwargs: Any
+ ) -> None:
+ """
+ The `initialize` method initializes the Senzing SzConfig object.
+ It must be called prior to any other calls.
+
+ **Note:** If the SzConfig constructor is called with parameters,
+ the constructor will automatically call the `initialize()` method.
+ In this case, a separate call to `initialize()` is not needed.
+
+ Args:
+ instance_name (str): A short name given to this instance of the SzConfig object, to help identify it within system logs.
+ settings (Union[str, Dict[Any, Any]]): A JSON string containing configuration parameters.
+ verbose_logging (int): `Optional:` A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfig/szconfig_initialize_and_destroy.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def import_config(
+ self, config_definition: Union[str, Dict[Any, Any]], **kwargs: Any
+ ) -> int:
+ """
+ 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.
+
+ Args:
+ config_definition (Union[str, Dict[Any, Any]]): A JSON document containing the Senzing configuration.
+
+ Returns:
+ int: An identifier (config_handle) of an in-memory configuration.
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfig/import_config.py
+ :linenos:
+ :language: python
+
+ **Create, save, load, and close**
+
+ .. literalinclude:: ../../examples/szconfig/create_export_import_close.py
+ :linenos:
+ :language: python
+ """
+
+
+
+ # -------------------------------------------------------------------------
+ # Convenience methods
+ # -------------------------------------------------------------------------
+
+#! /usr/bin/env python3
+
+"""
+szconfigmanager_abstract.py is the abstract class for all implementations of szconfigmanager.
+"""
+
+# TODO: Determine specific SzErrors, Errors for "Raises:" documentation.
+
+from abc import ABC, abstractmethod
+from typing import Any, Dict, Union
+
+# Metadata
+
+__all__ = ["SzConfigManagerAbstract"]
+__version__ = "0.0.1" # See https://www.python.org/dev/peps/pep-0396/
+__date__ = "2023-10-30"
+__updated__ = "2023-11-08"
+
+# -----------------------------------------------------------------------------
+# SzConfigManagerAbstract
+# -----------------------------------------------------------------------------
+
+
+
+[docs]
+class SzConfigManagerAbstract(ABC):
+ """
+ SzConfigManagerAbstract is the definition of the Senzing Python API that is
+ implemented by packages such as szconfigmanager.py.
+ """
+
+ # -------------------------------------------------------------------------
+ # Messages
+ # -------------------------------------------------------------------------
+
+ PREFIX = "szconfigmanager."
+ ID_MESSAGES = {
+ 4001: PREFIX + "add_config({0}, {1}) failed. Return code: {2}",
+ 4002: PREFIX + "destroy() failed. Return code: {0}",
+ 4003: PREFIX + "get_config({0}) failed. Return code: {1}",
+ 4004: PREFIX + "get_config_list() failed. Return code: {0}",
+ 4005: PREFIX + "get_default_config_id() failed. Return code: {0}",
+ 4006: PREFIX + "initialize({0}, {1}, {2}) failed. Return code: {3}",
+ 4007: PREFIX + "replace_default_config_id({0}, {1}) failed. Return code: {2}",
+ 4008: PREFIX + "set_default_config_id({0}) failed. Return code: {1}",
+ 4009: PREFIX
+ + "SzConfigManager({0}, {1}) failed. instance_name and settings must both be set or both be empty",
+ }
+
+ # -------------------------------------------------------------------------
+ # Interface definition
+ # -------------------------------------------------------------------------
+
+
+[docs]
+ @abstractmethod
+ def add_config(
+ self,
+ config_definition: Union[str, Dict[Any, Any]],
+ config_comment: str,
+ **kwargs: Any
+ ) -> int:
+ """
+ The `add_config` method adds a Senzing configuration JSON document to the Senzing database.
+
+ Args:
+ config_definition (Union[str, Dict[Any, Any]]): The Senzing configuration JSON document.
+ config_comment (str): free-form string of comments describing the configuration document.
+
+ Returns:
+ int: A configuration identifier.
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfigmanager/add_config.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def destroy(self, **kwargs: Any) -> None:
+ """
+ The `destroy` method will destroy and perform cleanup for the Senzing SzConfigManager object.
+ It should be called after all other calls are complete.
+
+ **Note:** If the `SzConfigManager` constructor was called with parameters,
+ the destructor will automatically call the destroy() method.
+ In this case, a separate call to `destroy()` is not needed.
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfigmanager/szconfigmanager_initialize_and_destroy.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def get_config(self, config_id: int, **kwargs: Any) -> str:
+ """
+ The `get_config` method retrieves a specific Senzing configuration JSON document from the Senzing database.
+
+ Args:
+ config_id (int): The configuration identifier of the desired Senzing Engine configuration JSON document to retrieve.
+
+ Returns:
+ str: A JSON document containing the Senzing configuration.
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfigmanager/get_config.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szconfigmanager/get_config.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def get_config_list(self, **kwargs: Any) -> str:
+ """
+ The `get_config_list` method retrieves a list of Senzing configurations from the Senzing database.
+
+ Returns:
+ str: A JSON document containing Senzing configurations.
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfigmanager/get_config_list.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szconfigmanager/get_config_list.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def get_default_config_id(self, **kwargs: Any) -> int:
+ """
+ The `get_default_config_id` method retrieves from the Senzing database the configuration identifier of the default Senzing configuration.
+
+ Returns:
+ int: A configuration identifier which identifies the current configuration in use.
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfigmanager/get_default_config_id.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def initialize(
+ self,
+ instance_name: str,
+ settings: Union[str, Dict[Any, Any]],
+ verbose_logging: int = 0,
+ **kwargs: Any
+ ) -> None:
+ """
+ The `initialize` method initializes the Senzing SzConfigManager object.
+ It must be called prior to any other calls.
+
+ **Note:** If the SzConfigManager constructor is called with parameters,
+ the constructor will automatically call the `initialize()` method.
+ In this case, a separate call to `initialize()` is not needed.
+
+ Args:
+ instance_name (str): A short name given to this instance of the SzProduct object, to help identify it within system logs.
+ settings (Union[str, Dict[Any, Any]]): A JSON string containing configuration parameters.
+ verbose_logging (int): `Optional:` A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfigmanager/szconfigmanager_initialize_and_destroy.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def replace_default_config_id(
+ self, current_default_config_id: int, new_default_config_id: int, **kwargs: Any
+ ) -> None:
+ """
+ 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`.
+
+ Args:
+ 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.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfigmanager/replace_default_config_id.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def set_default_config_id(self, config_id: int, **kwargs: Any) -> None:
+ """
+ The `set_default_config_id` method replaces the sets a new configuration identifier in the Senzing database.
+ To serialize modifying of the configuration identifier, see `replace_default_config_id`.
+
+ Args:
+ config_id (int): The configuration identifier of the Senzing Engine configuration to use as the default.
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szconfigmanager/set_default_config_id.py
+ :linenos:
+ :language: python
+ """
+
+
+
+ # -------------------------------------------------------------------------
+ # Convenience methods
+ # -------------------------------------------------------------------------
+
+#! /usr/bin/env python3
+
+"""
+TODO: szdiagnostic_abstract.py
+"""
+
+from abc import ABC, abstractmethod
+from typing import Any, Dict, Optional, Union
+
+# Metadata
+
+__all__ = ["SzDiagnosticAbstract"]
+__version__ = "0.0.1" # See https://www.python.org/dev/peps/pep-0396/
+__date__ = "2023-10-30"
+__updated__ = "2023-10-30"
+
+# -----------------------------------------------------------------------------
+# SzDiagnosticAbstract
+# -----------------------------------------------------------------------------
+
+
+
+[docs]
+class SzDiagnosticAbstract(ABC):
+ """
+ Senzing diagnostic module access library
+ """
+
+ # -------------------------------------------------------------------------
+ # Messages
+ # -------------------------------------------------------------------------
+
+ PREFIX = "szdiagnostic."
+ ID_MESSAGES = {
+ 4001: PREFIX + "check_datastore_performance({0}) failed. Return code: {1}",
+ 4002: PREFIX + "destroy() failed. Return code: {0}",
+ 4003: PREFIX + "get_datastore_info() failed. Return code: {0}",
+ 4004: PREFIX + "get_feature({0}) failed. Return code: {1}",
+ 4005: PREFIX + "initialize({0}, {1}, {2}, {3}) failed. Return code: {4}",
+ 4006: PREFIX + "purge_repository() failed. Return code: {0}",
+ 4007: PREFIX + "reinitialize({0}) failed. Return Code: {1}",
+ 4008: PREFIX
+ + "SzDiagnostic({0}, {1}) failed. instance_name and settings must both be set or both be empty",
+ }
+
+ # -------------------------------------------------------------------------
+ # Interface definition
+ # -------------------------------------------------------------------------
+
+
+[docs]
+ @abstractmethod
+ def check_datastore_performance(self, seconds_to_run: int, **kwargs: Any) -> str:
+ """
+ The `check_datastore_performance` method performs inserts to determine rate of insertion.
+
+ Args:
+ seconds_to_run (int): Duration of the test in seconds.
+
+ Returns:
+ str: A string containing a JSON document.
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+ szexception.SzError:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szdiagnostic/check_datastore_performance.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szdiagnostic/check_datastore_performance.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def destroy(self, **kwargs: Any) -> None:
+ """
+ The `destroy` method will destroy and perform cleanup for the Senzing SzDiagnostic object.
+ It should be called after all other calls are complete.
+
+ **Note:** If the `SzDiagnostic` constructor was called with parameters,
+ the destructor will automatically call the destroy() method.
+ In this case, a separate call to `destroy()` is not needed.
+
+ Raises:
+ szexception.SzError:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szdiagnostic/szdiagnostic_initialize_and_destroy.py
+ :linenos:
+ :language: python
+ """
+
+
+ # TODO docstring
+
+[docs]
+ @abstractmethod
+ def get_datastore_info(self, **kwargs: Any) -> str:
+ """
+ The `get_datastore_info` method will...
+
+ Raises:
+ szexception.SzError:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szdiagnostic/get_datastore_info.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szdiagnostic/get_datastore_info.txt
+ :linenos:
+ :language: json
+ """
+
+
+ # NOTE This is included but not to be documented
+
+
+
+
+[docs]
+ @abstractmethod
+ def initialize(
+ self,
+ instance_name: str,
+ settings: Union[str, Dict[Any, Any]],
+ config_id: Optional[int] = None,
+ verbose_logging: int = 0,
+ **kwargs: Any
+ ) -> None:
+ """
+ The `initialize` method initializes the Senzing SzDiagnosis object.
+ It must be called prior to any other calls.
+
+ **Note:** If the Sz Diagnosis constructor is called with parameters,
+ the constructor will automatically call the `initialize()` method.
+ In this case, a separate call to `initialize()` is not needed.
+
+ Args:
+ instance_name (str): A name for the auditing node, to help identify it within system logs.
+ settings (Union[str, Dict[Any, Any]]): A JSON string containing configuration parameters.
+ config_id (int): `Optional:` Initialize with a specific configuration ID and not the current default.
+ verbose_logging (int): `Optional:` A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+ szexception.SzError:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szdiagnostic/szdiagnostic_initialize_and_destroy.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def purge_repository(self, **kwargs: Any) -> None:
+ """
+ **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:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szdiagnostic/purge_repository.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def reinitialize(self, config_id: int, **kwargs: Any) -> None:
+ """
+ The `reinitialize` method re-initializes the Senzing SzDiagnostic object.
+
+ Args:
+ config_id (int): The configuration ID used for the initialization
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+ szexception.SzError: config_id does not exist.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szdiagnostic/szdiagnostic_reinitialize.py
+ :linenos:
+ :language: python
+ """
+
+
+
+#! /usr/bin/env python3
+
+"""
+TODO: szengine_abstract.py
+"""
+
+# pylint: disable=C0302
+# AC - Temp disables to get changes in for move to senzing garage
+# pylint: disable=W0511,W1113
+
+
+# Import from standard library. https://docs.python.org/3/library/
+
+import json
+from abc import ABC, abstractmethod
+from typing import Any, Dict, List, Optional, Union, cast
+
+from .szengineflags import SzEngineFlags
+
+# Metadata
+
+# __all__ = ["SzEngineAbstract", "WithInfoResponsesAbstract"]
+__all__ = ["SzEngineAbstract"]
+__version__ = "0.0.1" # See https://www.python.org/dev/peps/pep-0396/
+__date__ = "2023-10-30"
+__updated__ = "2023-10-30"
+
+
+# -------------------------------------------------------------------------
+# Classes
+# -------------------------------------------------------------------------
+
+
+
+[docs]
+class SzEngineAbstract(ABC):
+ """
+ Senzing engine module access library
+ """
+
+ # -------------------------------------------------------------------------
+ # Messages
+ # -------------------------------------------------------------------------
+
+ PREFIX = "szengine."
+ """ :meta private: """
+
+ ID_MESSAGES = {
+ 4001: PREFIX + "add_record({0}, {1}, {2}, {3}) failed. Return code: {4}",
+ 4002: PREFIX + "close_export() failed. Return code: {0}",
+ 4003: PREFIX + "count_redo_records() failed. Return code: {0}",
+ 4004: PREFIX + "delete_record({0}, {1}, {2}) failed. Return code: {3}",
+ 4005: PREFIX + "destroy() failed. Return code: {0}",
+ 4006: PREFIX + "export_csv_entity_report({0}, {1}) failed. Return code: {2}",
+ 4007: PREFIX + "export_json_entity_report({0}) failed. Return code: {1}",
+ 4008: PREFIX + "fetch_next({0}) failed. Return code: {1}",
+ # NOTE Included but not documented or examples, early adaptor feature, needs manual additions to config
+ 4009: PREFIX
+ + "find_interesting_entities_by_entity_id({0}, {1}) failed. Return code: {2}",
+ # NOTE Included but not documented or examples, early adaptor feature, needs manual additions to config
+ 4010: (
+ PREFIX
+ + "find_interesting_entities_by_record_id({0}, {1}, {2}) failed. Return"
+ " code: {3}"
+ ),
+ 4011: (
+ PREFIX
+ + "find_network_by_entity_id({0}, {1}, {2}, {3}, {4}) failed. Return code: {5}"
+ ),
+ 4012: (
+ PREFIX
+ + "find_network_by_record_id({0}, {1}, {2}, {3}, {4}) failed. Return code: {5}"
+ ),
+ 4013: PREFIX
+ + "find_path_by_entity_id({0}, {1}, {2}, {3}, {4}, {5}) failed. Return code: {6}",
+ 4014: PREFIX
+ + "find_path_by_record_id({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}) failed. Return code: {8}",
+ 4015: PREFIX + "get_active_config_id() failed. Return code: {0}",
+ 4016: PREFIX + "get_entity_by_entity_id({0}, {1}) failed. Return code: {2}",
+ 4017: PREFIX
+ + "get_entity_by_record_id({0}, {1}, {3}) failed. Return code: {4}",
+ 4018: PREFIX + "get_record({0}, {1}, {2}) failed. Return code: {3}",
+ 4019: PREFIX + "get_redo_record() failed. Return code: {0}",
+ 4020: PREFIX + "get_repository_last_modified_time() failed. Return code: {0}",
+ 4021: PREFIX + "get_stats() failed. Return code: {0}",
+ 4022: PREFIX + "get_virtual_entity_by_record_id({0}) failed. Return code: {1}",
+ 4023: PREFIX + "how_entity_by_entity_id({0}) failed. Return code: {1}",
+ 4024: PREFIX + "initialize({0}, {1}, {2}, {3}) failed. Return code: {4}",
+ 4025: PREFIX + "prime_engine() failed. Return code: {0}",
+ 4026: PREFIX + "process_redo_record({0}, {1}) failed. Return code: {2}",
+ 4027: PREFIX + "reevaluate_entity({0}, {1}) failed. Return code: {2}",
+ 4028: PREFIX + "reevaluate_record({0}, {1}, {2}) failed. Return code: {3}",
+ 4029: PREFIX + "reinitialize({0}) failed. Return code: {1}",
+ 4030: PREFIX + "search_by_attributes({0}) failed. Return code: {1}",
+ 4031: PREFIX + "why_entities({0}, {1}) failed. Return code: {2}",
+ 4032: PREFIX + "why_records({0}, {1}, {2}, {3}, {4}) failed. Return code: {5}",
+ 4033: PREFIX + "why_record_in_entity{0}, {1}, {2}) failed. Return code: {3}",
+ 4034: (
+ PREFIX
+ + "SzEngine({0}, {1}) failed. instance_name and settings must both be set or"
+ " both be empty"
+ ),
+ }
+ """ :meta private: """
+
+ # -------------------------------------------------------------------------
+ # Interface definition
+ # -------------------------------------------------------------------------
+
+
+[docs]
+ @abstractmethod
+ def add_record(
+ self,
+ data_source_code: str,
+ record_id: str,
+ record_definition: Union[str, Dict[Any, Any]],
+ flags: int = 0,
+ **kwargs: Any,
+ ) -> str:
+ """
+ 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.
+
+ Args:
+ 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 | Dict): 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:
+ str: If flags are set to return the WITH_INFO response a JSON document containing the details, otherwise an empty JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/add_record.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/add_record.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def close_export(self, export_handle: int, **kwargs: Any) -> None:
+ """
+ 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.
+
+ Args:
+ export_handle (int): A handle created by `export_json_entity_report` or `export_csv_entity_report`.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/export_json_fetch_close.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/export_json_fetch_close.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def count_redo_records(self, **kwargs: Any) -> int:
+ """
+ The `count_redo_records` method returns the number of records in need of redo-ing.
+
+ Returns:
+ int: The number of redo records in Senzing's redo queue.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/count_redo_records.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/count_redo_records.txt
+ :linenos:
+ :language: guess
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def delete_record(
+ self,
+ data_source_code: str,
+ record_id: str,
+ flags: int = 0,
+ **kwargs: Any,
+ ) -> str:
+ """
+ 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.
+
+ Args:
+ data_source_code (str): Identifies the provenance of the data.
+ record_id (str): The unique identifier within the records of the same data source.
+ load_id (str, optional): An identifier used to distinguish different load batches/sessions. An empty string is acceptable. Defaults to "".
+ flags (int, optional): Flags used to control information returned. Defaults to 0.
+
+ Returns:
+ str: If flags are set to return the WITH_INFO response a JSON document containing the details, otherwise an empty JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/delete_record.py
+ :linenos:
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/delete_record.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def destroy(self, **kwargs: Any) -> None:
+ """
+ The `destroy` method releases resources and performs cleanup for the SzEngine object and any in-memory configurations.
+ It should be called after all other calls are complete.
+
+ **Note:** If the `SzEngine` constructor was called with parameters,
+ the destructor will automatically call the destroy() method.
+ In this case, a separate call to `destroy()` is not needed.
+
+ Raises:
+ szexception.SzError:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/szengine_initialize_and_destroy.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def export_csv_entity_report(
+ self,
+ csv_column_list: str,
+ flags: int = SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> int:
+ # TODO Add into docstring a good default csv_column_list example
+ """
+ **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.
+
+ Args:
+ 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:
+ int: A handle that identifies the document to be scrolled through using `fetch_next`.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/export_csv_fetch_close.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/export_csv_fetch_close.txt
+ :linenos:
+ :language: guess
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def export_json_entity_report(
+ self, flags: int = SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS, **kwargs: Any
+ ) -> int:
+ """
+ **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.
+
+ Args:
+ flags (int, optional): Flags used to control information returned. Defaults to SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS.
+
+ Returns:
+ int: A handle that identifies the document to be scrolled through using `fetch_next`.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/export_json_fetch_close.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/export_json_fetch_close.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def fetch_next(self, export_handle: int, **kwargs: Any) -> str:
+ """
+ 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.
+
+ Args:
+ response_handle (int): A handle created by `export_json_entity_report` or `export_json_entity_report`.
+
+ Returns:
+ str: TODO:
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/export_json_fetch_close.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/export_json_fetch_close.txt
+ :linenos:
+ :language: json
+ """
+
+
+ # NOTE Included but not to be documented or examples, early adaptor feature, needs manual additions to config
+
+[docs]
+ @abstractmethod
+ def find_interesting_entities_by_entity_id(
+ self, entity_id: int, flags: int = 0, **kwargs: Any
+ ) -> str:
+ """"""
+
+
+ # NOTE Included but not to be documented or examples, early adaptor feature, needs manual additions to config
+
+[docs]
+ @abstractmethod
+ def find_interesting_entities_by_record_id(
+ self, data_source_code: str, record_id: str, flags: int = 0, **kwargs: Any
+ ) -> str:
+ """"""
+
+
+
+[docs]
+ @abstractmethod
+ def find_network_by_entity_id(
+ self,
+ entity_list: Union[str, Dict[str, List[Dict[str, int]]]],
+ max_degrees: int,
+ build_out_degree: int,
+ max_entities: int,
+ flags: int = SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> str:
+ """
+ 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.
+
+ Args:
+ entity_list (str): A JSON document listing entities.
+ max_degrees (int): The maximum number of degrees in paths between search entities.
+ build_out_degree (int): The number of degrees of relationships to show around each search entity.
+ 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:
+ str: A JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/find_network_by_entity_id.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/find_network_by_entity_id.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def find_network_by_record_id(
+ self,
+ record_list: Union[str, Dict[str, List[Dict[str, str]]]],
+ max_degrees: int,
+ build_out_degree: int,
+ max_entities: int,
+ flags: int = SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> str:
+ """
+ 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.
+
+ Args:
+ record_list (str): A JSON document listing records.
+ max_degrees (int): The maximum number of degrees in paths between search entities.
+ build_out_degree (int): The number of degrees of relationships to show around each search entity.
+ 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:
+ str: A JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/find_network_by_record_id.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/find_network_by_record_id.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def find_path_by_entity_id(
+ self,
+ start_entity_id: int,
+ end_entity_id: int,
+ max_degrees: int,
+ # TODO Should accept both entity and record IDs in V4, test
+ exclusions: Union[str, Dict[Any, Any]] = "",
+ required_data_sources: Union[str, Dict[Any, Any]] = "",
+ flags: int = SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> str:
+ """
+ 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.
+
+ Args:
+ 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.
+ exclusions (str): TODO
+ required_data_sources (str): TODO
+ flags (int, optional): Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.
+
+ Returns:
+ str: A JSON document with an ENTITY_PATHS section that details the path between the entities.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/find_path_by_entity_id.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/find_path_by_entity_id.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def find_path_by_record_id(
+ self,
+ start_data_source_code: str,
+ start_record_id: str,
+ end_data_source_code: str,
+ end_record_id: str,
+ max_degrees: int,
+ exclusions: Union[str, Dict[Any, Any]] = "",
+ required_data_sources: Union[str, Dict[Any, Any]] = "",
+ flags: int = SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> str:
+ """
+ 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.
+
+ Args:
+ 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.
+ exclusions (str): TODO
+ required_data_sources (str): TODO
+ flags (int, optional): Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.
+
+ Returns:
+ str: A JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/find_path_by_record_id.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/find_path_by_record_id.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def get_active_config_id(self, **kwargs: Any) -> int:
+ """
+ The `get_active_config_id` method returns the identifier of the currently active Senzing engine configuration.
+
+ Returns:
+ int: The identifier of the active Senzing Engine configuration.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/get_active_config_id.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/get_active_config_id.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def get_entity_by_entity_id(
+ self,
+ entity_id: int,
+ flags: int = SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> str:
+ """
+ The `get_entity_by_entity_id` method returns entity data based on the ID of a resolved identity.
+
+ Args:
+ 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:
+ str: A JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/get_entity_by_entity_id.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/get_entity_by_entity_id.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def get_entity_by_record_id(
+ self,
+ data_source_code: str,
+ record_id: str,
+ flags: int = SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> str:
+ """
+ The `get_entity_by_record_id` method returns entity data based on the ID of a record which is a member of the entity.
+
+ Args:
+ 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:
+ str: A JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/get_entity_by_record_id.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/get_entity_by_record_id.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def get_record(
+ self,
+ data_source_code: str,
+ record_id: str,
+ flags: int = SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> str:
+ """
+ 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.
+
+ Args:
+ 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:
+ str: A JSON document of a single record.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/get_record.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/get_record.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def get_redo_record(self, **kwargs: Any) -> str:
+ """
+ The `get_redo_record` method returns the next internally queued redo record from the Senzing repository.
+ Usually, the `process_redo_record` or `process_redo_record_with_info` method is called to process the redo record
+ retrieved by `get_redo_record`.
+
+ Returns:
+ str: A JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/get_redo_record.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/get_redo_record.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def get_repository_last_modified_time(self, **kwargs: Any) -> int:
+ """
+ The `get_repository_last_modified_time` method retrieves the last modified time of the Senzing repository,
+ measured in the number of seconds between the last modified time and January 1, 1970 12:00am GMT (epoch time).
+
+ Returns:
+ int: A Unix Timestamp.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/get_repository_last_modified_time.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/get_repository_last_modified_time.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def get_stats(self, **kwargs: Any) -> str:
+ """
+ The `get_stats` method retrieves workload statistics for the current process.
+ These statistics will automatically reset after retrieval.
+
+ Returns:
+ str: A JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/get_stats.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/get_stats.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def get_virtual_entity_by_record_id(
+ self,
+ record_list: Union[str, Dict[Any, Any]],
+ flags: int = SzEngineFlags.SZ_VIRTUAL_ENTITY_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> str:
+ """
+ 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.
+
+ Args:
+ record_list (str): A JSON document of one or more records by DATA_SOURCE and RECORD_ID pairs, formatted as `{"RECORDS":[{"DATA_SOURCE":"DS1","RECORD_ID":"R1"},{"DATA_SOURCE":"DS2","RECORD_ID":"R2"}]}`.
+ flags (int, optional): Flags used to control information returned. Defaults to SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS.
+
+ Returns:
+ str: A JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/get_virtual_entity_by_record_id.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/get_virtual_entity_by_record_id.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def how_entity_by_entity_id(
+ self,
+ entity_id: int,
+ flags: int = SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> str:
+ """
+ The `how_entity_by_entity_id` method determines and details steps-by-step *how* records resolved to an ENTITY_ID.
+
+ In most cases, *how* provides more detailed information than *why* as the resolution is detailed step-by-step.
+
+ Args:
+ 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:
+ str: A JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/how_entity_by_entity_id.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/how_entity_by_entity_id.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def initialize(
+ self,
+ instance_name: str,
+ settings: Union[str, Dict[Any, Any]],
+ config_id: Optional[int] = None,
+ verbose_logging: int = 0,
+ **kwargs: Any,
+ ) -> None:
+ # TODO docstring plugin
+ """
+ he ``initialize`` method initializes the Senzing SzEngine object.
+ It must be called prior to any other calls.
+
+ **Note:** If the SzEngine constructor is called with parameters,
+ the constructor will automatically call the ``initialize()`` method.
+ In this case, a separate call to ``initialize()`` is not needed.
+
+ Args:
+ instance_name (str): A short name given to this instance of the SzEngine object, to help identify it within system logs.
+ settings (str): A JSON string containing configuration parameters.
+ config_id (int):
+ verbose_logging (int): `Optional:` A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/szengine_initialize_and_destroy.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def prime_engine(self, **kwargs: Any) -> None:
+ """
+ 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:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/prime_engine.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def process_redo_record(self, redo_record: str, flags: int, **kwargs: Any) -> str:
+ """
+ #TODO The `process_redo_record` method...
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/process_redo_record.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/process_redo_record.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def reevaluate_entity(self, entity_id: int, flags: int = 0, **kwargs: Any) -> str:
+ """
+ The `reevaluate_entity` method reevaluates the specified entity.
+
+ Args:
+ entity_id (int): The unique identifier of an entity.
+ flags (int, optional): Flags used to control information returned. Defaults to 0.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/reevaluate_entity.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/reevaluate_entity.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def reevaluate_record(
+ self, data_source_code: str, record_id: str, flags: int = 0, **kwargs: Any
+ ) -> str:
+ """
+ The `reevaluate_record` method reevaluates a specific record.
+
+ Args:
+ 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:
+ str: If flags are set to return the WITH_INFO response a JSON document containing the details, otherwise an empty JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/reevaluate_record.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/reevaluate_record.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def reinitialize(self, config_id: int, **kwargs: Any) -> None:
+ """
+ The `reinitialize` method reinitializes the Senzing SzEngine object using a specific configuration
+ identifier. A list of available configuration identifiers can be retrieved using
+ `szconfigmanager.get_config_list`.
+
+ Args:
+ config_id (int): The configuration ID used for the initialization
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+ szexception.SzError: config_id does not exist.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/szengine_reinitialize.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def search_by_attributes(
+ self,
+ attributes: Union[str, Dict[Any, Any]],
+ search_profile: str = "",
+ flags: int = SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> str:
+ """
+ The `search_by_attributes` method retrieves entity data based on a user-specified set of entity attributes.
+
+ Args:
+ attributes (str): A JSON document with the attribute data to search for.
+ search_profile (str): The name of a configured search profile. Defaults to SEARCH.
+ flags (int, optional): _description_. Defaults to SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS.
+
+ Returns:
+ str: A JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/search_by_attributes.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/search_by_attributes.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def why_entities(
+ self,
+ entity_id_1: int,
+ entity_id_2: int,
+ flags: int = SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> str:
+ """
+ The `why_entities` method determines why entities did not resolve or why they do relate.
+
+ Args:
+ 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:
+ str: A JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/why_entities.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/why_entities.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def why_record_in_entity(
+ self,
+ data_source_code: str,
+ record_id: str,
+ flags: int = SzEngineFlags.SZ_WHY_RECORDS_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> str:
+ """
+ The `why_record_in_entity` ... TODO:
+
+ Args:
+ 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:
+ str: A JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/why_record_in_entity.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/why_record_in_entity.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def why_records(
+ self,
+ data_source_code_1: str,
+ record_id_1: str,
+ data_source_code_2: str,
+ record_id_2: str,
+ flags: int = SzEngineFlags.SZ_WHY_RECORDS_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> str:
+ """
+ The `why_records` determines if any two records can or cannot resolve together, or if they relate.
+
+ Args:
+ 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:
+ str: A JSON document.
+
+ Raises:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szengine/why_records.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szengine/why_records.txt
+ :linenos:
+ :language: json
+ """
+
+
+ # -------------------------------------------------------------------------
+ # Convenience methods
+ # -------------------------------------------------------------------------
+
+ # TODO doc strings for all return_dict methods it _return_dict methods are staying?
+
+[docs]
+ def add_record_return_dict(
+ self,
+ data_source_code: str,
+ record_id: str,
+ record_definition: Union[str, Dict[Any, Any]],
+ flags: int = 0,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ """ """
+ return cast(
+ Dict[str, Any],
+ # TODO orjson?
+ json.loads(
+ self.add_record(
+ data_source_code, record_id, record_definition, flags, **kwargs
+ )
+ ),
+ )
+
+
+
+[docs]
+ def delete_record_return_dict(
+ self,
+ data_source_code: str,
+ record_id: str,
+ flags: int = 0,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ return cast(
+ Dict[str, Any],
+ json.loads(
+ self.delete_record(data_source_code, record_id, flags, **kwargs)
+ ),
+ )
+
+
+
+[docs]
+ def find_interesting_entities_by_entity_id_return_dict(
+ self, entity_id: int, flags: int = 0, **kwargs: Any
+ ) -> Dict[str, Any]:
+ """ """
+ return cast(
+ Dict[str, Any],
+ json.loads(
+ self.find_interesting_entities_by_entity_id(entity_id, flags, **kwargs)
+ ),
+ )
+
+
+
+[docs]
+ def find_interesting_entities_by_record_id_return_dict(
+ self, data_source_code: str, record_id: str, flags: int = 0, **kwargs: Any
+ ) -> Dict[str, Any]:
+ """T"""
+ return cast(
+ Dict[str, Any],
+ json.loads(
+ self.find_interesting_entities_by_record_id(
+ data_source_code, record_id, flags, **kwargs
+ )
+ ),
+ )
+
+
+
+[docs]
+ def find_network_by_entity_id_return_dict(
+ self,
+ entity_list: Union[str, Dict[Any, Any]],
+ max_degrees: int,
+ build_out_degree: int,
+ max_entities: int,
+ flags: int = SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ """TODO: document"""
+ return cast(
+ Dict[str, Any],
+ json.loads(
+ self.find_network_by_entity_id(
+ entity_list,
+ max_degrees,
+ build_out_degree,
+ max_entities,
+ flags,
+ **kwargs,
+ )
+ ),
+ )
+
+
+
+[docs]
+ def find_network_by_record_id_return_dict(
+ self,
+ record_list: Union[str, Dict[Any, Any]],
+ max_degrees: int,
+ build_out_degree: int,
+ max_entities: int,
+ flags: int = SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ """TODO: document"""
+ return cast(
+ Dict[str, Any],
+ json.loads(
+ self.find_network_by_record_id(
+ record_list,
+ max_degrees,
+ build_out_degree,
+ max_entities,
+ flags,
+ **kwargs,
+ )
+ ),
+ )
+
+
+
+[docs]
+ def find_path_by_entity_id_return_dict(
+ self,
+ start_entity_id: int,
+ end_entity_id: int,
+ max_degrees: int,
+ exclusions: Union[str, Dict[Any, Any]] = "",
+ required_data_sources: Union[str, Dict[Any, Any]] = "",
+ flags: int = SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ """TODO: document"""
+ return cast(
+ Dict[str, Any],
+ json.loads(
+ self.find_path_by_entity_id(
+ start_entity_id,
+ end_entity_id,
+ max_degrees,
+ exclusions,
+ required_data_sources,
+ flags,
+ **kwargs,
+ )
+ ),
+ )
+
+
+
+[docs]
+ def find_path_by_record_id_return_dict(
+ self,
+ start_data_source_code: str,
+ start_record_id: str,
+ end_data_source_code: str,
+ end_record_id: str,
+ max_degrees: int,
+ exclusions: Union[str, Dict[Any, Any]] = "",
+ required_data_sources: Union[str, Dict[Any, Any]] = "",
+ flags: int = SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ """ """
+ return cast(
+ Dict[str, Any],
+ json.loads(
+ self.find_path_by_record_id(
+ start_data_source_code,
+ start_record_id,
+ end_data_source_code,
+ end_record_id,
+ max_degrees,
+ exclusions,
+ required_data_sources,
+ flags,
+ **kwargs,
+ )
+ ),
+ )
+
+
+
+[docs]
+ def get_entity_by_entity_id_return_dict(
+ self,
+ entity_id: int,
+ flags: int = SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ """ """
+ return cast(
+ Dict[str, Any],
+ json.loads(self.get_entity_by_entity_id(entity_id, flags, **kwargs)),
+ )
+
+
+
+[docs]
+ def get_entity_by_record_id_return_dict(
+ self,
+ data_source_code: str,
+ record_id: str,
+ flags: int = SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ """ """
+ return cast(
+ Dict[str, Any],
+ json.loads(
+ self.get_entity_by_record_id(
+ data_source_code, record_id, flags, **kwargs
+ )
+ ),
+ )
+
+
+
+[docs]
+ def get_record_return_dict(
+ self,
+ data_source_code: str,
+ record_id: str,
+ flags: int = SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ """ """
+ return cast(
+ Dict[str, Any],
+ json.loads(self.get_record(data_source_code, record_id, flags, **kwargs)),
+ )
+
+
+
+[docs]
+ def get_stats_return_dict(self, **kwargs: Any) -> Dict[str, Any]:
+ return cast(
+ Dict[str, Any],
+ json.loads(self.get_stats(**kwargs)),
+ )
+
+
+
+[docs]
+ def get_virtual_entity_by_record_id_return_dict(
+ self,
+ record_list: Union[str, Dict[Any, Any]],
+ flags: int = SzEngineFlags.SZ_VIRTUAL_ENTITY_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ """ """
+ return cast(
+ Dict[str, Any],
+ json.loads(
+ self.get_virtual_entity_by_record_id(record_list, flags, **kwargs)
+ ),
+ )
+
+
+
+[docs]
+ def how_entity_by_entity_id_return_dict(
+ self,
+ entity_id: int,
+ flags: int = SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ """ """
+ return cast(
+ Dict[str, Any],
+ json.loads(self.how_entity_by_entity_id(entity_id, flags, **kwargs)),
+ )
+
+
+
+[docs]
+ def reevaluate_entity_return_dict(
+ self,
+ entity_id: int,
+ flags: int = 0,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ """ """
+ return cast(
+ Dict[str, Any],
+ json.loads(self.reevaluate_entity(entity_id, flags, **kwargs)),
+ )
+
+
+
+[docs]
+ def reevaluate_record_return_dict(
+ self,
+ data_source_code: str,
+ record_id: str,
+ flags: int = 0,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ """ """
+ return cast(
+ Dict[str, Any],
+ json.loads(
+ self.reevaluate_record(data_source_code, record_id, flags, **kwargs)
+ ),
+ )
+
+
+
+[docs]
+ def search_by_attributes_return_dict(
+ self,
+ attributes: Union[str, Dict[Any, Any]],
+ search_profile: str = "SEARCH",
+ flags: int = SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ """ """
+ return cast(
+ Dict[str, Any],
+ json.loads(
+ self.search_by_attributes(attributes, search_profile, flags, **kwargs)
+ ),
+ )
+
+
+
+[docs]
+ def why_entities_return_dict(
+ self,
+ entity_id_1: int,
+ entity_id_2: int,
+ flags: int = SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ return cast(
+ Dict[str, Any],
+ json.loads(self.why_entities(entity_id_1, entity_id_2, flags, **kwargs)),
+ )
+
+
+
+[docs]
+ def why_records_return_dict(
+ self,
+ data_source_code_1: str,
+ record_id_1: str,
+ data_source_code_2: str,
+ record_id_2: str,
+ flags: int = SzEngineFlags.SZ_WHY_RECORDS_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ return cast(
+ Dict[str, Any],
+ json.loads(
+ self.why_records(
+ data_source_code_1,
+ record_id_1,
+ data_source_code_2,
+ record_id_2,
+ flags,
+ **kwargs,
+ )
+ ),
+ )
+
+
+
+[docs]
+ def why_record_in_entity_return_dict(
+ self,
+ data_source_code: str,
+ record_id: str,
+ flags: int = SzEngineFlags.SZ_WHY_RECORDS_DEFAULT_FLAGS,
+ **kwargs: Any,
+ ) -> Dict[str, Any]:
+ """ """
+ # TODO Is the cast needed?
+ return cast(
+ Dict[str, Any],
+ json.loads(
+ self.why_record_in_entity(data_source_code, record_id, flags, **kwargs)
+ ),
+ )
+
+
+
+#! /usr/bin/env python3
+
+"""
+TODO: szengineflags.py
+"""
+
+from enum import IntFlag
+from typing import Any, List
+
+# Metadata
+
+__all__ = ["SzEngineFlags"]
+__version__ = "0.0.1" # See https://www.python.org/dev/peps/pep-0396/
+__date__ = "2023-10-30"
+__updated__ = "2023-10-30"
+
+# -----------------------------------------------------------------------------
+# SzEngineFlags class
+# -----------------------------------------------------------------------------
+
+
+
+[docs]
+class SzEngineFlags(IntFlag):
+ """Engine Flags ..."""
+
+
+[docs]
+ @classmethod
+ def combine_flags(
+ cls, list_of_strings: List[str], *args: Any, **kwargs: Any
+ ) -> int:
+ """OR together all strings in list_of_strings"""
+ # pylint: disable=unused-argument
+
+ result = 0
+ for string in list_of_strings:
+ result = result | SzEngineFlags[string]
+ return result
+
+
+ # Flags for exporting entity data.
+
+ SZ_EXPORT_INCLUDE_MULTI_RECORD_ENTITIES = 1 << 0
+ SZ_EXPORT_INCLUDE_POSSIBLY_SAME = 1 << 1
+ SZ_EXPORT_INCLUDE_POSSIBLY_RELATED = 1 << 2
+ SZ_EXPORT_INCLUDE_NAME_ONLY = 1 << 3
+ SZ_EXPORT_INCLUDE_DISCLOSED = 1 << 4
+ SZ_EXPORT_INCLUDE_SINGLE_RECORD_ENTITIES = 1 << 5
+ SZ_EXPORT_INCLUDE_ALL_ENTITIES = (
+ SZ_EXPORT_INCLUDE_MULTI_RECORD_ENTITIES
+ | SZ_EXPORT_INCLUDE_SINGLE_RECORD_ENTITIES
+ )
+ SZ_EXPORT_INCLUDE_ALL_HAVING_RELATIONSHIPS = (
+ SZ_EXPORT_INCLUDE_POSSIBLY_SAME
+ | SZ_EXPORT_INCLUDE_POSSIBLY_RELATED
+ | SZ_EXPORT_INCLUDE_NAME_ONLY
+ | SZ_EXPORT_INCLUDE_DISCLOSED
+ )
+
+ # Flags for outputting entity relation data.
+
+ SZ_ENTITY_INCLUDE_POSSIBLY_SAME_RELATIONS = 1 << 6
+ SZ_ENTITY_INCLUDE_POSSIBLY_RELATED_RELATIONS = 1 << 7
+ SZ_ENTITY_INCLUDE_NAME_ONLY_RELATIONS = 1 << 8
+ SZ_ENTITY_INCLUDE_DISCLOSED_RELATIONS = 1 << 9
+ SZ_ENTITY_INCLUDE_ALL_RELATIONS = (
+ SZ_ENTITY_INCLUDE_POSSIBLY_SAME_RELATIONS
+ | SZ_ENTITY_INCLUDE_POSSIBLY_RELATED_RELATIONS
+ | SZ_ENTITY_INCLUDE_NAME_ONLY_RELATIONS
+ | SZ_ENTITY_INCLUDE_DISCLOSED_RELATIONS
+ )
+
+ # Flags for outputting entity feature data.
+
+ SZ_ENTITY_INCLUDE_ALL_FEATURES = 1 << 10
+ SZ_ENTITY_INCLUDE_REPRESENTATIVE_FEATURES = 1 << 11
+
+ # Flags for getting extra information about an entity.
+
+ SZ_ENTITY_INCLUDE_ENTITY_NAME = 1 << 12
+ SZ_ENTITY_INCLUDE_RECORD_SUMMARY = 1 << 13
+ SZ_ENTITY_INCLUDE_RECORD_TYPES = 1 << 28
+ SZ_ENTITY_INCLUDE_RECORD_DATA = 1 << 14
+ SZ_ENTITY_INCLUDE_RECORD_MATCHING_INFO = 1 << 15
+ SZ_ENTITY_INCLUDE_RECORD_JSON_DATA = 1 << 16
+ SZ_ENTITY_INCLUDE_RECORD_UNMAPPED_DATA = 1 << 31
+ SZ_ENTITY_INCLUDE_RECORD_FEATURE_IDS = 1 << 18
+ SZ_ENTITY_INCLUDE_RELATED_ENTITY_NAME = 1 << 19
+ SZ_ENTITY_INCLUDE_RELATED_MATCHING_INFO = 1 << 20
+ SZ_ENTITY_INCLUDE_RELATED_RECORD_SUMMARY = 1 << 21
+ SZ_ENTITY_INCLUDE_RELATED_RECORD_DATA = 1 << 22
+
+ # Flags for extra feature data.
+
+ SZ_ENTITY_OPTION_INCLUDE_INTERNAL_FEATURES = 1 << 23
+ SZ_ENTITY_OPTION_INCLUDE_FEATURE_STATS = 1 << 24
+ SZ_ENTITY_OPTION_INCLUDE_FEATURE_ELEMENTS = 1 << 32
+
+ # Flags for extra matching data.
+
+ SZ_ENTITY_OPTION_INCLUDE_MATCH_KEY_DETAILS = 1 << 34
+
+ # Flags for finding entity path & network data.
+
+ SZ_FIND_PATH_PREFER_EXCLUDE = 1 << 25
+ SZ_FIND_PATH_MATCHING_INFO = 1 << 30
+ SZ_FIND_NETWORK_MATCHING_INFO = 1 << 33
+
+ # Flags for including search result information.
+
+ SZ_INCLUDE_FEATURE_SCORES = 1 << 26
+ SZ_SEARCH_INCLUDE_STATS = 1 << 27
+ SZ_SEARCH_INCLUDE_FEATURE_SCORES = SZ_INCLUDE_FEATURE_SCORES
+ SZ_SEARCH_INCLUDE_MATCH_KEY_DETAILS = SZ_ENTITY_OPTION_INCLUDE_MATCH_KEY_DETAILS
+
+ # Flag for returning with info responses.
+ SZ_WITH_INFO = 1 << 62
+
+ # Flags for exporting entity data.
+
+ SZ_SEARCH_INCLUDE_RESOLVED = SZ_EXPORT_INCLUDE_MULTI_RECORD_ENTITIES
+ SZ_SEARCH_INCLUDE_POSSIBLY_SAME = SZ_EXPORT_INCLUDE_POSSIBLY_SAME
+ SZ_SEARCH_INCLUDE_POSSIBLY_RELATED = SZ_EXPORT_INCLUDE_POSSIBLY_RELATED
+ SZ_SEARCH_INCLUDE_NAME_ONLY = SZ_EXPORT_INCLUDE_NAME_ONLY
+ SZ_SEARCH_INCLUDE_ALL_ENTITIES = (
+ SZ_SEARCH_INCLUDE_RESOLVED
+ | SZ_SEARCH_INCLUDE_POSSIBLY_SAME
+ | SZ_SEARCH_INCLUDE_POSSIBLY_RELATED
+ | SZ_SEARCH_INCLUDE_NAME_ONLY
+ )
+
+ # Recommended settings.
+
+ SZ_RECORD_DEFAULT_FLAGS = SZ_ENTITY_INCLUDE_RECORD_JSON_DATA
+
+ SZ_ENTITY_DEFAULT_FLAGS = (
+ SZ_ENTITY_INCLUDE_ALL_RELATIONS
+ | SZ_ENTITY_INCLUDE_REPRESENTATIVE_FEATURES
+ | SZ_ENTITY_INCLUDE_ENTITY_NAME
+ | SZ_ENTITY_INCLUDE_RECORD_SUMMARY
+ | SZ_ENTITY_INCLUDE_RECORD_DATA
+ | SZ_ENTITY_INCLUDE_RECORD_MATCHING_INFO
+ | SZ_ENTITY_INCLUDE_RELATED_ENTITY_NAME
+ | SZ_ENTITY_INCLUDE_RELATED_RECORD_SUMMARY
+ | SZ_ENTITY_INCLUDE_RELATED_MATCHING_INFO
+ )
+
+ SZ_ENTITY_BRIEF_DEFAULT_FLAGS = (
+ SZ_ENTITY_INCLUDE_RECORD_MATCHING_INFO
+ | SZ_ENTITY_INCLUDE_ALL_RELATIONS
+ | SZ_ENTITY_INCLUDE_RELATED_MATCHING_INFO
+ )
+
+ SZ_EXPORT_DEFAULT_FLAGS = (
+ SZ_EXPORT_INCLUDE_ALL_ENTITIES
+ # NOTE Check, was removed in 4.0.0.24095 - 2024_04_04__00_00
+ # NOTE There are changes in V4 to output messages and Jae is likely still working on them
+ # | SZ_EXPORT_INCLUDE_ALL_HAVING_RELATIONSHIPS
+ | SZ_ENTITY_DEFAULT_FLAGS
+ )
+
+ SZ_FIND_PATH_DEFAULT_FLAGS = (
+ SZ_FIND_PATH_MATCHING_INFO
+ | SZ_ENTITY_INCLUDE_ENTITY_NAME
+ | SZ_ENTITY_INCLUDE_RECORD_SUMMARY
+ )
+
+ SZ_FIND_NETWORK_DEFAULT_FLAGS = (
+ SZ_FIND_NETWORK_MATCHING_INFO
+ | SZ_ENTITY_INCLUDE_ENTITY_NAME
+ | SZ_ENTITY_INCLUDE_RECORD_SUMMARY
+ )
+
+ SZ_WHY_ENTITIES_DEFAULT_FLAGS = (
+ SZ_ENTITY_DEFAULT_FLAGS
+ | SZ_ENTITY_OPTION_INCLUDE_INTERNAL_FEATURES
+ | SZ_ENTITY_OPTION_INCLUDE_FEATURE_STATS
+ | SZ_INCLUDE_FEATURE_SCORES
+ )
+
+ SZ_WHY_RECORDS_DEFAULT_FLAGS = (
+ SZ_ENTITY_DEFAULT_FLAGS
+ | SZ_ENTITY_OPTION_INCLUDE_INTERNAL_FEATURES
+ | SZ_ENTITY_OPTION_INCLUDE_FEATURE_STATS
+ | SZ_INCLUDE_FEATURE_SCORES
+ )
+
+ SZ_WHY_RECORD_IN_ENTITY_DEFAULT_FLAGS = (
+ SZ_ENTITY_DEFAULT_FLAGS
+ | SZ_ENTITY_OPTION_INCLUDE_INTERNAL_FEATURES
+ | SZ_ENTITY_OPTION_INCLUDE_FEATURE_STATS
+ | SZ_INCLUDE_FEATURE_SCORES
+ )
+
+ SZ_HOW_ENTITY_DEFAULT_FLAGS = SZ_INCLUDE_FEATURE_SCORES
+
+ SZ_VIRTUAL_ENTITY_DEFAULT_FLAGS = SZ_ENTITY_DEFAULT_FLAGS
+
+ SZ_SEARCH_BY_ATTRIBUTES_ALL = (
+ SZ_SEARCH_INCLUDE_ALL_ENTITIES
+ | SZ_ENTITY_INCLUDE_REPRESENTATIVE_FEATURES
+ | SZ_ENTITY_INCLUDE_ENTITY_NAME
+ | SZ_ENTITY_INCLUDE_RECORD_SUMMARY
+ | SZ_SEARCH_INCLUDE_FEATURE_SCORES
+ )
+
+ SZ_SEARCH_BY_ATTRIBUTES_STRONG = (
+ SZ_SEARCH_INCLUDE_RESOLVED
+ | SZ_SEARCH_INCLUDE_POSSIBLY_SAME
+ | SZ_ENTITY_INCLUDE_REPRESENTATIVE_FEATURES
+ | SZ_ENTITY_INCLUDE_ENTITY_NAME
+ | SZ_ENTITY_INCLUDE_RECORD_SUMMARY
+ | SZ_SEARCH_INCLUDE_FEATURE_SCORES
+ )
+
+ SZ_SEARCH_BY_ATTRIBUTES_MINIMAL_ALL = SZ_SEARCH_INCLUDE_ALL_ENTITIES
+
+ SZ_SEARCH_BY_ATTRIBUTES_MINIMAL_STRONG = (
+ SZ_SEARCH_INCLUDE_RESOLVED | SZ_SEARCH_INCLUDE_POSSIBLY_SAME
+ )
+
+ SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS = SZ_SEARCH_BY_ATTRIBUTES_ALL
+
+ # -----------------------------------------------------------------------------
+ # non-SzEngineFlags flags
+ # -----------------------------------------------------------------------------
+
+ SZ_INITIALIZE_WITH_DEFAULT_CONFIGURATION = 0
+ SZ_NO_FLAGS = 0
+ SZ_NO_LOGGING = 0
+ SZ_VERBOSE_LOGGING = 1
+ SZ_WITHOUT_INFO = 0
+
+
+
+# -----------------------------------------------------------------------------
+# Additional default values
+# TODO: Not sure if these values belong in this file.
+# -----------------------------------------------------------------------------
+
+SZ_NO_ATTRIBUTES = ""
+SZ_NO_EXCLUSIONS = ""
+SZ_NO_REQUIRED_DATASOURCES = ""
+SZ_NO_SEARCH_PROFILE = ""
+
+#! /usr/bin/env python3
+"""
+DO NOT EDIT. This code is generated.
+Generated by: sz-sdk-errors/bin/generate_python.py
+Generated for: sz-sdk-python/src/senzing/szerrors.py
+Generated date: 2024-04-18T17:49:31.703116+00:00
+"""
+
+import datetime
+import json
+import threading
+import traceback
+from ctypes import c_char, create_string_buffer, sizeof
+from typing import Any, Callable, Dict
+
+# Metadata
+
+__all__ = [
+ "SzBadInputError",
+ "SzConfigurationError",
+ "SzDatabaseConnectionLostError",
+ "SzDatabaseError",
+ "SzError",
+ "SzLicenseError",
+ "SzNotFoundError",
+ "SzNotInitializedError",
+ "SzRetryableError",
+ "SzRetryTimeoutExceededError",
+ "SzUnhandledError",
+ "SzUnknownDataSourceError",
+ "SzUnrecoverableError",
+ "new_szexception",
+]
+__version__ = "0.0.1" # See https://www.python.org/dev/peps/pep-0396/
+__date__ = "2023-10-30"
+__updated__ = "2023-10-30"
+
+
+# -----------------------------------------------------------------------------
+# Base SzError
+# -----------------------------------------------------------------------------
+
+
+
+
+
+
+# -----------------------------------------------------------------------------
+# Category exceptions
+# - These exceptions represent categories of actions that can be taken by
+# the calling program.
+# -----------------------------------------------------------------------------
+
+
+
+
+
+
+
+[docs]
+class SzConfigurationError(SzError):
+ """The program can provide a remedy and continue."""
+
+
+
+
+
+
+
+
+
+
+
+# -----------------------------------------------------------------------------
+# Detail exceptions for SzBadInputException
+# - Processing did not complete.
+# - These exceptions are "per record" exceptions.
+# - The record should be recorded as "bad". (logged, queued as failure)
+# - Processing may continue.
+# -----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+# -----------------------------------------------------------------------------
+# Detail exceptions for SzRetryableException
+# - Processing did not complete.
+# - These exceptions may be remedied programmatically.
+# - The call to the Senzing method should be retried.
+# - Processing may continue.
+# -----------------------------------------------------------------------------
+
+
+
+
+
+
+
+[docs]
+class SzRetryTimeoutExceededError(SzRetryableError):
+ """Retry timeout exceeded time limit"""
+
+
+
+# -----------------------------------------------------------------------------
+# Detail exceptions for SzUnrecoverableException
+# - Processing did not complete.
+# - These exceptions cannot be remedied programmatically.
+# - Processing cannot continue.
+# -----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# -----------------------------------------------------------------------------
+# Determine Exception based on Senzing reason code.
+# Reference: https://senzing.zendesk.com/hc/en-us/articles/360026678133-Engine-Error-codes
+# -----------------------------------------------------------------------------
+
+# fmt: off
+EXCEPTION_MAP = {
+ 2: SzBadInputError, # EAS_ERR_INVALID_XML "Invalid XML"
+ 5: SzError, # EAS_ERR_EXCEEDED_MAX_RETRIES "Exceeded the Maximum Number of Retries Allowed"
+ 7: SzBadInputError, # EAS_ERR_EMPTY_XML_MESSAGE "Empty XML Message"
+ 10: SzRetryTimeoutExceededError, # EAS_ERR_RETRY_TIMEOUT "Retry timeout exceeded RES_ENT_ID locklist [{0}]"
+ 14: SzConfigurationError, # EAS_ERR_INVALID_DATASTORE_CONFIGURATION_TYPE "Invalid Datastore Configuration Type"
+ 19: SzConfigurationError, # EAS_ERR_NO_CONFIGURATION_FOUND "Configuration not found"
+ 20: SzConfigurationError, # EAS_ERR_CONFIG_CANNOT_BE_NULL_DATABASE "Configuration cannot be loaded from database connection"
+ 21: SzConfigurationError, # EAS_ERR_CONFIG_CANNOT_BE_NULL_CONFIG_FILE "Configuration cannot be loaded from config file"
+ 22: SzBadInputError, # EAS_ERR_INVALID_DOCTYPE "Invalid DocType {0}"
+ 23: SzBadInputError, # EAS_ERR_CONFLICTING_DATA_SOURCE_VALUES "Conflicting DATA_SOURCE values '{0}' and '{1}'"
+ 24: SzBadInputError, # EAS_ERR_CONFLICTING_RECORD_ID_VALUES "Conflicting RECORD_ID values '{0}' and '{1}'"
+ 26: SzBadInputError, # EAS_ERR_RESERVED_WORD_USED_IN_DOCUMENT "Inbound data contains a reserved keyword '{0}'"
+ 27: SzUnknownDataSourceError, # EAS_ERR_UNKNOWN_DSRC_CODE_VALUE "Unknown DATA_SOURCE value '{0}'"
+ 28: SzConfigurationError, # EAS_ERR_INVALID_JSON_CONFIG_DOCUMENT "Invalid JSON config document"
+ 29: SzError, # EAS_ERR_INVALID_HANDLE "Invalid Handle"
+ 30: SzConfigurationError, # EAS_ERR_INVALID_MATCH_LEVEL "Invalid match level '{0}'"
+ 33: SzNotFoundError, # EAS_ERR_UNKNOWN_DSRC_RECORD_ID "Unknown record: dsrc[{0}], record[{1}]"
+ 34: SzConfigurationError, # EAS_ERR_AMBIGUOUS_ENTITY_FTYPE_MISSING "AMBIGUOUS_ENTITY Feature Type is not configured"
+ 35: SzConfigurationError, # EAS_ERR_AMBIGUOUS_TIER_FELEM_MISSING "AMBIGUOUS_TIER Feature Element is not configured"
+ 36: SzConfigurationError, # EAS_ERR_AMBIGUOUS_FTYPE_ID_FELEM_MISSING "AMBIGUOUS_FTYPE_ID Feature Element is not configured"
+ 37: SzNotFoundError, # EAS_ERR_UNKNOWN_RESOLVED_ENTITY_VALUE "Unknown resolved entity value '{0}'"
+ 38: SzError, # EAS_ERR_RECORD_HAS_NO_RESOLVED_ENTITY "Data source record has no resolved entity: dsrc[{0}], recordID[{1}]"
+ 39: SzError, # EAS_ERR_NO_OBSERVED_ENTITY_FOR_DSRC_ENTITY_KEY "No observed entity for entity key: dsrc[{0}], record_id[{1}], key[{2}]"
+ 40: SzConfigurationError, # EAS_ERR_CONFIG_COMPATIBILITY_MISMATCH "The engine configuration compatibility version [{0}] does not match the version of the provided config[{1}]."
+ 41: SzError, # EAS_ERR_DOCUMENT_PREPROCESSING_FAILED "Document preprocessing failed"
+ 42: SzError, # EAS_ERR_DOCUMENT_LOAD_PROCESSING_FAILED "Document load processing failed"
+ 43: SzError, # EAS_ERR_DOCUMENT_ER_PROCESSING_FAILED "Document ER processing failed"
+ 44: SzError, # EAS_ERR_CHECK_ENTITY_PROCESSING_FAILED "Check entity processing failed"
+ 45: SzError, # EAS_ERR_INPUT_PROCEDURE_PROCESSING_FAILED "Input procedure processing failed"
+ 46: SzError, # EAS_ERR_DOCUMENT_HASHING_PROCESSING_FAILED "Document hashing-processing failed"
+ 47: SzError, # EAS_ERR_SESSION_IS_INVALID "Session is invalid"
+ 48: SzNotInitializedError, # EAS_ERR_G2_NOT_INITIALIZED "G2 is not initialized"
+ 49: SzNotInitializedError, # EAS_ERR_G2AUDIT_NOT_INITIALIZED "G2Audit is not initialized"
+ 50: SzNotInitializedError, # EAS_ERR_G2HASHER_NOT_INITIALIZED "G2Hasher is not initialized"
+ 51: SzBadInputError, # EAS_ERR_BOTH_RECORD_ID_AND_ENT_SRC_KEY_SPECIFIED "Cannot use both Record ID and Entity Source Key in record"
+ 52: SzError, # EAS_ERR_UNKNOWN_RELATIONSHIP_ID_VALUE "Unknown relationship ID value '{0}'"
+ 53: SzBadInputError, # EAS_ERR_G2DIAGNOSTIC_NOT_INITIALIZED "G2Diagnostic is not initialized"
+ 54: SzDatabaseError, # EAS_ERR_G2_DATA_REPOSITORY_WAS_PURGED "Data repository was purged"
+ 55: SzError, # EAS_ERR_NO_RESOLVED_ENTITY_FOR_DSRC_ENTITY_KEY "No resolved entity for entity key: dsrc[{0}], record_id[{1}], key[{2}]"
+ 56: SzError, # EAS_ERR_NO_RECORDS_EXIST_FOR_RESOLVED_ENTITY "No data source records exist for entity ID: entityID[{0}]"
+ 57: SzError, # EAS_ERR_UNKNOWN_FEATURE_ID_VALUE "Unknown feature ID value '{0}'"
+ 58: SzError, # EAS_ERR_G2_INITIALIZATION_FAILURE "G2 initialization process has failed"
+ 60: SzConfigurationError, # EAS_ERR_CONFIG_DATABASE_MISMATCH "The engine configuration does not match the records loaded into the repository: errors[{0}]."
+ 61: SzConfigurationError, # EAS_ERR_AMBIGUOUS_SUPPRESSED_LIBFEAT_FELEM_MISSING "AMBIGUOUS_SUPRESSED_LIBFEAT Feature Element is not configured"
+ 62: SzConfigurationError, # EAS_ERR_AMBIGUOUS_TYPE_FELEM_MISSING "AMBIGUOUS_TYPE Feature Element is not configured"
+ 63: SzNotInitializedError, # EAS_ERR_G2CONFIGMGR_NOT_INITIALIZED "G2ConfigMgr is not initialized"
+ 64: SzConfigurationError, # EAS_ERR_CONFUSED_ENTITY_FTYPE_MISSING "CONFUSED_ENTITY Feature Type is not configured"
+ 66: SzBadInputError, # EAS_ERR_UNKNOWN_GENERIC_PLAN_VALUE "Unknown generic plan value '{0}'"
+ 67: SzConfigurationError, # EAS_ERR_INVALID_GENERIC_PLAN_VALUE "Invalid Generic Plan ID [{0}] configured for the '{1}' retention level.'"
+ 68: SzError, # EAS_ERR_UNKNOWN_ER_RESULT "Unknown ER-result."
+ 69: SzError, # EAS_ERR_NO_CANDIDATES "No candidates."
+ 76: SzError, # EAS_ERR_INBOUND_FEATURE_VERSION_NEWER_THAN_CONFIG "Inbound Feature Version [{0}] is newer than configured version [{1}] for feature type[{2}]."
+ 77: SzError, # EAS_ERR_ERROR_WHEN_PRIMING_GNR "Error when priming GNR resources '{0}'"
+ 78: SzError, # EAS_ERR_ERROR_WHEN_ENCRYPTING "Error when encrypting '{0}'"
+ 79: SzError, # EAS_ERR_ERROR_WHEN_DECRYPTING "Error when decrypting '{0}'"
+ 80: SzError, # EAS_ERR_ERROR_WHEN_VALIDATING_ENCRYPTION_SIGNATURE_COMPATIBILITY "Error when validating encryption signature compatibility '{0}'"
+ 81: SzError, # EAS_ERR_ERROR_WHEN_CHECKING_DISTINCT_FEATURE_GENERALIZATION "Error when checking distinct feature generalization '{0}'"
+ 82: SzError, # EAS_ERR_ERROR_WHEN_RUNNING_DQM "Error when running DQM '{0}'"
+ 83: SzError, # EAS_ERR_ERROR_WHEN_CREATING_EFEATS "Error when creating EFEATS '{0}'"
+ 84: SzError, # EAS_ERR_ERROR_WHEN_SIMPLE_SCORING "Error when simple scoring '{0}'"
+ 85: SzError, # EAS_ERR_ERROR_WHEN_SCORING_PAIR "Error when scoring a pair '{0}'"
+ 86: SzError, # EAS_ERR_ERROR_WHEN_SCORING_SET "Error when scoring a set '{0}'"
+ 87: SzUnhandledError, # EAS_ERR_SRD_EXCEPTION "SRD Exception '{0}'"
+ 88: SzBadInputError, # EAS_ERR_UNKNOWN_SEARCH_PROFILE_VALUE "Unknown search profile value '{0}'"
+ 89: SzConfigurationError, # EAS_ERR_MISCONFIGURED_SEARCH_PROFILE_VALUE "Misconfigured search profile value '{0}'"
+ 90: SzConfigurationError, # EAS_ERR_CANNOT_ADD_LIBRARY_FEATURES_TO_DATASTORE "Cannot add library features to datastore: '{0}'"
+ 91: SzError, # EAS_ERR_TRUSTED_ID_FTYPE_MISSING "TRUSTED_ID Feature Type is not configured"
+ 92: SzError, # EAS_ERR_RECORD_TYPE_FTYPE_MISSING "RECORD_TYPE Feature Type is not configured"
+ 999: SzLicenseError, # EAS_ERR_LICENSE_HAS_EXPIRED "License has expired"
+ 1000: SzDatabaseError, # EAS_ERR_UNHANDLED_DATABASE_ERROR "Unhandled Database Error '{0}'"
+ 1001: SzDatabaseError, # EAS_ERR_CRITICAL_DATABASE_ERROR "Critical Database Error '{0}'"
+ 1002: SzDatabaseError, # EAS_ERR_DATABASE_MEMORY_ERROR "Database Memory Error '{0}'"
+ 1003: SzDatabaseError, # EAS_ERR_TABLE_SPACE_OR_LOG_VIOLATION "Table Space or Log Violation '{0}'"
+ 1004: SzDatabaseError, # EAS_ERR_RESOURCE_CONTENTION "Resource Contention '{0}'"
+ 1005: SzDatabaseError, # EAS_ERR_USER_DEFINED_PROC_ERROR "User Defined Procedure or Function Error '{0}'"
+ 1006: SzDatabaseConnectionLostError, # EAS_ERR_DATABASE_CONNECTION_FAILURE "Database Connection Failure '{0}'"
+ 1007: SzDatabaseConnectionLostError, # EAS_ERR_DATABASE_CONNECTION_LOST "Database Connection Lost '{0}'"
+ 1008: SzDatabaseError, # EAS_ERR_DEADLOCK_ERROR "Deadlock Error '{0}'"
+ 1009: SzDatabaseError, # EAS_ERR_INSUFFICIENT_PERMISSIONS "Insufficient Permissions '{0}'"
+ 1010: SzDatabaseError, # EAS_ERR_TRANSACTION_ERROR "Transaction Error '{0}'"
+ 1011: SzDatabaseError, # EAS_ERR_UNIQUE_CONSTRAINT_VIOLATION "Unique Constraint Violation '{0}'"
+ 1012: SzDatabaseError, # EAS_ERR_CONSTRAINT_VIOLATION "Constraint Violation '{0}'"
+ 1013: SzDatabaseError, # EAS_ERR_SYNTAX_ERROR "Syntax Error '{0}'"
+ 1014: SzDatabaseError, # EAS_ERR_CURSOR_ERROR "Cursor Error '{0}'"
+ 1015: SzDatabaseError, # EAS_ERR_DATATYPE_ERROR "Data Type Error '{0}'"
+ 1016: SzDatabaseError, # EAS_ERR_TRANSACTION_ABORTED_ERROR "Transaction Aborted '{0}'"
+ 1017: SzDatabaseError, # EAS_ERR_DATABASE_OPERATOR_NOT_SET "Database operator not set '{0}'"
+ 1018: SzDatabaseError, # EAS_ERR_DATABASE_EXCEPTION_GENERATOR_NOT_SET "Database exception generator not set '{0}'"
+ 1019: SzConfigurationError, # EAS_ERR_DATABASE_SCHEMA_TABLES_NOT_FOUND "Datastore schema tables not found. [{0}]"
+ 2001: SzConfigurationError, # EAS_ERR_FEATURE_HAS_NO_FTYPE_CODE "Cannot process feature with no FTYPE_CODE[{0}]"
+ 2002: SzError, # EAS_ERR_REQUESTED_CONFIG_FOR_INVALID_FTYPE_CODE "Requested config for invalid FTYPE_CODE[{0}]"
+ 2003: SzError, # EAS_ERR_NO_FELEM_CODE "Cannot process OBS_FELEM with no FELEM_CODE[{0}]"
+ 2005: SzError, # EAS_ERR_INVALID_FELEM_CODE "FELEM_CODE[{0}] is not configured for FTYPE_CODE[{1}]"
+ 2006: SzError, # EAS_ERR_MISSING_ENT_SRC_KEY "OBS_ENT is missing ENT_SRC_KEY"
+ 2012: SzConfigurationError, # EAS_ERR_ERRULE_CONFIGURED_FOR_RESOLVE_AND_RELATE "ER Rule [{0}] is configured for both resolve and relate."
+ 2015: SzConfigurationError, # EAS_ERR_INVALID_FTYPE_CODE "Invalid FTYPE_CODE[{0}]"
+ 2027: SzError, # EAS_ERR_PLUGIN_INIT "Plugin initialization error {0}"
+ 2029: SzConfigurationError, # EAS_ERR_REQUESTED_CONFIG_FOR_INVALID_PLUGIN "Configuration not found for plugin type: {0}"
+ 2034: SzConfigurationError, # EAS_ERR_INVALID_CFRTN_VAL "CFRTN_ID[{0}]/FTYPE[{1}] is expecting CFRTN_VAL[{2}] which is not offered by CFUNC_ID[{3}][{4}]. Available scores are [{5}]"
+ 2036: SzConfigurationError, # EAS_ERR_FTYPE_HAS_NO_BOM "FType configured with no Feature Elements (Bill of Materials) FTYPE_ID[{0}] FTYPE_CODE[{1}]"
+ 2037: SzConfigurationError, # EAS_ERR_FUNC_CALL_HAS_NO_BOM "Function call ({3}) configured with no Bill of Materials {4}[{0}] FTYPE_ID[{1}] FTYPE_CODE[{2}]"
+ 2038: SzConfigurationError, # EAS_ERR_DISTINCT_FEATURE_HAS_NO_BOM "Distinct feature call configured with no Bill of Materials DFCALL_ID[{0}]"
+ 2041: SzConfigurationError, # EAS_ERR_EFCALL_HAS_NO_BOM "EFeature creation call configured with no Bill of Materials EFCALL_ID[{0}]"
+ 2045: SzConfigurationError, # EAS_ERR_CFRTN_REFERS_BAD_CFUNC_ID "CFG_CFRTN references CFUNC_ID[{0}] which is not configured"
+ 2047: SzConfigurationError, # EAS_ERR_MISSING_DSRC_CODE "Observation is missing DSRC_CODE tag which is required"
+ 2048: SzConfigurationError, # EAS_ERR_FEAT_FREQ_INVALID "FEATURE CODE[{0}] FEATURE FREQUENCY[{1}] is an invalid frequency"
+ 2049: SzConfigurationError, # EAS_ERR_FUNC_INVALID "{2} [{0}] is invalid for {3}[{1}]"
+ 2050: SzConfigurationError, # EAS_ERR_QUAL_FRAG_NOT_FOUND "Rule[{0}] Qualifier Fragment[{1}]: Fragment not found"
+ 2051: SzConfigurationError, # EAS_ERR_DISQUAL_FRAG_NOT_FOUND "Rule[{0}] Disqualifier Fragment[{1}]: Fragment not found"
+ 2057: SzBadInputError, # EAS_ERR_BAD_DSRC_ACTION "Observation has DSRC_ACTION[{0}] which is invalid. Valid values are [A]dd, [C]hange, [D]elete or E[X]tensive Evaluation"
+ 2061: SzConfigurationError, # EAS_ERR_DUPLICATE_LOOKUP_IDENTIFIER "Duplicate [{0}] with identifier value [{1}]. Only unique values are allowed."
+ 2062: SzConfigurationError, # EAS_ERR_INVALID_LOOKUP_IDENTIFIER "Requested lookup of [{0}] using unknown value [{1}]. Value not found."
+ 2065: SzConfigurationError, # EAS_ERR_FTYPE_HAS_MULTIPLE_DEFINITIONS "FType configured with multiple definitions. FTYPE_CODE[{0}] used in FTYPE_ID[{1}] and FTYPE_ID[{2}]"
+ 2066: SzConfigurationError, # EAS_ERR_FELEM_HAS_MULTIPLE_DEFINITIONS "FElem configured with multiple definitions. FELEM_CODE[{0}] used in FELEM_ID[{1}] and FELEM_ID[{2}]"
+ 2067: SzConfigurationError, # EAS_ERR_ERFRAG_HAS_MULTIPLE_DEFINITIONS "ER Fragment code configured with multiple definitions. ERFRAG_CODE[{0}] used in ERFRAG_ID[{1}] and ERFRAG_ID[{2}]"
+ 2069: SzConfigurationError, # EAS_ERR_BOM_CONFIG_INVALID_FOR_SIMPLE_PLUGIN "Configured plugin for CFCALL_ID[{0}] requires exactly one value in BOM"
+ 2070: SzConfigurationError, # EAS_ERR_EFCALL_HAS_INVALID_FUNCTION "EFeature creation call configured with invalid function ID EFCALL_ID[{0}] EFUNC_ID[{1}]"
+ 2071: SzConfigurationError, # EAS_ERR_EFBOM_HAS_INVALID_EFCALL "EFeature BOM configured with invalid EFCALL_ID[{0}]"
+ 2073: SzError, # EAS_ERR_LOADING_LIBRARY "Library loading error {0}"
+ 2074: SzError, # EAS_ERR_SCORING_MANAGER_PLUGIN "Scoring manager: id {0} and {1} do not match"
+ 2075: SzConfigurationError, # EAS_ERR_TABLE_CONFIGURED_WITH_INVALID_FTYPE_CODE "Table {0} configured with an invalid type FTYPE_CODE[{1}]"
+ 2076: SzConfigurationError, # EAS_ERR_TABLE_CONFIGURED_WITH_INVALID_FELEM_CODE "Table {0} configured with an invalid type FELEM_CODE[{1}]"
+ 2079: SzConfigurationError, # EAS_ERR_EFBOM_CONFIGURED_WITH_INVALID_FTYPE_ID "CFG_EFBOM configured with an invalid type FTYPE_ID[{0}]"
+ 2080: SzConfigurationError, # EAS_ERR_EFBOM_CONFIGURED_WITH_INVALID_FELEM_ID "CFG_EFBOM configured with an invalid type FELEM_ID[{0}]"
+ 2081: SzConfigurationError, # EAS_ERR_FUNC_CALL_CONFIGURED_WITH_INVALID_FTYPE_ID "{1} configured with an invalid type FTYPE_ID[{0}]"
+ 2082: SzConfigurationError, # EAS_ERR_FUNC_CALL_CONFIGURED_WITH_INVALID_FUNC_ID "{1} configured with an invalid type {2}[{0}]"
+ 2083: SzConfigurationError, # EAS_ERR_FUNC_BOM_CONFIGURED_WITH_INVALID_FTYPE_ID "{1} configured with an invalid type FTYPE_ID[{0}]"
+ 2084: SzConfigurationError, # EAS_ERR_FUNC_BOM_CONFIGURED_WITH_INVALID_FELEM_ID "{1} configured with an invalid type FELEM_ID[{0}]"
+ 2088: SzConfigurationError, # EAS_ERR_TABLE_CONFIGURED_WITH_INVALID_RCLASS_ID "Table {0} configured with an invalid RCLASS_ID[{1}]"
+ 2089: SzConfigurationError, # EAS_ERR_UNKNOWN_FCLASS_ID "UNKNOWN FCLASS ID[{0}]"
+ 2090: SzConfigurationError, # EAS_ERR_SFCALL_HAS_INVALID_FUNCTION "Feature standardization call configured with invalid function ID SFCALL_ID[{0}] SFUNC_ID[{1}]"
+ 2091: SzConfigurationError, # EAS_ERR_TABLE_CONFIGURED_WITH_BOTH_FTYPE_ID_AND_FELEM_ID "{0} configured with both an FTYPE_ID[{1}] and FELEM_ID[{2}]"
+ 2092: SzConfigurationError, # EAS_ERR_TABLE_CONFIGURED_WITH_NEITHER_FTYPE_ID_NOR_FELEM_ID "{0} configured with neither an FTYPE_ID nor an FELEM_ID"
+ 2093: SzConfigurationError, # EAS_ERR_TABLE_CONFIGURED_WITH_DUPLICATE_EXEC_ORDER_FOR_IDENTIFIER_LIST "Table [{0}] configured with duplicate execution order value [{3}] for identifiers[{1}] with values [{2}]"
+ 2094: SzConfigurationError, # EAS_ERR_DUPLICATE_VALUE_FOR_FIELD_IN_TABLE "Duplicate value [{2}] of field [{1}] in config [{0}]"
+ 2095: SzConfigurationError, # EAS_ERR_TABLE_CONFIGURED_WITH_INVALID_FTYPE_CODE_FELEM_CODE_PAIR "Table {0} configured with an invalid FTYPE_CODE[{1}]/FELEM_CODE[{2}] pair"
+ 2099: SzConfigurationError, # EAS_ERR_COUNTER_CONFIG_INVALID_THRESHOLD "Next Threshold for a counter should be no less than 10, but has NEXT_THRESH{0}"
+ 2101: SzConfigurationError, # EAS_ERR_XPATH_OP_UNSUPPORTED "XPath operation unsupported [{0}]"
+ 2102: SzConfigurationError, # EAS_ERR_XPATH_AXIS_UNSUPPORTED "XPath axis unsupported [{0}]"
+ 2103: SzConfigurationError, # EAS_ERR_XPATH_TEST_UNSUPPORTED "XPath test unsupported [{0}]"
+ 2104: SzConfigurationError, # EAS_ERR_XPATH_TYPE_UNSUPPORTED "XPath type unsupported [{0}]"
+ 2105: SzConfigurationError, # EAS_ERR_XPATH_NODE_PREFIX_UNSUPPORTED "XPath node prefix unsupported [{0}]"
+ 2106: SzConfigurationError, # EAS_ERR_XPATH_NODE_NAME_UNSUPPORTED "XPath node name unsupported position[{0}], name[{1}]"
+ 2107: SzConfigurationError, # EAS_ERR_XPATH_BEHAVIOR_TYPE_UNSUPPORTED "XPath behavior type unsupported [{0}]"
+ 2108: SzConfigurationError, # EAS_ERR_XPATH_BUCKET_UNSUPPORTED "XPath bucket type unsupported [{0}]"
+ 2109: SzConfigurationError, # EAS_ERR_XPATH_VALUE_TYPE_UNSUPPORTED "XPath value type unsupported [{0}]"
+ 2110: SzConfigurationError, # EAS_ERR_XPATH_PLUS_TYPE_UNSUPPORTED "XPath plus operand type unsupported [{0}]"
+ 2111: SzConfigurationError, # EAS_ERR_XPATH_FRAGMENT_NOT_EVALUATED "XPath fragment not evaluated[{0}]"
+ 2112: SzConfigurationError, # EAS_ERR_XPATH_FRAGMENT_NOT_CONFIGURED "XPath fragment not configured[{0}]"
+ 2113: SzConfigurationError, # EAS_ERR_XPATH_FUNCTION_UNSUPPORTED "XPath function unsupported [{0}]"
+ 2114: SzConfigurationError, # EAS_ERR_INVALID_FTYPE_SCORESET "Cannot set score for invalid FTYPE_ID [{0}]"
+ 2116: SzError, # EAS_ERR_UNITIALIZED_AMBIGUOUS_CACHE "Uninitialized Ambiguous Test Cache"
+ 2117: SzConfigurationError, # EAS_ERR_SCORING_CALL_HAS_NO_BOM "Scoring call configured with no Bill of Materials CFCALL_ID[{0}]."
+ 2118: SzConfigurationError, # EAS_ERR_BOM_CONFIG_INVALID_FOR_SCORING_PLUGIN "Configured plugin for CFCALL_ID[{0}] has invalid BOM."
+ 2120: SzConfigurationError, # EAS_ERR_TABLE_CONFIGURED_WITH_INVALID_FTYPE_ID "Table {0} configured with an invalid type FTYPE_ID[{1}]"
+ 2121: SzConfigurationError, # EAS_ERR_TABLE_CONFIGURED_WITH_INVALID_FELEM_ID "Table {0} configured with an invalid type FELEM_ID[{1}]"
+ 2123: SzConfigurationError, # EAS_ERR_CFUNC_CONFIGURED_WITH_NO_CFRTN "CFG_CFUNC [{0}] feature type [{1}] configured without any corresponding return values in CFG_CFRTN"
+ 2131: SzConfigurationError, # EAS_ERR_OBS_ENT_NOT_FOUND "Requested resolution of OBS_ENT_ID that is not loaded OBS_ENT_ID[{0}]"
+ 2135: SzConfigurationError, # EAS_ERR_INPUT_MAPPING_CONFIG_ERROR "Error in input mapping config[{0}]"
+ 2136: SzConfigurationError, # EAS_ERR_INPUT_MAPPING_MISSING_REQUIRED_FIELD "Error in input mapping, missing required field[{0}]"
+ 2137: SzConfigurationError, # EAS_ERR_INPUT_MAPPING_MALFORMED_INPUT "Error in input mapping, input message is malformed[{0}]"
+ 2138: SzConfigurationError, # EAS_ERR_INVALID_CFRTN_INDEX "CFRTN_ID[{0}] is out of range. Valid range is 0-7"
+ 2139: SzConfigurationError, # EAS_ERR_DSRC_INTEREST_CONFIGURED_WITH_INVALID_DSRCID "Data Source Interest configured with invalid Data Source ID DSRC_ID[{0}]"
+ 2207: SzConfigurationError, # EAS_ERR_DATA_SOURCE_CODE_DOES_NOT_EXIST "Data source code [{0}] does not exist."
+ 2209: SzConfigurationError, # EAS_ERR_DATA_SOURCE_ID_ALREADY_EXISTS "Data source ID [{0}] already exists."
+ 2210: SzConfigurationError, # EAS_ERR_FELEM_CODE_DOES_NOT_EXIST "Feature element code [{0}] does not exist."
+ 2211: SzConfigurationError, # EAS_ERR_FELEM_CODE_ALREADY_EXISTS "Feature element code [{0}] already exists."
+ 2212: SzConfigurationError, # EAS_ERR_FELEM_ID_ALREADY_EXISTS "Feature element ID [{0}] already exists."
+ 2213: SzConfigurationError, # EAS_ERR_INVALID_FELEM_DATA_TYPE "Invalid feature element datatype [{0}] found. Datatype must be in [{1}]."
+ 2214: SzConfigurationError, # EAS_ERR_FELEM_IS_CONFIGURED_FOR_USE_IN_FEATURES "Feature element [{0}] is configured for use in feature(s) [{1}]."
+ 2215: SzConfigurationError, # EAS_ERR_FTYPE_CODE_DOES_NOT_EXIST "Feature type code [{0}] does not exist."
+ 2216: SzConfigurationError, # EAS_ERR_FTYPE_CODE_ALREADY_EXISTS "Feature type code [{0}] already exists."
+ 2217: SzConfigurationError, # EAS_ERR_FTYPE_ID_ALREADY_EXISTS "Feature type ID [{0}] already exists."
+ 2218: SzConfigurationError, # EAS_ERR_FEATURE_FREQUENCY_IS_INVALID "Feature type frequency [{0}] is invalid."
+ 2219: SzConfigurationError, # EAS_ERR_FEATURE_ELEMENT_LIST_IS_EMPTY "Feature element list is empty."
+ 2220: SzConfigurationError, # EAS_ERR_STANDARDIZATION_FUNCTION_DOES_NOT_EXIST "Standardization function [{0}] does not exist."
+ 2221: SzConfigurationError, # EAS_ERR_FUNCTION_USES_BOTH_FTYPE_AND_FELEM_TRIGGER "Function call requested uses both triggering feature type [{0}] and triggering feature element code [{1}]. Cannot use both triggering feature type and triggering feature element code."
+ 2222: SzConfigurationError, # EAS_ERR_EXPRESSION_FUNCTION_DOES_NOT_EXIST "Expression function [{0}] does not exist."
+ 2223: SzConfigurationError, # EAS_ERR_EXPRESSION_FUNCTION_FEATURE_ELEMENT_LIST_IS_EMPTY "Expression function feature element list is empty."
+ 2224: SzConfigurationError, # EAS_ERR_COMPARISON_FUNCTION_DOES_NOT_EXIST "Comparison function [{0}] does not exist."
+ 2225: SzConfigurationError, # EAS_ERR_COMPARISON_FUNCTION_FEATURE_ELEMENT_LIST_IS_EMPTY "Comparison function feature element list is empty."
+ 2226: SzConfigurationError, # EAS_ERR_DISTINCT_FUNCTION_DOES_NOT_EXIST "Distinct feature function [{0}] does not exist."
+ 2227: SzConfigurationError, # EAS_ERR_DISTINCT_FUNCTION_FEATURE_ELEMENT_LIST_IS_EMPTY "Distinct feature function feature element list is empty."
+ 2228: SzConfigurationError, # EAS_ERR_FELEM_CODE_MUST_BE_UNIQUE_IN_FELEM_LIST "Feature element code [{0}] must be unique in felem list."
+ 2230: SzConfigurationError, # EAS_ERR_FTYPE_CODE_AND_FELEM_CODE_MUST_BE_UNIQUE_IN_EXPRESSED_FUNCTION_CALL "Feature type [{0}] and feature element [{1}] must be unique in expressed feature function call."
+ 2231: SzConfigurationError, # EAS_ERR_FTYPE_CODE_AND_FELEM_CODE_IN_EXPRESSED_FUNCTION_CALL_DO_NOT_EXIST_IN_FEATURE "Feature type [{0}] and feature element [{1}] requested for expressed feature function call, but don't exist in feature [{0}]."
+ 2232: SzConfigurationError, # EAS_ERR_FELEM_CODE_MUST_BE_UNIQUE_IN_COMPARISON_FUNCTION_CALL "Feature element [{0}] must be unique in comparison feature function call."
+ 2233: SzConfigurationError, # EAS_ERR_FELEM_CODE_IN_COMPARISON_FUNCTION_CALL_DOES_NOT_EXIST_IN_FEATURE "Feature element [{0}] requested for comparison feature function call, but doesn't exist in feature [{1}]."
+ 2234: SzConfigurationError, # EAS_ERR_FELEM_CODE_MUST_BE_UNIQUE_IN_DISTINCT_FUNCTION_CALL "Feature element [{0}] must be unique in distinct feature function call."
+ 2235: SzConfigurationError, # EAS_ERR_FELEM_CODE_IN_DISTINCT_FUNCTION_CALL_DOES_NOT_EXIST_IN_FEATURE "Feature element [{0}] requested for distinct feature function call, but doesn't exist in feature [{1}]."
+ 2236: SzConfigurationError, # EAS_ERR_EXEC_ORDER_IS_NOT_SPECIFIED_FOR_FUNCTION "Exec order not specified for function."
+ 2237: SzConfigurationError, # EAS_ERR_SFCALL_ID_ALREADY_EXISTS "Standardization function call ID [{0}] already exists."
+ 2238: SzConfigurationError, # EAS_ERR_EFCALL_ID_ALREADY_EXISTS "Expression function call ID [{0}] already exists."
+ 2239: SzConfigurationError, # EAS_ERR_CFCALL_ID_ALREADY_EXISTS "Comparison function call ID [{0}] already exists."
+ 2240: SzConfigurationError, # EAS_ERR_DFCALL_ID_ALREADY_EXISTS "Distinct feature function call ID [{0}] already exists."
+ 2241: SzConfigurationError, # EAS_ERR_FTYPE_CODE_REQUIRED_BY_SEPARATE_EXPRESSED_FUNCTION_CALL "Feature type [{0}] required for separate expressed feature function call [{1}]."
+ 2242: SzConfigurationError, # EAS_ERR_SFCALL_ID_DOES_NOT_EXIST "Standardization function call ID [{0}] does not exist."
+ 2243: SzConfigurationError, # EAS_ERR_EFCALL_ID_DOES_NOT_EXIST "Expression function call ID [{0}] does not exist."
+ 2244: SzConfigurationError, # EAS_ERR_CFCALL_ID_DOES_NOT_EXIST "Comparison function call ID [{0}] does not exist."
+ 2245: SzConfigurationError, # EAS_ERR_DFCALL_ID_DOES_NOT_EXIST "Distinct feature function call ID [{0}] does not exist."
+ 2246: SzConfigurationError, # EAS_ERR_BOM_EXEC_ORDER_ALREADY_EXISTS "BOM exec order value [{0}] already exists."
+ 2247: SzConfigurationError, # EAS_ERR_COMPARISON_FUNCTION_CALL_DOES_NOT_EXIST_FOR_FEATURE "Comparison function call does not exist for feature [{0}]."
+ 2248: SzConfigurationError, # EAS_ERR_DISTINCT_FUNCTION_CALL_DOES_NOT_EXIST_FOR_FEATURE "Distinct feature function call does not exist for feature [{0}]."
+ 2249: SzConfigurationError, # EAS_ERR_CONFLICTING_SPECIFIERS_FOR_FUNCTION_CALL "Conflicting specifiers: Function call ID [{0}] does not match function call ID [{1}] from feature type."
+ 2250: SzConfigurationError, # EAS_ERR_ATTR_CODE_DOES_NOT_EXIST "Attribute code [{0}] does not exist."
+ 2251: SzConfigurationError, # EAS_ERR_ATTR_CODE_ALREADY_EXISTS "Attribute code [{0}] already exists."
+ 2252: SzConfigurationError, # EAS_ERR_ATTR_ID_ALREADY_EXISTS "Attribute ID [{0}] already exists."
+ 2253: SzConfigurationError, # EAS_ERR_ATTR_CLASS_CODE_DOES_NOT_EXIST "Attribute class code [{0}] does not exist."
+ 2254: SzConfigurationError, # EAS_ERR_FUNCTION_USES_NEITHER_FTYPE_NOR_FELEM_TRIGGER "Function call requested uses neither triggering feature type [{0}] nor triggering feature element code [{1}]. At least one trigger must be specified."
+ 2255: SzConfigurationError, # EAS_ERR_FEATURE_CLASS_CODE_DOES_NOT_EXIST "Feature class code [{0}] does not exist."
+ 2256: SzConfigurationError, # EAS_ERR_RELATIONSHIP_TYPE_CODE_DOES_NOT_EXIST "Relationship type code [{0}] does not exist."
+ 2257: SzConfigurationError, # EAS_ERR_FELEM_CODE_NOT_IN_FEATURE "Feature element code [{0}] not included in feature[{1}]."
+ 2258: SzConfigurationError, # EAS_ERR_ER_FRAGMENT_DOES_NOT_EXIST "ER fragment code [{0}] does not exist."
+ 2259: SzConfigurationError, # EAS_ERR_ER_RULE_DOES_NOT_EXIST "ER rule code [{0}] does not exist."
+ 2260: SzConfigurationError, # EAS_ERR_ERFRAG_ID_ALREADY_EXISTS "ER fragment ID [{0}] already exists."
+ 2261: SzConfigurationError, # EAS_ERR_ERRULE_ID_ALREADY_EXISTS "ER rule ID [{0}] already exists."
+ 2262: SzConfigurationError, # EAS_ERR_ERFRAG_CODE_ALREADY_EXISTS "ER fragment code [{0}] already exists."
+ 2263: SzConfigurationError, # EAS_ERR_ERRULE_CODE_ALREADY_EXISTS "ER rule code [{0}] already exists."
+ 2264: SzConfigurationError, # EAS_ERR_ERFRAG_CODE_DOES_NOT_EXIST "ER fragment code [{0}] does not exist."
+ 2266: SzConfigurationError, # EAS_ERR_ERFRAG_CODE_MUST_BE_UNIQUE_IN_DEPENDENCY_LIST "ER fragment code [{0}] must be unique in dependency list."
+ 2267: SzConfigurationError, # EAS_ERR_SECTION_NAME_ALREADY_EXISTS "Section name [{0}] already exists."
+ 2268: SzConfigurationError, # EAS_ERR_SECTION_NAME_DOES_NOT_EXIST "Section name [{0}] does not exist."
+ 2269: SzConfigurationError, # EAS_ERR_SECTION_FIELD_NAME_ALREADY_EXISTS "Section field name [{0}] already exists."
+ 2270: SzConfigurationError, # EAS_ERR_SFUNC_ID_ALREADY_EXISTS "Feature standardization function ID [{0}] already exists."
+ 2271: SzConfigurationError, # EAS_ERR_SFUNC_CODE_ALREADY_EXISTS "Feature standardization function code [{0}] already exists."
+ 2272: SzConfigurationError, # EAS_ERR_EFUNC_ID_ALREADY_EXISTS "Feature expression function ID [{0}] already exists."
+ 2273: SzConfigurationError, # EAS_ERR_EFUNC_CODE_ALREADY_EXISTS "Feature expression function code [{0}] already exists."
+ 2274: SzConfigurationError, # EAS_ERR_CFUNC_ID_ALREADY_EXISTS "Feature comparison function ID [{0}] already exists."
+ 2275: SzConfigurationError, # EAS_ERR_CFUNC_CODE_ALREADY_EXISTS "Feature comparison function code [{0}] already exists."
+ 2276: SzConfigurationError, # EAS_ERR_DFUNC_ID_ALREADY_EXISTS "Feature distinct function ID [{0}] already exists."
+ 2277: SzConfigurationError, # EAS_ERR_DFUNC_CODE_ALREADY_EXISTS "Feature distinct function code [{0}] already exists."
+ 2278: SzConfigurationError, # EAS_ERR_COMPATIBILITY_VERSION_NOT_FOUND_IN_CONFIG "Compatibility version not found in document."
+ 2279: SzConfigurationError, # EAS_ERR_CFRTN_ID_ALREADY_EXISTS "Feature comparison function return ID [{0}] already exists."
+ 2280: SzConfigurationError, # EAS_ERR_CFUNC_CODE_DOES_NOT_EXIST "Feature comparison function code [{0}] does not exist."
+ 2281: SzConfigurationError, # EAS_ERR_CFRTN_VALUE_ALREADY_EXISTS "Feature comparison function return value [{0}] already exists for comparison function [{1}] ftype [{2}]."
+ 2282: SzConfigurationError, # EAS_ERR_CFUNC_EXEC_ORDER_ALREADY_EXISTS "Feature comparison function exec order value [{0}] already exists for comparison function [{1}] ftype [{2}]."
+ 2283: SzConfigurationError, # EAS_ERR_EFUNC_CODE_DOES_NOT_EXIST "Feature expression function code [{0}] does not exist."
+ 2285: SzError, # EAS_ERR_INVALID_FORMAT_FOR_ENTITIES "Invalid format for ENTITIES."
+ 2286: SzError, # EAS_ERR_NO_ENTITY_ID_FOUND_FOR_ENTITY "No entity ID found for entity."
+ 2287: SzError, # EAS_ERR_NO_DATA_SOURCE_FOUND "No data source found."
+ 2288: SzError, # EAS_ERR_NO_RECORD_ID_FOUND "No record ID found."
+ 2289: SzConfigurationError, # EAS_ERR_INVALID_FEATURE_CLASS_FOR_FEATURE_TYPE "Invalid feature class [{0}] for feature type [{1}]."
+ 2290: SzConfigurationError, # EAS_ERR_FRAGMENT_IS_CONFIGURED_FOR_USE_IN_RULES "Rule fragment [{0}] is configured for use in rules(s) [{1}]."
+ 2291: SzConfigurationError, # EAS_ERR_FRAGMENT_IS_CONFIGURED_FOR_USE_IN_FRAGMENT "Rule fragment [{0}] is configured for use in fragments(s) [{1}]."
+ 2292: SzError, # EAS_ERR_CANT_RETRIEVE_OBS_FEATURE_DATA_FOR_OBS_ENT "Could not retrieve observed feature data for observed entity [{0}]."
+ 2293: SzError, # EAS_ERR_NO_RECORDS_SPECIFIED "No records specified."
+ 2294: SzError, # EAS_ERR_DATA_SOURCE_ID_DOES_NOT_EXIST "Data source ID [{0}] does not exist."
+ 7209: SzConfigurationError, # EAS_ERR_DB_BAD_BACKEND_TYPE "Invalid [SQL] Backend Parameter. Valid values are SQL or HYBRID"
+ 7211: SzConfigurationError, # EAS_ERR_DB_BAD_CLUSTER_SIZE "Cluster [{0}] is configured with an invalid size. Size must be equal to 1."
+ 7212: SzConfigurationError, # EAS_ERR_DB_BAD_CLUSTER_NODE "Cluster [{0}] Node [{1}] is not configured."
+ 7216: SzConfigurationError, # EAS_ERR_DB_BAD_CLUSTER_DEFINITION "Cluster [{0}] is not properly configured"
+ 7217: SzConfigurationError, # EAS_ERR_DB_CONFLICTING_DEFAULT_SHARD_CONFIG "Cannot specify both default backend database and default backend cluster"
+ 7218: SzConfigurationError, # EAS_ERR_DB_CLUSTER_DOES_NOT_EXIST "Cluster [{0}] does not exist"
+ 7220: SzConfigurationError, # EAS_ERR_NO_CONFIG_REGISTERED_IN_DATASTORE "No engine configuration registered in datastore (see https://senzing.zendesk.com/hc/en-us/articles/360036587313)."
+ 7221: SzConfigurationError, # EAS_ERR_NO_CONFIG_REGISTERED_FOR_DATA_ID "No engine configuration registered with data ID [{0}]."
+ 7222: SzError, # EAS_ERR_FAILED_TO_SET_SYS_VAR_IN_DATASTORE "Could not set system variable value in database for Group[{0}],Code[{1}],Value[{2}]."
+ 7223: SzConfigurationError, # EAS_ERR_INVALID_SCHEMA_VERSION_IN_DATASTORE "Invalid version number for datastore schema [version '{0}']."
+ 7224: SzConfigurationError, # EAS_ERR_INVALID_SCHEMA_VERSION_IN_ENGINE "Invalid version number for engine schema [version '{0}']."
+ 7226: SzConfigurationError, # EAS_ERR_INCOMPATIBLE_DATASTORE_SCHEMA_VERSION "Incompatible datastore schema version: [Engine version '{0}'. Datastore version '{1}' is installed, but must be between '{2}' and '{3}'.]"
+ 7227: SzConfigurationError, # EAS_ERR_CONFLICTING_SCHEMA_VERSIONS_IN_DATASTORE "Conflicting version numbers for datastore schema [{0}]."
+ 7228: SzConfigurationError, # EAS_ERR_INVALID_SCHEMA_VERSION "Invalid schema version number [version '{0}']."
+ 7230: SzConfigurationError, # EAS_ERR_ENGINE_CONFIGURATION_FILE_NOT_FOUND "Engine configuration file not found [{0}]."
+ 7232: SzConfigurationError, # EAS_ERR_ENGINE_CONFIGURATION_NOT_FOUND "No engine configuration found."
+ 7233: SzConfigurationError, # EAS_ERR_DATASTORE_ENCRYPTION_SIGNATURE_IS_INCOMPATIBLE "Datastore encryption signature is not compatible."
+ 7234: SzConfigurationError, # EAS_ERR_FAILED_TO_GET_ENCRYPTION_SIGNATURE "Failed to get encryption signature: '{0}'"
+ 7235: SzConfigurationError, # EAS_ERR_FTYPE_CONFIGURED_AS_REL_BUT_NO_RTYPE "FTYPE_CODE[{0}] IS CONFIGURED AS A RELATIONSHIP FEATURE TYPE BUT RTYPE_ID IS NOT SET."
+ 7236: SzConfigurationError, # EAS_ERR_DUPLICATE_BEHAVIOR_OVERRIDE_KEY_IN_CFG_FBOVR "Duplicate behavior override keys in CFG_FBOVR -- FTYPE_ID[{0}], UTYPE_CODE[{1}] referenced in CFG_FBOVR."
+ 7237: SzConfigurationError, # EAS_ERR_UNKNOWN_FTYPE_IN_TABLE "Unknown FTYPE_ID[{0}] referenced in {1}."
+ 7238: SzError, # EAS_ERR_DATASTORE_ENCRYPTION_CONFIGURATION_DOES_NOT_MATCH_DATASTORE "Datastore encryption configuration does not match data store: '{0}'"
+ 7239: SzConfigurationError, # EAS_ERR_INVALID_GENERIC_THRESHOLD_CANDIDATE_CAP "Invalid generic threshold {0} cap [{1}] for [GPLAN_ID[{2}], BEHAVIOR[{3}], FTYPE_ID[{4}]]."
+ 7240: SzConfigurationError, # EAS_ERR_INCORRECT_BEHAVIOR_REFERENCED "Incorrect BEHAVIOR[{0}] referenced in CFG_GENERIC_THRESHOLD for [GPLAN_ID[{1}], FTYPE_ID[{2}]]. FType configured for behavior [{3}]"
+ 7241: SzConfigurationError, # EAS_ERR_UNKNOWN_GPLAN_IN_TABLE "Unknown GPLAN_ID[{0}] referenced in {1}."
+ 7242: SzConfigurationError, # EAS_ERR_MULTIPLE_GENERIC_THRESHOLD_DEFINITIONS "Multiple Generic Threshold definitions for [GPLAN_ID[{0}], BEHAVIOR[{1}], FTYPE_ID[{2}]]."
+ 7243: SzConfigurationError, # EAS_ERR_ER_FRAGMENT_HAS_UNDEFINED_DEPENDENT_FRAGMENTS "ER Fragment [{0}] configured with undefined dependent fragments. Fragment [{1}] undefined."
+ 7244: SzConfigurationError, # EAS_ERR_ER_RULE_FRAGMENT_LACKS_REQUIRED_FRAGMENT "ER Rule Fragment configuration lacks the required {0} fragment."
+ 7245: SzConfigurationError, # EAS_ERR_CURRENT_CONFIG_REGISTERED_DOES_NOT_MATCH_DATA_ID "Current configuration ID does not match specified data ID [{0}]."
+ 7246: SzConfigurationError, # EAS_ERR_INVALID_MAXIMUM_DATASTORE_SCHEMA_VERSION "Invalid maximum datastore version number for engine schema [version '{0}']."
+ 7247: SzConfigurationError, # EAS_ERR_INVALID_MINIMUM_DATASTORE_SCHEMA_VERSION "Invalid minimum datastore version number for engine schema [version '{0}']."
+ 7303: SzBadInputError, # EAS_ERR_MANDATORY_SEGMENT_WITH_MISSING_REQUIREMENTS "Mandatory segment with missing requirements:"
+ 7305: SzBadInputError, # EAS_ERR_MISSING_JSON_ROOT_ELEMENT "No root element name in json TEMPLATE"
+ 7313: SzBadInputError, # EAS_ERR_REQUIRED_ELEMENT_WITH_EMPTY_FIELD "A non-empty value for [{0}] must be specified."
+ 7314: SzBadInputError, # EAS_ERR_REQUIRED_ELEMENT_NOT_FOUND "A value for [{0}] must be specified."
+ 7317: SzConfigurationError, # EAS_ERR_FAILED_TO_OPEN_FILE "Failed to open file: {0}"
+ 7344: SzConfigurationError, # EAS_ERR_UNKNOWN_MAPPING_DIRECTIVE "Invalid mapping directive [{0}] for attribute [{1}]."
+ 7426: SzBadInputError, # EAS_ERR_XLITERATOR_FAILED "Transliteration failed"
+ 7511: SzError, # EAS_ERR_ABORT_ER_AND_RETRY "Detected change in candidate entity[{0}]. Restarting ER evaluation."
+ 8000: SzBadInputError, # EAS_ERR_GNRNP "GNR NameParser Failure"
+ 8410: SzError, # EAS_ERR_UNINITIALIZED_AMBIGUOUS_FEATURE "Cannot use uninitialized ambiguous feature."
+ 8501: SzConfigurationError, # EAS_ERR_SALT_DIGEST_ALGORITHM_NOT_AVAILABLE "Failed to get {0} digest algorithm from ICC."
+ 8502: SzError, # EAS_ERR_SALT_DIGEST_CONTEXT_CREATE_FAILED "Failed to create a digest context."
+ 8503: SzError, # EAS_ERR_SALT_DIGEST_CONTEXT_INIT_FAILED "Failed {0} to initialise a digest context."
+ 8504: SzError, # EAS_ERR_SALT_DIGEST_FAILED "Failed {0} to digest block {1}."
+ 8505: SzError, # EAS_ERR_SALT_DIGEST_FINAL_FAILED "Failed {0} to complete digest."
+ 8508: SzError, # EAS_ERR_SALT_DIGEST_UNKNOWN_EXCEPTION "Unrecognized exception thrown generating digest."
+ 8509: SzError, # EAS_ERR_SALT_DIGEST_ALGORITHM_REQUIRED "Cannot generate a digest without a valid algorithm."
+ 8514: SzError, # EAS_ERR_SALT_RANDOM_FAILED "Failed {0} to get random content"
+ 8516: SzConfigurationError, # EAS_ERR_SALT_MUST_BE_SIZE "A salt value must be {0} bytes long but the provided one is {1} bytes."
+ 8517: SzConfigurationError, # EAS_ERR_SALT_DOES_NOT_MATCH_CHECKSUM "The salt value does not match the recorded checksum."
+ 8520: SzError, # EAS_ERR_SALT_G2SS_INIT_FAILED "Secure Store initialization failed."
+ 8521: SzError, # EAS_ERR_SALT_G2SS_TOKEN_MUST_BE_INIT "Hashing with a named salt requires the Secure Store to be initialised."
+ 8522: SzConfigurationError, # EAS_ERR_SALT_G2SS_SOPIN_NOT_VALID "The Security Officer (SO) PIN is not correct."
+ 8524: SzError, # EAS_ERR_SALT_G2SS_INIT_UNKNOWN_EXCEPTION "Secure Store initialization failed with an unrecognised exception"
+ 8525: SzConfigurationError, # EAS_ERR_SALT_G2SS_REQUIRED_FOR_LOAD "Secure Store is required to load salt"
+ 8526: SzConfigurationError, # EAS_ERR_SALT_G2SS_REQUIRED_FOR_GENERATE "Secure Store is required to generate salt"
+ 8527: SzConfigurationError, # EAS_ERR_SALT_G2SS_REQUIRED_FOR_IMPORT "Secure Store is required to import salt"
+ 8528: SzConfigurationError, # EAS_ERR_SALT_G2SS_REQUIRED_FOR_EXPORT "Secure Store is required to export salt"
+ 8529: SzConfigurationError, # EAS_ERR_SALT_G2SS_REQUIRED_FOR_DELETE "Secure Store is required to delete salt"
+ 8530: SzError, # EAS_ERR_SALT_CANNOT_OVERWRITE "You cannot overwrite an existing salt called {0}"
+ 8536: SzConfigurationError, # EAS_ERR_SALT_G2SS_REQUIRED_FOR_LEGACY "Secure Store is required to add a legacy salt"
+ 8538: SzConfigurationError, # EAS_ERR_SALT_G2SS_REQUIRED_FOR_METHOD "Secure Store is required to change hashing method"
+ 8539: SzError, # EAS_ERR_SALT_G2SS_ERROR_CHANGING_METHOD "Secure Store error changing hashing method"
+ 8540: SzConfigurationError, # EAS_ERR_SALT_WRONG_SIZE "The object called {0} is not a salt"
+ 8541: SzError, # EAS_ERR_SALT_BASE64_DECODE_ERROR "Base64 decoding error in salt {0} at character {1}"
+ 8542: SzError, # EAS_ERR_SALT_UNINITIALISED "Must load a salt before using it."
+ 8543: SzConfigurationError, # EAS_ERR_SALT_NOT_FOUND "There is no salt called {0} in the Secure Store."
+ 8544: SzConfigurationError, # EAS_ERR_SALT_PASSWORD_NOT_STRONG_ENOUGH "The password must be stronger: {0}"
+ 8545: SzConfigurationError, # EAS_ERR_SALT_ADMIN_NAME_REQUIRED "Specify -name and the name to use for the salt"
+ 8556: SzConfigurationError, # EAS_ERR_SALT_ADMIN_METHOD_NOT_RECOGNISED "Hashing method {0} not supported."
+ 8557: SzConfigurationError, # EAS_ERR_SALT_METHOD_DOES_NOT_MATCH "The hashing method in the configuration ({1}) does not match the method ({2}) of the salt {0}"
+ 8593: SzError, # EAS_ERR_SALT_HMAC_CONTEXT_INIT_FAILED "Failed {0} to initialise an HMAC context."
+ 8594: SzError, # EAS_ERR_SALT_HMAC_FAILED "Failed {0} to HMAC block {1}."
+ 8595: SzError, # EAS_ERR_SALT_HMAC_FINAL_FAILED "Failed {0} to complete HMAC."
+ 8598: SzError, # EAS_ERR_SALT_HMAC_UNKNOWN_EXCEPTION "Unrecognized exception thrown generating HMAC."
+ 8599: SzConfigurationError, # EAS_ERR_SALT_UNKNOWN_HASHING_METHOD "Unrecognized hashing method ({0}) requested."
+ 8601: SzConfigurationError, # EAS_ERR_HASHER_REQUIRES_SECURE_STORE "Using a named salt requires the Secure Store configured and running"
+ 8602: SzConfigurationError, # EAS_ERR_HASHER_CHECKSUM_DOES_NOT_MATCH "The hashing checksum configured ({1}) does not match the checksum ({2}) of the salt named {0}"
+ 8603: SzError, # EAS_ERR_HASHER_UNABLE_TO_RECORD_SALT "Unable to record the configured salt"
+ 8604: SzConfigurationError, # EAS_ERR_HASHER_REQUIRES_FUNCTION "Using hashing requires a configured hashing function"
+ 8605: SzConfigurationError, # EAS_ERR_HASHER_EPHEMERAL_OR_NAMED_SALT "Specify either a named salt or an ephemeral one. Can not have both"
+ 8606: SzConfigurationError, # EAS_ERR_HASHER_SALT_REQUIRED "Hashing requires a salt to be configured."
+ 8607: SzConfigurationError, # EAS_ERR_HASHER_INVALID_ARGS "Invalid arguments to hashing function. Either a parameter wasn't provided or a buffer was too small: location={0}, dataPtr={1}, dataLength={2}, outputPtr={3}, outputLength={4}, output={5}"
+ 8608: SzConfigurationError, # EAS_ERR_NO_SALT_VALUE_CONFIGURED "No salt value is configured. A salt value must be configured if you wish to export the token library."
+ 8701: SzConfigurationError, # EAS_ERR_PARAMETER_NOT_READABLE "The parameter store does not support a read interface"
+ 8702: SzConfigurationError, # EAS_ERR_PARAMETER_NOT_WRITABLE "The parameter store does not support a write interface"
+ 9000: SzLicenseError, # EAS_LIMIT_MAX_OBS_ENT "LIMIT: Maximum number of records ingested: {0}"
+ 9107: SzConfigurationError, # EAS_ERR_CANT_GET_PARAMETER_FROM_THE_STORE "Cannot get parameter [{0}] from parameter store"
+ 9110: SzConfigurationError, # EAS_ERR_INSUFFICIENT_CONFIG "Insufficient configuration for the {0} table!"
+ 9111: SzConfigurationError, # EAS_ERR_PARSE_FRAGMENT "ERROR parsing FragmentID[{0}] FragmentName[{1}] : [{2}] is an invalid RuleID dependency"
+ 9112: SzConfigurationError, # EAS_ERR_FAILED_TO_OPEN_INI_FILE_FOR_WRITING "Failed to open ini file for writing [{0}]"
+ 9113: SzConfigurationError, # EAS_ERR_FAILED_TO_OPEN_INI_FILE_FOR_READING "Failed to open ini file for reading [{0}]"
+ 9115: SzBadInputError, # EAS_ERR_INPUT_NOT_STANDARDIZED "Cannot process Observation that has not been standardized"
+ 9116: SzConfigurationError, # EAS_ERR_CONFIG_TABLE_NOT_FOUND "CONFIG information for {0} not found!"
+ 9117: SzConfigurationError, # EAS_ERR_CONFIG_TABLE_COLUMN_NOT_FOUND "CONFIG information for {0} not found in {1}!"
+ 9118: SzConfigurationError, # EAS_ERR_CONFIG_TABLE_COLUMN_INDEX_NOT_FOUND "Invalid column index {0} queried from {1} container!"
+ 9119: SzConfigurationError, # EAS_ERR_CONFIG_TABLE_COLUMN_NAME_NOT_FOUND "Invalid column name {0} queried from {1} container!"
+ 9120: SzConfigurationError, # EAS_ERR_CONFIG_TABLE_MALFORMED "CONFIG information for {0} is malformed!"
+ 9210: SzConfigurationError, # EAS_ERR_DIGEST_CONTEXT_INIT_FAILED "Unable to initialize Digest Context."
+ 9220: SzConfigurationError, # EAS_ERR_FTYPE_CANNOT_BE_HASHED "FType configured to be hashed, but cannot be scored. FTYPE_ID[{0}] FTYPE_CODE[{1}]"
+ 9222: SzConfigurationError, # EAS_ERR_FTYPE_CONFIGURED_TO_BE_HASHED_MISSING_SALT "A Feature Type is marked for hashing, but a valid salt value was not found. FTYPE_ID[{0}] FTYPE_CODE[{1}]"
+ 9224: SzConfigurationError, # EAS_ERR_FTYPE_CONFIGURED_TO_BE_HASHED "FType configured to be hashed, but no hashable data found. FTYPE_ID[{0}] FTYPE_CODE[{1}]"
+ 9228: SzConfigurationError, # EAS_ERR_UNEXPECTED_SALT_CHECKUM_LIST "The SALT checksum on the Observation does not match the EXPECTED SALT checksum: EXPECTED=[{0}] Observation=[{1}]"
+ 9240: SzConfigurationError, # EAS_ERR_CIPHER_CONTEXT_INIT_FAILED "Unable to initialize an ICC Context."
+ 9241: SzConfigurationError, # EAS_ERR_CIPHER_OP_FAILED "Unable to perform a required ICC operation."
+ 9250: SzConfigurationError, # EAS_ERR_G2SS_INVALID_LIB "Invalid ({1}) Secure Store plug-in library: {0}"
+ 9251: SzConfigurationError, # EAS_ERR_G2SS_INVALID_URL "Invalid Secure Store URL: {0}"
+ 9252: SzConfigurationError, # EAS_ERR_G2SS_INVALID_PIN "Invalid Secure Store credential specification: {0}"
+ 9253: SzConfigurationError, # EAS_ERR_G2SS_TOKEN_INIT_FAILED "Secure Store token initialization failed: {0}."
+ 9254: SzConfigurationError, # EAS_ERR_G2SS_TOKEN_UNINITIALISED "Cannot open a Secure Store session when the token is uninitialized."
+ 9255: SzConfigurationError, # EAS_ERR_G2SS_USER_PIN_UNINITIALISED "Secure Store credential is uninitialized."
+ 9256: SzConfigurationError, # EAS_ERR_G2SS_SESSION_OPEN "Cannot open a Secure Store session when one is already open."
+ 9257: SzConfigurationError, # EAS_ERR_G2SS_NO_SESSION "Cannot use Secure Store without a session."
+ 9258: SzConfigurationError, # EAS_ERR_G2SS_SESSION_OPEN_FAILED "Secure Store session could not be opened: {0}."
+ 9259: SzConfigurationError, # EAS_ERR_G2SS_ADMIN_LOGIN_FAILED "Secure Store admin login failed: {0}."
+ 9260: SzConfigurationError, # EAS_ERR_G2SS_USER_LOGIN_FAILED "Secure Store user login failed: {0}."
+ 9261: SzConfigurationError, # EAS_ERR_G2SS_PKCS11_ERROR "Secure Store function failed: {0}"
+ 9264: SzConfigurationError, # EAS_ERR_G2SS_LOGOUT_FAILED "Secure Store logout failed: {0}."
+ 9265: SzConfigurationError, # EAS_ERR_G2SS_NEED_RW_SESSION "Secure Store session must be read/write."
+ 9266: SzConfigurationError, # EAS_ERR_G2SS_UNABLE_TO_VERIFY_KEY "Secure Store key does not meet requirements."
+ 9267: SzError, # EAS_ERR_G2SS_UNABLE_TO_CREATE_KEY "Secure Store key creation failed."
+ 9268: SzError, # EAS_ERR_G2SS_UNABLE_TO_CHANGE_PIN "Secure Store password change failed: {0}."
+ 9269: SzConfigurationError, # EAS_ERR_G2SS_INVALID_OLD_CREDENTIAL "Secure Store old credential is invalid."
+ 9270: SzConfigurationError, # EAS_ERR_G2SS_INVALID_NEW_CREDENTIAL "Secure Store new credential is invalid."
+ 9271: SzError, # EAS_ERR_G2SS_OUT_OF_MEMORY "Secure Store out of memory."
+ 9272: SzError, # EAS_ERR_G2SS_FIND_INIT_FAILED "Secure Store object locating failed: {0}."
+ 9273: SzError, # EAS_ERR_G2SS_FIND_FAILED "Secure Store object find failed: {0}."
+ 9274: SzError, # EAS_ERR_G2SS_CRYPTO_SETUP_FAILED "Secure Store setup of encryption failed: {0}."
+ 9275: SzError, # EAS_ERR_G2SS_ENCRYPT_START_FAILED "Secure Store unable to start encryption: {0}."
+ 9276: SzError, # EAS_ERR_G2SS_ENCRYPT_SIZE_FAILED "Secure Store unable to get the size of encrypted data: {0}."
+ 9277: SzError, # EAS_ERR_G2SS_ENCRYPT_FAILED "Secure Store encryption failed: {0}."
+ 9278: SzError, # EAS_ERR_G2SS_DECRYPT_START_FAILED "Secure Store unable to start decryption: {0}."
+ 9279: SzError, # EAS_ERR_G2SS_DECRYPT_FAILED "Secure Store decryption failed: {0}."
+ 9280: SzError, # EAS_ERR_G2SS_OBJECT_SAVE_FAILED "Secure Store unable to save object: {0}."
+ 9281: SzError, # EAS_ERR_G2SS_OBJECT_DELETE_FAILED "Secure Store unable to delete object: {0}."
+ 9282: SzError, # EAS_ERR_G2SS_OBJECT_CHANGE_FAILED "Secure Store unable to modify object: {0}."
+ 9283: SzError, # EAS_ERR_G2SS_UNINITIALISED "Secure Store has not been initialized"
+ 9284: SzConfigurationError, # EAS_ERR_G2SS_INVALID_SLOT_ID "Can not obtain info on specified slot. Possibly invalid slot ID specified in Secure Store URL: {0}"
+ 9285: SzConfigurationError, # EAS_ERR_G2SS_NO_TOKEN_IN_SLOT "No security token present in slot specified by Secure Store URL: slot ID = {0}"
+ 9286: SzConfigurationError, # EAS_ERR_G2SS_TOKEN_NOT_FOUND "Can not obtain info for security token. Possibly invalid token label and/or slot ID specified in Secure Store URL: {0}"
+ 9287: SzError, # EAS_ERR_G2SS_TOKEN_IMPL_ERROR "An internal error occurred in the security token implementation library: Return Code = {0}"
+ 9288: SzError, # EAS_ERR_G2SS_USER_PIN_PROMPT_FAILED "Was unable to prompt user for security token authentication."
+ 9289: SzError, # EAS_ERR_G2SS_LABEL_CHANGED_SINCE_CONFIG_INIT "Secure Store has been reconfigured since loading."
+ 9290: SzError, # EAS_ERR_G2SS_OBJECT_NOT_FOUND "Secure Store does not have an object called {0}."
+ 9292: SzConfigurationError, # EAS_ERR_G2SS_NO_PASSWORD "No password supplied"
+ 9293: SzConfigurationError, # EAS_ERR_G2SS_NO_SEC_STORE_PREFIX "Secure Store expects a different format (starting with {0}) when a password is supplied"
+ 9295: SzConfigurationError, # EAS_ERR_G2SS_NO_DATA_OBJECTS "There are no Secure Store objects stored on the token"
+ 9296: SzConfigurationError, # EAS_ERR_G2SS_SEC_STORE_ARCHIVE_BAD "The exported archive appears to be corrupted around object {0}"
+ 9297: SzConfigurationError, # EAS_ERR_G2SS_FILE_NOT_FOUND "Secure Store failed to open {0}"
+ 9298: SzConfigurationError, # EAS_ERR_G2SS_FILE_CONTENTS_BAD "Secure Store contents of {0} not usable."
+ 9299: SzError, # EAS_ERR_G2SS_CLASS_NOT_INIT "Secure Store internal error."
+ 9300: SzConfigurationError, # EAS_ERR_G2SS_PASSWORD_CHECK_ERROR "Secure Store internal error ({0}) checking password."
+ 9301: SzConfigurationError, # EAS_ERR_MISSING_SEQUENCE_ENTRY "Missing Sequence Entry[{0}] in the SYS_SEQUENCE table!"
+ 9305: SzError, # EAS_ERR_SEQUENCE_RETRIES_FAILED "Retries failed to retrieve Sequence Entry[{0}] in the SYS_SEQUENCE table! This may mean the CACHE_SIZE is too small."
+ 9308: SzConfigurationError, # EAS_ERR_MISSING_STATUS_ENTRY "Could not retrieve status entry[{0}] in the SYS_STATUS table!"
+ 9309: SzConfigurationError, # EAS_ERR_SEQUENCE_HAS_BEEN_RESET "Sequence entry[{0}] has been reset."
+ 9310: SzConfigurationError, # EAS_ERR_INVALID_STATUS_ENTRY_VALUE "Invalid value for status entry[{0}] in the SYS_STATUS table!"
+ 9311: SzError, # EAS_ERR_COULD_NOT_RECORD_USAGE_TYPE "Could not record usage type [{0}] in the LIB_UTYPE table!"
+ 9406: SzError, # EAS_ERR_G2SS_SESSION_MUST_NOT_BE_OPEN "Secure Store cannot fetch a value with sync if a session is already open."
+ 9408: SzConfigurationError, # EAS_ERR_G2SS_PASSWORD_INADEQUATE "The provided password is not strong enough: {0}"
+ 9409: SzConfigurationError, # EAS_ERR_G2SS_FUNCTION_LIST_NOT_SET "The security token interface is not yet set"
+ 9410: SzError, # EAS_ERR_G2SS_PKCS_INIT_FAILED "Initializing token driver failed {0}"
+ 9411: SzError, # EAS_ERR_G2SS_PKCS_FINAL_FAILED "Finalizing token driver failed {0}"
+ 9413: SzConfigurationError, # EAS_ERR_G2SS_INCORRECT_PASSWORD "The export file password appears to be incorrect."
+ 9414: SzBadInputError, # EAS_ERR_STRING_IS_INVALID_UTF8 "Invalid data string. Data must be in UTF-8."
+ 9500: SzConfigurationError, # EAS_ERR_TOKEN_LIBRARY_CHECKSUM_MISMATCH "Cannot load token library. The checksum does not match the configuration of this node. Found: [{0}] Expected: [{1}]"
+ 9501: SzError, # EAS_TOKEN_LIBRARY_ALREADY_HASHED "Cannot hash token library. The Token Library contains previous hashed data"
+ 9701: SzError, # EAS_ERR_CANT_RETRIEVE_INDEX_FROM_MEMORY_ROW "Cannot retrieve index[{0}] from memory row of key[{1}], out of range!"
+ 9802: SzConfigurationError, # EAS_ERR_INBOUND_OBS_CONFIG_CHECKSUM_MISMATCH "Configuration checksum on inbound observation [{0}] does not match this nodes configuration checksum [{1}]. Cannot process."
+ 9803: SzConfigurationError, # EAS_ERR_CALC_CONFIGCHKSUM_AND_PARAMSTORE_CONFIGCHKSUM_DONT_MATCH "The calculated configuration checksum [{0}] does not match the CONFIGURATION_CHECKSUM value in the parameter store [{1}]."
+ 30011: SzError, # EAS_ERR_DELETE_WITH_RESOLVE_ONLY "Cannot delete an entity with type RESOLVE_ONLY"
+ 30101: SzError, # EAS_ERR_INVALID_SESSION_HANDLE "Invalid Session Handle [{0}]"
+ 30102: SzError, # EAS_ERR_INVALID_REPORT_HANDLE "Invalid Report Handle [{0}]"
+ 30103: SzError, # EAS_ERR_INVALID_EXPORT_HANDLE "Invalid Export Handle [{0}]"
+ 30110: SzError, # EAS_ERR_RESPONSE_MESSAGE_SIZE_LARGER_THAN_BUFFER_SIZE "Response message size [{0}] is larger than buffer size [{1}]"
+ 30111: SzError, # EAS_ERR_RESPONSE_RESIZE_FUNCTION_IS_NOT_PROVIDED "Resize function is not provided"
+ 30112: SzError, # EAS_ERR_RESPONSE_RESIZE_FUNCTION_GAVE_INVALID_RESULT "Resize function returned an invalid result"
+ 30121: SzBadInputError, # EAS_ERR_JSON_PARSING_FAILURE "JSON Parsing Failure [code={0},offset={1}]"
+ 30122: SzBadInputError, # EAS_ERR_JSON_PARSING_FAILURE_MUST_BE_OBJECT_OR_ARRAY "JSON Parsing Failure. JSON must be object or array."
+ 30123: SzBadInputError, # EAS_ERR_JSON_PARSING_FAILURE_OBJECT_HAS_DUPLICATE_KEYS "Json object has duplicate keys."
+ 30131: SzBadInputError, # EAS_ERR_UNKNOWN_COLUMN_REQUESTED_FOR_CSV_EXPORT "Invalid column [{0}] requested for CSV export."
+}
+# fmt: on
+
+
+# -----------------------------------------------------------------------------
+# ErrorBuffer class
+# -----------------------------------------------------------------------------
+
+
+class ErrorBuffer(threading.local):
+ """Buffer to call C"""
+
+ # pylint: disable=R0903
+
+ def __init__(self) -> None:
+ super().__init__()
+ self.string_buffer = create_string_buffer(65535)
+ self.string_buffer_size = sizeof(self.string_buffer)
+
+
+ERROR_BUFFER = ErrorBuffer()
+ERROR_BUFFER_TYPE = c_char * 65535
+
+
+# -----------------------------------------------------------------------------
+# Helper functions to create a senzing-specific Exception
+# -----------------------------------------------------------------------------
+
+
+def get_location() -> str:
+ """
+ Determine caller.
+
+ :meta private:
+ """
+ stack = traceback.format_stack()
+ return stack[0].replace("\n ", "", 1).rstrip()
+
+
+def get_message_level(error_id: int) -> str:
+ """
+ Determine the severity of the error.
+
+ :meta private:
+ """
+ error_levels = {
+ 6000: "PANIC",
+ 5000: "FATAL",
+ 4000: "ERROR",
+ 3000: "WARN",
+ 2000: "INFO",
+ 1000: "DEBUG",
+ 0: "TRACE",
+ }
+ for error_level, error_message in error_levels.items():
+ if error_id > error_level:
+ return error_message
+ return "PANIC"
+
+
+def get_message_text(error_id: int, id_messages: Dict[int, str], *args: Any) -> str:
+ """
+ Format the message text from a template and variables.
+
+ :meta private:
+ """
+ return id_messages.get(error_id, f"No message for index {error_id}.").format(*args)
+
+
+def get_senzing_error_code(error_text: str) -> int:
+ """
+ Given an exception string, find the exception code.
+
+ :meta private:
+ """
+ if len(error_text) == 0:
+ return 0
+ exception_message_splits = error_text.split("|", 1)
+ try:
+ result = int(exception_message_splits[0].strip().rstrip("EIW"))
+ except ValueError:
+ print("ERROR: Could not parse error text '{error_text}'")
+ result = 9999
+ assert isinstance(result, int)
+ return result
+
+
+def get_senzing_error_text(
+ get_last_exception: Callable[[ERROR_BUFFER_TYPE, int], str], # type: ignore
+ clear_last_exception: Callable[[], None],
+) -> str:
+ """
+ Get the last exception from the Senzing engine.
+
+ :meta private:
+ """
+ get_last_exception(
+ ERROR_BUFFER.string_buffer,
+ sizeof(ERROR_BUFFER.string_buffer),
+ )
+ clear_last_exception()
+ result = ERROR_BUFFER.string_buffer.value.decode()
+ assert isinstance(result, str)
+ return result
+
+
+def new_szexception(
+ get_last_exception: Callable[[ERROR_BUFFER_TYPE, int], str], # type: ignore
+ clear_last_exception: Callable[[], None],
+ product_id: str,
+ error_id: int,
+ id_messages: Dict[int, str],
+ *args: Any,
+) -> Exception:
+ """
+ Generate a new Senzing Exception based on the error_id.
+
+ :meta private:
+ """
+ senzing_error_text = get_senzing_error_text(
+ get_last_exception, clear_last_exception
+ )
+ senzing_error_code = get_senzing_error_code(senzing_error_text)
+ message = {
+ "time": datetime.datetime.utcnow().isoformat("T"),
+ "text": get_message_text(error_id, id_messages, *args),
+ "level": get_message_level(error_id),
+ "id": f"senzing-{product_id}{error_id:4d}",
+ "location": get_location(),
+ "errorCode": senzing_error_code,
+ "errorText": senzing_error_text,
+ "details": args,
+ }
+ senzing_error_class = EXCEPTION_MAP.get(senzing_error_code, SzError)
+ return senzing_error_class(json.dumps(message))
+
+#! /usr/bin/env python3
+
+"""
+TODO: szhasher_abstract.py
+"""
+
+from abc import ABC, abstractmethod
+from typing import Any
+
+# Metadata
+
+__all__ = ["SzHasherAbstract"]
+__version__ = "0.0.1" # See https://www.python.org/dev/peps/pep-0396/
+__date__ = "2023-10-30"
+__updated__ = "2023-10-30"
+
+# -----------------------------------------------------------------------------
+# SzHasherAbstract
+# -----------------------------------------------------------------------------
+
+
+
+[docs]
+class SzHasherAbstract(ABC):
+ """
+ SzHasher module access library
+ """
+
+ # -------------------------------------------------------------------------
+ # Messages
+ # -------------------------------------------------------------------------
+
+ PREFIX = "szhasher."
+ ID_MESSAGES = {0: ""}
+
+ # -------------------------------------------------------------------------
+ # Interface definition
+ # -------------------------------------------------------------------------
+
+
+[docs]
+ @abstractmethod
+ def destroy(self, *args: Any, **kwargs: Any) -> None:
+ """TODO: document"""
+
+
+
+[docs]
+ @abstractmethod
+ def export_token_library(self, *args: Any, **kwargs: Any) -> str:
+ """TODO: document"""
+
+
+
+[docs]
+ @abstractmethod
+ def init(
+ self, module_name: str, ini_params: str, verbose_logging: int = 0, **kwargs: Any
+ ) -> None:
+ """TODO: document"""
+
+
+
+[docs]
+ @abstractmethod
+ def init_with_config_id(
+ self,
+ module_name: str,
+ ini_params: str,
+ init_config_id: int,
+ verbose_logging: int = 0,
+ **kwargs: Any
+ ) -> None:
+ """TODO: document"""
+
+
+
+[docs]
+ @abstractmethod
+ def process(self, record: str, *args: Any, **kwargs: Any) -> str:
+ """TODO: document"""
+
+
+
+[docs]
+ @abstractmethod
+ def reinit(self, init_config_id: int, *args: Any, **kwargs: Any) -> None:
+ """TODO: document"""
+
+
+
+ # -------------------------------------------------------------------------
+ # Convenience methods
+ # -------------------------------------------------------------------------
+
+#! /usr/bin/env python3
+
+"""
+szproduct_abstract.py is the abstract class for all implementations of szproduct.
+"""
+
+# TODO: Determine specific SzError, Errors for "Raises:" documentation.
+import json
+from abc import ABC, abstractmethod
+from typing import Any, Dict, Union, cast
+
+# Metadata
+
+__all__ = ["SzProductAbstract"]
+__version__ = "0.0.1" # See https://www.python.org/dev/peps/pep-0396/
+__date__ = "2023-10-30"
+__updated__ = "2023-11-27"
+
+# -----------------------------------------------------------------------------
+# SzProductAbstract
+# -----------------------------------------------------------------------------
+
+
+
+[docs]
+class SzProductAbstract(ABC):
+ """
+ SzProductAbstract is the definition of the Senzing Python API that is
+ implemented by packages such as szproduct.py.
+ """
+
+ # -------------------------------------------------------------------------
+ # Messages
+ # -------------------------------------------------------------------------
+
+ PREFIX = "szproduct."
+ ID_MESSAGES = {
+ 4001: PREFIX + "destroy() failed. Return code: {0}",
+ 4002: PREFIX + "initialize({0}, {1}, {2}) failed. Return code: {3}",
+ 4003: PREFIX
+ + "SzProduct({0}, {1}) failed. instance_name and settings must both be set or both be empty",
+ }
+
+ # -------------------------------------------------------------------------
+ # Interface definition
+ # -------------------------------------------------------------------------
+
+
+[docs]
+ @abstractmethod
+ def destroy(self, **kwargs: Any) -> None:
+ """
+ The `destroy` method will destroy and perform cleanup for the Senzing SzProduct object.
+ It should be called after all other calls are complete.
+
+ **Note:** If the `SzProduct` constructor was called with parameters,
+ the destructor will automatically call the destroy() method.
+ In this case, a separate call to `destroy()` is not needed.
+
+ Raises:
+ szexception.SzError:
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szproduct/szproduct_initialize_and_destroy.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def initialize(
+ self,
+ instance_name: str,
+ settings: Union[str, Dict[Any, Any]],
+ verbose_logging: int = 0,
+ **kwargs: Any
+ ) -> None:
+ """
+ The `initialize` method initializes the Senzing SzProduct object.
+ It must be called prior to any other calls.
+
+ **Note:** If the SzProduct constructor is called with parameters,
+ the constructor will automatically call the `initialize()` method.
+ In this case, a separate call to `initialize()` is not needed.
+
+ Args:
+ instance_name (str): A short name given to this instance of the SzProduct object, to help identify it within system logs.
+ settings (str): A JSON string containing configuration parameters.
+ verbose_logging (int): `Optional:` A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
+
+ Raises:
+ TypeError: Incorrect datatype of input parameter.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szproduct/szproduct_initialize_and_destroy.py
+ :linenos:
+ :language: python
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def get_license(self, **kwargs: Any) -> str:
+ """
+ The `get_license` method retrieves information about the currently used license by the Senzing API.
+
+ Returns:
+ str: A JSON document containing Senzing license metadata.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szproduct/get_license.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szproduct/get_license.txt
+ :linenos:
+ :language: json
+ """
+
+
+
+[docs]
+ @abstractmethod
+ def get_version(self, **kwargs: Any) -> str:
+ """
+ The `get_version` method returns the version of the Senzing API.
+
+ Returns:
+ str: A JSON document containing metadata about the Senzing Engine version being used.
+
+ .. collapse:: Example:
+
+ .. literalinclude:: ../../examples/szproduct/get_version.py
+ :linenos:
+ :language: python
+
+ **Output:**
+
+ .. literalinclude:: ../../examples/szproduct/get_version.txt
+ :linenos:
+ :language: json
+ """
+
+
+ # -------------------------------------------------------------------------
+ # Convenience methods
+ # -------------------------------------------------------------------------
+
+
+[docs]
+ def license_as_dict(self, **kwargs: Any) -> Dict[str, Any]:
+ """
+ A convenience method for
+ :meth:`senzing_abstract.SzProductAbstract.get_license`
+
+ Returns:
+ Dict[str, Any]: A dictionary containing Senzing license metadata.
+ """
+ return cast(
+ Dict[str, Any],
+ json.loads(self.get_license(**kwargs)),
+ )
+
+
+
+[docs]
+ def version_as_dict(self, **kwargs: Any) -> Dict[str, Any]:
+ """
+ A convenience method for
+ :meth:`senzing_abstract.SzProductAbstract.get_version`
+
+ Returns:
+ Dict[str, Any]: A dictionary containing metadata about the Senzing Engine version being used.
+ """
+ return cast(
+ Dict[str, Any],
+ json.loads(self.get_version(**kwargs)),
+ )
+
+
+
' + + '' + + _("Hide Search Matches") + + "
" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/genindex.html b/genindex.html new file mode 100644 index 0000000..8b56e64 --- /dev/null +++ b/genindex.html @@ -0,0 +1,1330 @@ + + + + + ++ | + |
+ | + |
+ | + |
+ | + |
+ |
+ |
+ | + |
SzConfigAbstract
SzConfigAbstract.ID_MESSAGES
SzConfigAbstract.PREFIX
SzConfigAbstract.add_data_source()
SzConfigAbstract.close_config()
SzConfigAbstract.create_config()
SzConfigAbstract.delete_data_source()
SzConfigAbstract.destroy()
SzConfigAbstract.export_config()
SzConfigAbstract.get_data_sources()
SzConfigAbstract.import_config()
SzConfigAbstract.initialize()
SzConfigManagerAbstract
SzConfigManagerAbstract.ID_MESSAGES
SzConfigManagerAbstract.PREFIX
SzConfigManagerAbstract.add_config()
SzConfigManagerAbstract.destroy()
SzConfigManagerAbstract.get_config()
SzConfigManagerAbstract.get_config_list()
SzConfigManagerAbstract.get_default_config_id()
SzConfigManagerAbstract.initialize()
SzConfigManagerAbstract.replace_default_config_id()
SzConfigManagerAbstract.set_default_config_id()
SzDiagnosticAbstract
SzDiagnosticAbstract.ID_MESSAGES
SzDiagnosticAbstract.PREFIX
SzDiagnosticAbstract.check_datastore_performance()
SzDiagnosticAbstract.destroy()
SzDiagnosticAbstract.get_datastore_info()
SzDiagnosticAbstract.get_feature()
SzDiagnosticAbstract.initialize()
SzDiagnosticAbstract.purge_repository()
SzDiagnosticAbstract.reinitialize()
SzEngineAbstract
SzEngineAbstract.add_record()
SzEngineAbstract.add_record_return_dict()
SzEngineAbstract.close_export()
SzEngineAbstract.count_redo_records()
SzEngineAbstract.delete_record()
SzEngineAbstract.delete_record_return_dict()
SzEngineAbstract.destroy()
SzEngineAbstract.export_csv_entity_report()
SzEngineAbstract.export_json_entity_report()
SzEngineAbstract.fetch_next()
SzEngineAbstract.find_interesting_entities_by_entity_id()
SzEngineAbstract.find_interesting_entities_by_entity_id_return_dict()
SzEngineAbstract.find_interesting_entities_by_record_id()
SzEngineAbstract.find_interesting_entities_by_record_id_return_dict()
SzEngineAbstract.find_network_by_entity_id()
SzEngineAbstract.find_network_by_entity_id_return_dict()
SzEngineAbstract.find_network_by_record_id()
SzEngineAbstract.find_network_by_record_id_return_dict()
SzEngineAbstract.find_path_by_entity_id()
SzEngineAbstract.find_path_by_entity_id_return_dict()
SzEngineAbstract.find_path_by_record_id()
SzEngineAbstract.find_path_by_record_id_return_dict()
SzEngineAbstract.get_active_config_id()
SzEngineAbstract.get_entity_by_entity_id()
SzEngineAbstract.get_entity_by_entity_id_return_dict()
SzEngineAbstract.get_entity_by_record_id()
SzEngineAbstract.get_entity_by_record_id_return_dict()
SzEngineAbstract.get_record()
SzEngineAbstract.get_record_return_dict()
SzEngineAbstract.get_redo_record()
SzEngineAbstract.get_repository_last_modified_time()
SzEngineAbstract.get_stats()
SzEngineAbstract.get_stats_return_dict()
SzEngineAbstract.get_virtual_entity_by_record_id()
SzEngineAbstract.get_virtual_entity_by_record_id_return_dict()
SzEngineAbstract.how_entity_by_entity_id()
SzEngineAbstract.how_entity_by_entity_id_return_dict()
SzEngineAbstract.initialize()
SzEngineAbstract.prime_engine()
SzEngineAbstract.process_redo_record()
SzEngineAbstract.reevaluate_entity()
SzEngineAbstract.reevaluate_entity_return_dict()
SzEngineAbstract.reevaluate_record()
SzEngineAbstract.reevaluate_record_return_dict()
SzEngineAbstract.reinitialize()
SzEngineAbstract.search_by_attributes()
SzEngineAbstract.search_by_attributes_return_dict()
SzEngineAbstract.why_entities()
SzEngineAbstract.why_entities_return_dict()
SzEngineAbstract.why_record_in_entity()
SzEngineAbstract.why_record_in_entity_return_dict()
SzEngineAbstract.why_records()
SzEngineAbstract.why_records_return_dict()
SzEngineFlags
SzEngineFlags.SZ_ENTITY_BRIEF_DEFAULT_FLAGS
SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS
SzEngineFlags.SZ_ENTITY_INCLUDE_ALL_FEATURES
SzEngineFlags.SZ_ENTITY_INCLUDE_ALL_RELATIONS
SzEngineFlags.SZ_ENTITY_INCLUDE_DISCLOSED_RELATIONS
SzEngineFlags.SZ_ENTITY_INCLUDE_ENTITY_NAME
SzEngineFlags.SZ_ENTITY_INCLUDE_NAME_ONLY_RELATIONS
SzEngineFlags.SZ_ENTITY_INCLUDE_POSSIBLY_RELATED_RELATIONS
SzEngineFlags.SZ_ENTITY_INCLUDE_POSSIBLY_SAME_RELATIONS
SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_DATA
SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_FEATURE_IDS
SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_JSON_DATA
SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_MATCHING_INFO
SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_SUMMARY
SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_TYPES
SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_UNMAPPED_DATA
SzEngineFlags.SZ_ENTITY_INCLUDE_RELATED_ENTITY_NAME
SzEngineFlags.SZ_ENTITY_INCLUDE_RELATED_MATCHING_INFO
SzEngineFlags.SZ_ENTITY_INCLUDE_RELATED_RECORD_DATA
SzEngineFlags.SZ_ENTITY_INCLUDE_RELATED_RECORD_SUMMARY
SzEngineFlags.SZ_ENTITY_INCLUDE_REPRESENTATIVE_FEATURES
SzEngineFlags.SZ_ENTITY_OPTION_INCLUDE_FEATURE_ELEMENTS
SzEngineFlags.SZ_ENTITY_OPTION_INCLUDE_FEATURE_STATS
SzEngineFlags.SZ_ENTITY_OPTION_INCLUDE_INTERNAL_FEATURES
SzEngineFlags.SZ_ENTITY_OPTION_INCLUDE_MATCH_KEY_DETAILS
SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS
SzEngineFlags.SZ_EXPORT_INCLUDE_ALL_ENTITIES
SzEngineFlags.SZ_EXPORT_INCLUDE_ALL_HAVING_RELATIONSHIPS
SzEngineFlags.SZ_EXPORT_INCLUDE_DISCLOSED
SzEngineFlags.SZ_EXPORT_INCLUDE_MULTI_RECORD_ENTITIES
SzEngineFlags.SZ_EXPORT_INCLUDE_NAME_ONLY
SzEngineFlags.SZ_EXPORT_INCLUDE_POSSIBLY_RELATED
SzEngineFlags.SZ_EXPORT_INCLUDE_POSSIBLY_SAME
SzEngineFlags.SZ_EXPORT_INCLUDE_SINGLE_RECORD_ENTITIES
SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS
SzEngineFlags.SZ_FIND_NETWORK_MATCHING_INFO
SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS
SzEngineFlags.SZ_FIND_PATH_MATCHING_INFO
SzEngineFlags.SZ_FIND_PATH_PREFER_EXCLUDE
SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS
SzEngineFlags.SZ_INCLUDE_FEATURE_SCORES
SzEngineFlags.SZ_INITIALIZE_WITH_DEFAULT_CONFIGURATION
SzEngineFlags.SZ_NO_FLAGS
SzEngineFlags.SZ_NO_LOGGING
SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS
SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_ALL
SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS
SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_MINIMAL_ALL
SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_MINIMAL_STRONG
SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_STRONG
SzEngineFlags.SZ_SEARCH_INCLUDE_ALL_ENTITIES
SzEngineFlags.SZ_SEARCH_INCLUDE_FEATURE_SCORES
SzEngineFlags.SZ_SEARCH_INCLUDE_MATCH_KEY_DETAILS
SzEngineFlags.SZ_SEARCH_INCLUDE_NAME_ONLY
SzEngineFlags.SZ_SEARCH_INCLUDE_POSSIBLY_RELATED
SzEngineFlags.SZ_SEARCH_INCLUDE_POSSIBLY_SAME
SzEngineFlags.SZ_SEARCH_INCLUDE_RESOLVED
SzEngineFlags.SZ_SEARCH_INCLUDE_STATS
SzEngineFlags.SZ_VERBOSE_LOGGING
SzEngineFlags.SZ_VIRTUAL_ENTITY_DEFAULT_FLAGS
SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS
SzEngineFlags.SZ_WHY_RECORDS_DEFAULT_FLAGS
SzEngineFlags.SZ_WHY_RECORD_IN_ENTITY_DEFAULT_FLAGS
SzEngineFlags.SZ_WITHOUT_INFO
SzEngineFlags.SZ_WITH_INFO
SzEngineFlags.combine_flags()
SzBadInputError
SzConfigAbstract
SzConfigAbstract.ID_MESSAGES
SzConfigAbstract.PREFIX
SzConfigAbstract.add_data_source()
SzConfigAbstract.close_config()
SzConfigAbstract.create_config()
SzConfigAbstract.delete_data_source()
SzConfigAbstract.destroy()
SzConfigAbstract.export_config()
SzConfigAbstract.get_data_sources()
SzConfigAbstract.import_config()
SzConfigAbstract.initialize()
SzConfigManagerAbstract
SzConfigManagerAbstract.ID_MESSAGES
SzConfigManagerAbstract.PREFIX
SzConfigManagerAbstract.add_config()
SzConfigManagerAbstract.destroy()
SzConfigManagerAbstract.get_config()
SzConfigManagerAbstract.get_config_list()
SzConfigManagerAbstract.get_default_config_id()
SzConfigManagerAbstract.initialize()
SzConfigManagerAbstract.replace_default_config_id()
SzConfigManagerAbstract.set_default_config_id()
SzConfigurationError
SzDatabaseConnectionLostError
SzDatabaseError
SzDiagnosticAbstract
SzDiagnosticAbstract.ID_MESSAGES
SzDiagnosticAbstract.PREFIX
SzDiagnosticAbstract.check_datastore_performance()
SzDiagnosticAbstract.destroy()
SzDiagnosticAbstract.get_datastore_info()
SzDiagnosticAbstract.get_feature()
SzDiagnosticAbstract.initialize()
SzDiagnosticAbstract.purge_repository()
SzDiagnosticAbstract.reinitialize()
SzEngineAbstract
SzEngineAbstract.add_record()
SzEngineAbstract.add_record_return_dict()
SzEngineAbstract.close_export()
SzEngineAbstract.count_redo_records()
SzEngineAbstract.delete_record()
SzEngineAbstract.delete_record_return_dict()
SzEngineAbstract.destroy()
SzEngineAbstract.export_csv_entity_report()
SzEngineAbstract.export_json_entity_report()
SzEngineAbstract.fetch_next()
SzEngineAbstract.find_interesting_entities_by_entity_id()
SzEngineAbstract.find_interesting_entities_by_entity_id_return_dict()
SzEngineAbstract.find_interesting_entities_by_record_id()
SzEngineAbstract.find_interesting_entities_by_record_id_return_dict()
SzEngineAbstract.find_network_by_entity_id()
SzEngineAbstract.find_network_by_entity_id_return_dict()
SzEngineAbstract.find_network_by_record_id()
SzEngineAbstract.find_network_by_record_id_return_dict()
SzEngineAbstract.find_path_by_entity_id()
SzEngineAbstract.find_path_by_entity_id_return_dict()
SzEngineAbstract.find_path_by_record_id()
SzEngineAbstract.find_path_by_record_id_return_dict()
SzEngineAbstract.get_active_config_id()
SzEngineAbstract.get_entity_by_entity_id()
SzEngineAbstract.get_entity_by_entity_id_return_dict()
SzEngineAbstract.get_entity_by_record_id()
SzEngineAbstract.get_entity_by_record_id_return_dict()
SzEngineAbstract.get_record()
SzEngineAbstract.get_record_return_dict()
SzEngineAbstract.get_redo_record()
SzEngineAbstract.get_repository_last_modified_time()
SzEngineAbstract.get_stats()
SzEngineAbstract.get_stats_return_dict()
SzEngineAbstract.get_virtual_entity_by_record_id()
SzEngineAbstract.get_virtual_entity_by_record_id_return_dict()
SzEngineAbstract.how_entity_by_entity_id()
SzEngineAbstract.how_entity_by_entity_id_return_dict()
SzEngineAbstract.initialize()
SzEngineAbstract.prime_engine()
SzEngineAbstract.process_redo_record()
SzEngineAbstract.reevaluate_entity()
SzEngineAbstract.reevaluate_entity_return_dict()
SzEngineAbstract.reevaluate_record()
SzEngineAbstract.reevaluate_record_return_dict()
SzEngineAbstract.reinitialize()
SzEngineAbstract.search_by_attributes()
SzEngineAbstract.search_by_attributes_return_dict()
SzEngineAbstract.why_entities()
SzEngineAbstract.why_entities_return_dict()
SzEngineAbstract.why_record_in_entity()
SzEngineAbstract.why_record_in_entity_return_dict()
SzEngineAbstract.why_records()
SzEngineAbstract.why_records_return_dict()
SzEngineFlags
SzEngineFlags.SZ_ENTITY_BRIEF_DEFAULT_FLAGS
SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS
SzEngineFlags.SZ_ENTITY_INCLUDE_ALL_FEATURES
SzEngineFlags.SZ_ENTITY_INCLUDE_ALL_RELATIONS
SzEngineFlags.SZ_ENTITY_INCLUDE_DISCLOSED_RELATIONS
SzEngineFlags.SZ_ENTITY_INCLUDE_ENTITY_NAME
SzEngineFlags.SZ_ENTITY_INCLUDE_NAME_ONLY_RELATIONS
SzEngineFlags.SZ_ENTITY_INCLUDE_POSSIBLY_RELATED_RELATIONS
SzEngineFlags.SZ_ENTITY_INCLUDE_POSSIBLY_SAME_RELATIONS
SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_DATA
SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_FEATURE_IDS
SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_JSON_DATA
SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_MATCHING_INFO
SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_SUMMARY
SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_TYPES
SzEngineFlags.SZ_ENTITY_INCLUDE_RECORD_UNMAPPED_DATA
SzEngineFlags.SZ_ENTITY_INCLUDE_RELATED_ENTITY_NAME
SzEngineFlags.SZ_ENTITY_INCLUDE_RELATED_MATCHING_INFO
SzEngineFlags.SZ_ENTITY_INCLUDE_RELATED_RECORD_DATA
SzEngineFlags.SZ_ENTITY_INCLUDE_RELATED_RECORD_SUMMARY
SzEngineFlags.SZ_ENTITY_INCLUDE_REPRESENTATIVE_FEATURES
SzEngineFlags.SZ_ENTITY_OPTION_INCLUDE_FEATURE_ELEMENTS
SzEngineFlags.SZ_ENTITY_OPTION_INCLUDE_FEATURE_STATS
SzEngineFlags.SZ_ENTITY_OPTION_INCLUDE_INTERNAL_FEATURES
SzEngineFlags.SZ_ENTITY_OPTION_INCLUDE_MATCH_KEY_DETAILS
SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS
SzEngineFlags.SZ_EXPORT_INCLUDE_ALL_ENTITIES
SzEngineFlags.SZ_EXPORT_INCLUDE_ALL_HAVING_RELATIONSHIPS
SzEngineFlags.SZ_EXPORT_INCLUDE_DISCLOSED
SzEngineFlags.SZ_EXPORT_INCLUDE_MULTI_RECORD_ENTITIES
SzEngineFlags.SZ_EXPORT_INCLUDE_NAME_ONLY
SzEngineFlags.SZ_EXPORT_INCLUDE_POSSIBLY_RELATED
SzEngineFlags.SZ_EXPORT_INCLUDE_POSSIBLY_SAME
SzEngineFlags.SZ_EXPORT_INCLUDE_SINGLE_RECORD_ENTITIES
SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS
SzEngineFlags.SZ_FIND_NETWORK_MATCHING_INFO
SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS
SzEngineFlags.SZ_FIND_PATH_MATCHING_INFO
SzEngineFlags.SZ_FIND_PATH_PREFER_EXCLUDE
SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS
SzEngineFlags.SZ_INCLUDE_FEATURE_SCORES
SzEngineFlags.SZ_INITIALIZE_WITH_DEFAULT_CONFIGURATION
SzEngineFlags.SZ_NO_FLAGS
SzEngineFlags.SZ_NO_LOGGING
SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS
SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_ALL
SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS
SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_MINIMAL_ALL
SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_MINIMAL_STRONG
SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_STRONG
SzEngineFlags.SZ_SEARCH_INCLUDE_ALL_ENTITIES
SzEngineFlags.SZ_SEARCH_INCLUDE_FEATURE_SCORES
SzEngineFlags.SZ_SEARCH_INCLUDE_MATCH_KEY_DETAILS
SzEngineFlags.SZ_SEARCH_INCLUDE_NAME_ONLY
SzEngineFlags.SZ_SEARCH_INCLUDE_POSSIBLY_RELATED
SzEngineFlags.SZ_SEARCH_INCLUDE_POSSIBLY_SAME
SzEngineFlags.SZ_SEARCH_INCLUDE_RESOLVED
SzEngineFlags.SZ_SEARCH_INCLUDE_STATS
SzEngineFlags.SZ_VERBOSE_LOGGING
SzEngineFlags.SZ_VIRTUAL_ENTITY_DEFAULT_FLAGS
SzEngineFlags.SZ_WHY_ENTITIES_DEFAULT_FLAGS
SzEngineFlags.SZ_WHY_RECORDS_DEFAULT_FLAGS
SzEngineFlags.SZ_WHY_RECORD_IN_ENTITY_DEFAULT_FLAGS
SzEngineFlags.SZ_WITHOUT_INFO
SzEngineFlags.SZ_WITH_INFO
SzEngineFlags.combine_flags()
SzError
SzHasherAbstract
+SzLicenseError
SzNotFoundError
SzNotInitializedError
SzProductAbstract
+SzRetryTimeoutExceededError
SzRetryableError
SzUnhandledError
SzUnknownDataSourceError
SzUnrecoverableError
+ s | ||
+ |
+ senzing_abstract | + |
+ |
+ senzing_abstract.szconfig_abstract | + |
+ |
+ senzing_abstract.szconfigmanager_abstract | + |
+ |
+ senzing_abstract.szdiagnostic_abstract | + |
+ |
+ senzing_abstract.szengine_abstract | + |
+ |
+ senzing_abstract.szengineflags | + |
+ |
+ senzing_abstract.szhasher_abstract | + |
+ |
+ senzing_abstract.szproduct_abstract | + |
szconfig_abstract.py is the abstract class for all implementations of szconfig.
+Bases: ABC
SzConfigAbstract is the definition of the Senzing Python API that is +implemented by packages such as szconfig.py.
+The add_data_source method adds a data source to an existing in-memory configuration.
+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.
A string containing a JSON document listing the newly created data source.
+str
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
Output:
+1// Output has been formatted for easier reading.
+2
+3{
+4 "DSRC_ID": 1001
+5}
+
The close_config method cleans up the Senzing SzConfig object pointed to by the config_handle.
+config_handle (int) – An identifier of an in-memory configuration. Usually created by the create_config or import_config methods.
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
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.
+A pointer to an in-memory Senzing configuration.
+int
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
The delete_data_source method removes a data source from an existing in-memory configuration.
+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.
TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
The destroy method will destroy and perform cleanup for the Senzing SzConfig object. +It should be called after all other calls are complete.
+Note: If the SzConfig constructor was called with parameters, +the destructor will automatically call the destroy() method. +In this case, a separate call to destroy() is not needed.
+1#! /usr/bin/env python3
+
The export_config method creates a JSON string representation of the Senzing SzConfig object.
+config_handle (int) – An identifier of an in-memory configuration. Usually created by the create or load methods
+A string containing a JSON Document representation of the Senzing SzConfig object.
+str
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
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
+
The get_data_sources method returns a JSON document of data sources +contained in an in-memory configuration.
+config_handle (int) – An identifier of an in-memory configuration. Usually created by the create or load methods
+A string containing a JSON document listing all of the data sources.
+str
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
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}
+
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.
+config_definition (Union[str, Dict[Any, Any]]) – A JSON document containing the Senzing configuration.
+An identifier (config_handle) of an in-memory configuration.
+int
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
Create, save, load, and close
+1#! /usr/bin/env python3
+
The initialize method initializes the Senzing SzConfig object. +It must be called prior to any other calls.
+Note: If the SzConfig constructor is called with parameters, +the constructor will automatically call the initialize() method. +In this case, a separate call to initialize() is not needed.
+instance_name (str) – A short name given to this instance of the SzConfig object, to help identify it within system logs.
settings (Union[str, Dict[Any, Any]]) – A JSON string containing configuration parameters.
verbose_logging (int) – Optional: A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
szconfigmanager_abstract.py is the abstract class for all implementations of szconfigmanager.
+Bases: ABC
SzConfigManagerAbstract is the definition of the Senzing Python API that is +implemented by packages such as szconfigmanager.py.
+The add_config method adds a Senzing configuration JSON document to the Senzing database.
+config_definition (Union[str, Dict[Any, Any]]) – The Senzing configuration JSON document.
config_comment (str) – free-form string of comments describing the configuration document.
A configuration identifier.
+int
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
The destroy method will destroy and perform cleanup for the Senzing SzConfigManager object. +It should be called after all other calls are complete.
+Note: If the SzConfigManager constructor was called with parameters, +the destructor will automatically call the destroy() method. +In this case, a separate call to destroy() is not needed.
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
The get_config method retrieves a specific Senzing configuration JSON document from the Senzing database.
+config_id (int) – The configuration identifier of the desired Senzing Engine configuration JSON document to retrieve.
+A JSON document containing the Senzing configuration.
+str
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
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}
+
The get_config_list method retrieves a list of Senzing configurations from the Senzing database.
+A JSON document containing Senzing configurations.
+str
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
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": "2023-02-16 16:03:40.338"
+ 9 },
+10 {
+11 "CONFIG_ID": 490826130,
+12 "CONFIG_COMMENTS": "Test",
+13 "SYS_CREATE_DT": "2023-11-09 19:13:30.923"
+14 }
+15 ]
+16}
+
The get_default_config_id method retrieves from the Senzing database the configuration identifier of the default Senzing configuration.
+A configuration identifier which identifies the current configuration in use.
+int
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
The initialize method initializes the Senzing SzConfigManager object. +It must be called prior to any other calls.
+Note: If the SzConfigManager constructor is called with parameters, +the constructor will automatically call the initialize() method. +In this case, a separate call to initialize() is not needed.
+instance_name (str) – A short name given to this instance of the SzProduct object, to help identify it within system logs.
settings (Union[str, Dict[Any, Any]]) – A JSON string containing configuration parameters.
verbose_logging (int) – Optional: A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
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.
+current_default_config_id (int) – The configuration identifier to replace.
new_default_config_id (int) – The configuration identifier to use as the default.
TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
The set_default_config_id method replaces the sets a new configuration identifier in the Senzing database. +To serialize modifying of the configuration identifier, see replace_default_config_id.
+config_id (int) – The configuration identifier of the Senzing Engine configuration to use as the default.
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
TODO: szdiagnostic_abstract.py
+Bases: ABC
Senzing diagnostic module access library
+The check_datastore_performance method performs inserts to determine rate of insertion.
+seconds_to_run (int) – Duration of the test in seconds.
+A string containing a JSON document.
+str
+TypeError – Incorrect datatype of input parameter.
szexception.SzError –
1#! /usr/bin/env python3
+
Output:
+1// Just example numbers. Your mileage may vary.
+2
+3{
+4 "numRecordsInserted": 200000,
+5 "insertTime": 3000
+6}
+
The destroy method will destroy and perform cleanup for the Senzing SzDiagnostic object. +It should be called after all other calls are complete.
+Note: If the SzDiagnostic constructor was called with parameters, +the destructor will automatically call the destroy() method. +In this case, a separate call to destroy() is not needed.
+szexception.SzError –
+1#! /usr/bin/env python3
+
The get_datastore_info method will…
+szexception.SzError –
+1#! /usr/bin/env python3
+
Output:
+1{
+2 "Hybrid Mode": false,
+3 "Database Details": [
+4 {
+5 "Name": "/tmp/sqlite/G2C.db",
+6 "Type": "sqlite3"
+7 }
+8 ]
+9}
+
The initialize method initializes the Senzing SzDiagnosis object. +It must be called prior to any other calls.
+Note: If the Sz Diagnosis constructor is called with parameters, +the constructor will automatically call the initialize() method. +In this case, a separate call to initialize() is not needed.
+instance_name (str) – A name for the auditing node, to help identify it within system logs.
settings (Union[str, Dict[Any, Any]]) – A JSON string containing configuration parameters.
config_id (int) – Optional: Initialize with a specific configuration ID and not the current default.
verbose_logging (int) – Optional: A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
TypeError – Incorrect datatype of input parameter.
szexception.SzError –
1#! /usr/bin/env python3
+
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:
+1#! /usr/bin/env python3
+
The reinitialize method re-initializes the Senzing SzDiagnostic object.
+config_id (int) – The configuration ID used for the initialization
+TypeError – Incorrect datatype of input parameter.
szexception.SzError – config_id does not exist.
1#! /usr/bin/env python3
+
TODO: szengine_abstract.py
+Bases: ABC
Senzing engine module access library
+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.
+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 | Dict) – 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.
If flags are set to return the WITH_INFO response a JSON document containing the details, otherwise an empty JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
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.
+export_handle (int) – A handle created by export_json_entity_report or export_csv_entity_report.
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The count_redo_records method returns the number of records in need of redo-ing.
+The number of redo records in Senzing’s redo queue.
+int
+Raises:
+1#! /usr/bin/env python3
+
Output:
+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.
+data_source_code (str) – Identifies the provenance of the data.
record_id (str) – The unique identifier within the records of the same data source.
load_id (str, optional) – An identifier used to distinguish different load batches/sessions. An empty string is acceptable. Defaults to “”.
flags (int, optional) – Flags used to control information returned. Defaults to 0.
If flags are set to return the WITH_INFO response a JSON document containing the details, otherwise an empty JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The destroy method releases resources and performs cleanup for the SzEngine object and any in-memory configurations. +It should be called after all other calls are complete.
+Note: If the SzEngine constructor was called with parameters, +the destructor will automatically call the destroy() method. +In this case, a separate call to destroy() is not needed.
+szexception.SzError –
+1#! /usr/bin/env python3
+
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.
+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.
A handle that identifies the document to be scrolled through using fetch_next.
+int
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
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.
+flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS.
+A handle that identifies the document to be scrolled through using fetch_next.
+int
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
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.
+response_handle (int) – A handle created by export_json_entity_report or export_json_entity_report.
+TODO:
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
T
+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.
+entity_list (str) – A JSON document listing entities.
max_degrees (int) – The maximum number of degrees in paths between search entities.
build_out_degree (int) – The number of degrees of relationships to show around each search entity.
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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
TODO: document
+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.
+record_list (str) – A JSON document listing records.
max_degrees (int) – The maximum number of degrees in paths between search entities.
build_out_degree (int) – The number of degrees of relationships to show around each search entity.
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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
TODO: document
+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.
+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.
exclusions (str) – TODO
required_data_sources (str) – TODO
flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.
A JSON document with an ENTITY_PATHS section that details the path between the entities.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
TODO: document
+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.
+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.
exclusions (str) – TODO
required_data_sources (str) – TODO
flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The get_active_config_id method returns the identifier of the currently active Senzing engine configuration.
+The identifier of the active Senzing Engine configuration.
+int
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The get_entity_by_entity_id method returns entity data based on the ID of a resolved identity.
+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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The get_entity_by_record_id method returns entity data based on the ID of a record which is a member of the entity.
+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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
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.
+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.
A JSON document of a single record.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The get_redo_record method returns the next internally queued redo record from the Senzing repository. +Usually, the process_redo_record or process_redo_record_with_info method is called to process the redo record +retrieved by get_redo_record.
+A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The get_repository_last_modified_time method retrieves the last modified time of the Senzing repository, +measured in the number of seconds between the last modified time and January 1, 1970 12:00am GMT (epoch time).
+A Unix Timestamp.
+int
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The get_stats method retrieves workload statistics for the current process. +These statistics will automatically reset after retrieval.
+A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
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.
+record_list (str) – A JSON document of one or more records by DATA_SOURCE and RECORD_ID pairs, formatted as {“RECORDS”:[{“DATA_SOURCE”:”DS1”,”RECORD_ID”:”R1”},{“DATA_SOURCE”:”DS2”,”RECORD_ID”:”R2”}]}.
flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The how_entity_by_entity_id method determines and details steps-by-step how records resolved to an ENTITY_ID.
+In most cases, how provides more detailed information than why as the resolution is detailed step-by-step.
+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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
he initialize
method initializes the Senzing SzEngine object.
+It must be called prior to any other calls.
Note: If the SzEngine constructor is called with parameters,
+the constructor will automatically call the initialize()
method.
+In this case, a separate call to initialize()
is not needed.
instance_name (str) – A short name given to this instance of the SzEngine object, to help identify it within system logs.
settings (str) – A JSON string containing configuration parameters.
config_id (int)
verbose_logging (int) – Optional: A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
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:
+1#! /usr/bin/env python3
+
#TODO The process_redo_record method…
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The reevaluate_entity method reevaluates the specified entity.
+entity_id (int) – The unique identifier of an entity.
flags (int, optional) – Flags used to control information returned. Defaults to 0.
Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The reevaluate_record method reevaluates a specific record.
+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.
If flags are set to return the WITH_INFO response a JSON document containing the details, otherwise an empty JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The reinitialize method reinitializes the Senzing SzEngine object using a specific configuration +identifier. A list of available configuration identifiers can be retrieved using +szconfigmanager.get_config_list.
+config_id (int) – The configuration ID used for the initialization
+TypeError – Incorrect datatype of input parameter.
szexception.SzError – config_id does not exist.
1#! /usr/bin/env python3
+
The search_by_attributes method retrieves entity data based on a user-specified set of entity attributes.
+attributes (str) – A JSON document with the attribute data to search for.
search_profile (str) – The name of a configured search profile. Defaults to SEARCH.
flags (int, optional) – _description_. Defaults to SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The why_entities method determines why entities did not resolve or why they do relate.
+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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The why_record_in_entity … TODO:
+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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The why_records determines if any two records can or cannot resolve together, or if they relate.
+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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
TODO: szengineflags.py
+Bases: IntFlag
Engine Flags …
+TODO: szhasher_abstract.py
+Bases: ABC
SzHasher module access library
+TODO: document
+szproduct_abstract.py is the abstract class for all implementations of szproduct.
+Bases: ABC
SzProductAbstract is the definition of the Senzing Python API that is +implemented by packages such as szproduct.py.
+The destroy method will destroy and perform cleanup for the Senzing SzProduct object. +It should be called after all other calls are complete.
+Note: If the SzProduct constructor was called with parameters, +the destructor will automatically call the destroy() method. +In this case, a separate call to destroy() is not needed.
+szexception.SzError –
+1#! /usr/bin/env python3
+
The get_license method retrieves information about the currently used license by the Senzing API.
+A JSON document containing Senzing license metadata.
+str
+1#! /usr/bin/env python3
+
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": "2022-11-29",
+ 7 "licenseType": "EVAL (Solely for non-productive use)",
+ 8 "licenseLevel": "STANDARD",
+ 9 "billing": "MONTHLY",
+10 "expireDate": "2023-11-29",
+11 "recordLimit": 50000
+12}
+
The get_version method returns the version of the Senzing API.
+A JSON document containing metadata about the Senzing Engine version being used.
+str
+1#! /usr/bin/env python3
+
Output:
+ 1// Output has been formatted for easier reading.
+ 2
+ 3{
+ 4 "PRODUCT_NAME": "Senzing API",
+ 5 "VERSION": "3.8.0",
+ 6 "BUILD_VERSION": "3.8.0.23303",
+ 7 "BUILD_DATE": "2023-10-30",
+ 8 "BUILD_NUMBER": "2023_10_30__10_45",
+ 9 "COMPATIBILITY_VERSION": {
+10 "CONFIG_VERSION": "10"
+11 },
+12 "SCHEMA_VERSION": {
+13 "ENGINE_SCHEMA_VERSION": "3.8",
+14 "MINIMUM_REQUIRED_SCHEMA_VERSION": "3.0",
+15 "MAXIMUM_REQUIRED_SCHEMA_VERSION": "3.99"
+16 }
+17}
+
The initialize method initializes the Senzing SzProduct object. +It must be called prior to any other calls.
+Note: If the SzProduct constructor is called with parameters, +the constructor will automatically call the initialize() method. +In this case, a separate call to initialize() is not needed.
+instance_name (str) – A short name given to this instance of the SzProduct object, to help identify it within system logs.
settings (str) – A JSON string containing configuration parameters.
verbose_logging (int) – Optional: A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
A convenience method for
+senzing_abstract.SzProductAbstract.get_license()
A dictionary containing Senzing license metadata.
+Dict[str, Any]
+A convenience method for
+senzing_abstract.SzProductAbstract.get_version()
A dictionary containing metadata about the Senzing Engine version being used.
+Dict[str, Any]
+Bases: SzError
The user-supplied input contained an error.
+Bases: ABC
SzConfigAbstract is the definition of the Senzing Python API that is +implemented by packages such as szconfig.py.
+The add_data_source method adds a data source to an existing in-memory configuration.
+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.
A string containing a JSON document listing the newly created data source.
+str
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
Output:
+1// Output has been formatted for easier reading.
+2
+3{
+4 "DSRC_ID": 1001
+5}
+
The close_config method cleans up the Senzing SzConfig object pointed to by the config_handle.
+config_handle (int) – An identifier of an in-memory configuration. Usually created by the create_config or import_config methods.
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
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.
+A pointer to an in-memory Senzing configuration.
+int
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
The delete_data_source method removes a data source from an existing in-memory configuration.
+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.
TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
The destroy method will destroy and perform cleanup for the Senzing SzConfig object. +It should be called after all other calls are complete.
+Note: If the SzConfig constructor was called with parameters, +the destructor will automatically call the destroy() method. +In this case, a separate call to destroy() is not needed.
+1#! /usr/bin/env python3
+
The export_config method creates a JSON string representation of the Senzing SzConfig object.
+config_handle (int) – An identifier of an in-memory configuration. Usually created by the create or load methods
+A string containing a JSON Document representation of the Senzing SzConfig object.
+str
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
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
+
The get_data_sources method returns a JSON document of data sources +contained in an in-memory configuration.
+config_handle (int) – An identifier of an in-memory configuration. Usually created by the create or load methods
+A string containing a JSON document listing all of the data sources.
+str
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
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}
+
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.
+config_definition (Union[str, Dict[Any, Any]]) – A JSON document containing the Senzing configuration.
+An identifier (config_handle) of an in-memory configuration.
+int
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
Create, save, load, and close
+1#! /usr/bin/env python3
+
The initialize method initializes the Senzing SzConfig object. +It must be called prior to any other calls.
+Note: If the SzConfig constructor is called with parameters, +the constructor will automatically call the initialize() method. +In this case, a separate call to initialize() is not needed.
+instance_name (str) – A short name given to this instance of the SzConfig object, to help identify it within system logs.
settings (Union[str, Dict[Any, Any]]) – A JSON string containing configuration parameters.
verbose_logging (int) – Optional: A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
Bases: ABC
SzConfigManagerAbstract is the definition of the Senzing Python API that is +implemented by packages such as szconfigmanager.py.
+The add_config method adds a Senzing configuration JSON document to the Senzing database.
+config_definition (Union[str, Dict[Any, Any]]) – The Senzing configuration JSON document.
config_comment (str) – free-form string of comments describing the configuration document.
A configuration identifier.
+int
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
The destroy method will destroy and perform cleanup for the Senzing SzConfigManager object. +It should be called after all other calls are complete.
+Note: If the SzConfigManager constructor was called with parameters, +the destructor will automatically call the destroy() method. +In this case, a separate call to destroy() is not needed.
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
The get_config method retrieves a specific Senzing configuration JSON document from the Senzing database.
+config_id (int) – The configuration identifier of the desired Senzing Engine configuration JSON document to retrieve.
+A JSON document containing the Senzing configuration.
+str
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
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}
+
The get_config_list method retrieves a list of Senzing configurations from the Senzing database.
+A JSON document containing Senzing configurations.
+str
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
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": "2023-02-16 16:03:40.338"
+ 9 },
+10 {
+11 "CONFIG_ID": 490826130,
+12 "CONFIG_COMMENTS": "Test",
+13 "SYS_CREATE_DT": "2023-11-09 19:13:30.923"
+14 }
+15 ]
+16}
+
The get_default_config_id method retrieves from the Senzing database the configuration identifier of the default Senzing configuration.
+A configuration identifier which identifies the current configuration in use.
+int
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
The initialize method initializes the Senzing SzConfigManager object. +It must be called prior to any other calls.
+Note: If the SzConfigManager constructor is called with parameters, +the constructor will automatically call the initialize() method. +In this case, a separate call to initialize() is not needed.
+instance_name (str) – A short name given to this instance of the SzProduct object, to help identify it within system logs.
settings (Union[str, Dict[Any, Any]]) – A JSON string containing configuration parameters.
verbose_logging (int) – Optional: A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
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.
+current_default_config_id (int) – The configuration identifier to replace.
new_default_config_id (int) – The configuration identifier to use as the default.
TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
The set_default_config_id method replaces the sets a new configuration identifier in the Senzing database. +To serialize modifying of the configuration identifier, see replace_default_config_id.
+config_id (int) – The configuration identifier of the Senzing Engine configuration to use as the default.
+TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
Bases: SzError
The program can provide a remedy and continue.
+Bases: SzRetryableError
Database connection lost
+Bases: SzUnrecoverableError
Database exception
+Bases: ABC
Senzing diagnostic module access library
+The check_datastore_performance method performs inserts to determine rate of insertion.
+seconds_to_run (int) – Duration of the test in seconds.
+A string containing a JSON document.
+str
+TypeError – Incorrect datatype of input parameter.
szexception.SzError –
1#! /usr/bin/env python3
+
Output:
+1// Just example numbers. Your mileage may vary.
+2
+3{
+4 "numRecordsInserted": 200000,
+5 "insertTime": 3000
+6}
+
The destroy method will destroy and perform cleanup for the Senzing SzDiagnostic object. +It should be called after all other calls are complete.
+Note: If the SzDiagnostic constructor was called with parameters, +the destructor will automatically call the destroy() method. +In this case, a separate call to destroy() is not needed.
+szexception.SzError –
+1#! /usr/bin/env python3
+
The get_datastore_info method will…
+szexception.SzError –
+1#! /usr/bin/env python3
+
Output:
+1{
+2 "Hybrid Mode": false,
+3 "Database Details": [
+4 {
+5 "Name": "/tmp/sqlite/G2C.db",
+6 "Type": "sqlite3"
+7 }
+8 ]
+9}
+
The initialize method initializes the Senzing SzDiagnosis object. +It must be called prior to any other calls.
+Note: If the Sz Diagnosis constructor is called with parameters, +the constructor will automatically call the initialize() method. +In this case, a separate call to initialize() is not needed.
+instance_name (str) – A name for the auditing node, to help identify it within system logs.
settings (Union[str, Dict[Any, Any]]) – A JSON string containing configuration parameters.
config_id (int) – Optional: Initialize with a specific configuration ID and not the current default.
verbose_logging (int) – Optional: A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
TypeError – Incorrect datatype of input parameter.
szexception.SzError –
1#! /usr/bin/env python3
+
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:
+1#! /usr/bin/env python3
+
The reinitialize method re-initializes the Senzing SzDiagnostic object.
+config_id (int) – The configuration ID used for the initialization
+TypeError – Incorrect datatype of input parameter.
szexception.SzError – config_id does not exist.
1#! /usr/bin/env python3
+
Bases: ABC
Senzing engine module access library
+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.
+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 | Dict) – 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.
If flags are set to return the WITH_INFO response a JSON document containing the details, otherwise an empty JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
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.
+export_handle (int) – A handle created by export_json_entity_report or export_csv_entity_report.
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The count_redo_records method returns the number of records in need of redo-ing.
+The number of redo records in Senzing’s redo queue.
+int
+Raises:
+1#! /usr/bin/env python3
+
Output:
+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.
+data_source_code (str) – Identifies the provenance of the data.
record_id (str) – The unique identifier within the records of the same data source.
load_id (str, optional) – An identifier used to distinguish different load batches/sessions. An empty string is acceptable. Defaults to “”.
flags (int, optional) – Flags used to control information returned. Defaults to 0.
If flags are set to return the WITH_INFO response a JSON document containing the details, otherwise an empty JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The destroy method releases resources and performs cleanup for the SzEngine object and any in-memory configurations. +It should be called after all other calls are complete.
+Note: If the SzEngine constructor was called with parameters, +the destructor will automatically call the destroy() method. +In this case, a separate call to destroy() is not needed.
+szexception.SzError –
+1#! /usr/bin/env python3
+
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.
+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.
A handle that identifies the document to be scrolled through using fetch_next.
+int
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
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.
+flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_EXPORT_DEFAULT_FLAGS.
+A handle that identifies the document to be scrolled through using fetch_next.
+int
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
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.
+response_handle (int) – A handle created by export_json_entity_report or export_json_entity_report.
+TODO:
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
T
+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.
+entity_list (str) – A JSON document listing entities.
max_degrees (int) – The maximum number of degrees in paths between search entities.
build_out_degree (int) – The number of degrees of relationships to show around each search entity.
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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
TODO: document
+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.
+record_list (str) – A JSON document listing records.
max_degrees (int) – The maximum number of degrees in paths between search entities.
build_out_degree (int) – The number of degrees of relationships to show around each search entity.
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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
TODO: document
+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.
+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.
exclusions (str) – TODO
required_data_sources (str) – TODO
flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.
A JSON document with an ENTITY_PATHS section that details the path between the entities.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
TODO: document
+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.
+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.
exclusions (str) – TODO
required_data_sources (str) – TODO
flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_FIND_PATH_DEFAULT_FLAGS.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The get_active_config_id method returns the identifier of the currently active Senzing engine configuration.
+The identifier of the active Senzing Engine configuration.
+int
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The get_entity_by_entity_id method returns entity data based on the ID of a resolved identity.
+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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The get_entity_by_record_id method returns entity data based on the ID of a record which is a member of the entity.
+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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
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.
+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.
A JSON document of a single record.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The get_redo_record method returns the next internally queued redo record from the Senzing repository. +Usually, the process_redo_record or process_redo_record_with_info method is called to process the redo record +retrieved by get_redo_record.
+A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The get_repository_last_modified_time method retrieves the last modified time of the Senzing repository, +measured in the number of seconds between the last modified time and January 1, 1970 12:00am GMT (epoch time).
+A Unix Timestamp.
+int
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The get_stats method retrieves workload statistics for the current process. +These statistics will automatically reset after retrieval.
+A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
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.
+record_list (str) – A JSON document of one or more records by DATA_SOURCE and RECORD_ID pairs, formatted as {“RECORDS”:[{“DATA_SOURCE”:”DS1”,”RECORD_ID”:”R1”},{“DATA_SOURCE”:”DS2”,”RECORD_ID”:”R2”}]}.
flags (int, optional) – Flags used to control information returned. Defaults to SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The how_entity_by_entity_id method determines and details steps-by-step how records resolved to an ENTITY_ID.
+In most cases, how provides more detailed information than why as the resolution is detailed step-by-step.
+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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
he initialize
method initializes the Senzing SzEngine object.
+It must be called prior to any other calls.
Note: If the SzEngine constructor is called with parameters,
+the constructor will automatically call the initialize()
method.
+In this case, a separate call to initialize()
is not needed.
instance_name (str) – A short name given to this instance of the SzEngine object, to help identify it within system logs.
settings (str) – A JSON string containing configuration parameters.
config_id (int)
verbose_logging (int) – Optional: A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
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:
+1#! /usr/bin/env python3
+
#TODO The process_redo_record method…
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The reevaluate_entity method reevaluates the specified entity.
+entity_id (int) – The unique identifier of an entity.
flags (int, optional) – Flags used to control information returned. Defaults to 0.
Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The reevaluate_record method reevaluates a specific record.
+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.
If flags are set to return the WITH_INFO response a JSON document containing the details, otherwise an empty JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The reinitialize method reinitializes the Senzing SzEngine object using a specific configuration +identifier. A list of available configuration identifiers can be retrieved using +szconfigmanager.get_config_list.
+config_id (int) – The configuration ID used for the initialization
+TypeError – Incorrect datatype of input parameter.
szexception.SzError – config_id does not exist.
1#! /usr/bin/env python3
+
The search_by_attributes method retrieves entity data based on a user-specified set of entity attributes.
+attributes (str) – A JSON document with the attribute data to search for.
search_profile (str) – The name of a configured search profile. Defaults to SEARCH.
flags (int, optional) – _description_. Defaults to SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The why_entities method determines why entities did not resolve or why they do relate.
+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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The why_record_in_entity … TODO:
+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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
The why_records determines if any two records can or cannot resolve together, or if they relate.
+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.
A JSON document.
+str
+Raises:
+1#! /usr/bin/env python3
+
Output:
+1
+
Bases: IntFlag
Engine Flags …
+Bases: Exception
Base exception for Sz related python code.
+Bases: ABC
SzHasher module access library
+TODO: document
+Bases: SzUnrecoverableError
Licence exception
+Bases: SzBadInputError
Not found
+Bases: SzUnrecoverableError
Not initialized
+Bases: ABC
SzProductAbstract is the definition of the Senzing Python API that is +implemented by packages such as szproduct.py.
+The destroy method will destroy and perform cleanup for the Senzing SzProduct object. +It should be called after all other calls are complete.
+Note: If the SzProduct constructor was called with parameters, +the destructor will automatically call the destroy() method. +In this case, a separate call to destroy() is not needed.
+szexception.SzError –
+1#! /usr/bin/env python3
+
The get_license method retrieves information about the currently used license by the Senzing API.
+A JSON document containing Senzing license metadata.
+str
+1#! /usr/bin/env python3
+
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": "2022-11-29",
+ 7 "licenseType": "EVAL (Solely for non-productive use)",
+ 8 "licenseLevel": "STANDARD",
+ 9 "billing": "MONTHLY",
+10 "expireDate": "2023-11-29",
+11 "recordLimit": 50000
+12}
+
The get_version method returns the version of the Senzing API.
+A JSON document containing metadata about the Senzing Engine version being used.
+str
+1#! /usr/bin/env python3
+
Output:
+ 1// Output has been formatted for easier reading.
+ 2
+ 3{
+ 4 "PRODUCT_NAME": "Senzing API",
+ 5 "VERSION": "3.8.0",
+ 6 "BUILD_VERSION": "3.8.0.23303",
+ 7 "BUILD_DATE": "2023-10-30",
+ 8 "BUILD_NUMBER": "2023_10_30__10_45",
+ 9 "COMPATIBILITY_VERSION": {
+10 "CONFIG_VERSION": "10"
+11 },
+12 "SCHEMA_VERSION": {
+13 "ENGINE_SCHEMA_VERSION": "3.8",
+14 "MINIMUM_REQUIRED_SCHEMA_VERSION": "3.0",
+15 "MAXIMUM_REQUIRED_SCHEMA_VERSION": "3.99"
+16 }
+17}
+
The initialize method initializes the Senzing SzProduct object. +It must be called prior to any other calls.
+Note: If the SzProduct constructor is called with parameters, +the constructor will automatically call the initialize() method. +In this case, a separate call to initialize() is not needed.
+instance_name (str) – A short name given to this instance of the SzProduct object, to help identify it within system logs.
settings (str) – A JSON string containing configuration parameters.
verbose_logging (int) – Optional: A flag to enable deeper logging of the Senzing processing. 0 for no Senzing logging; 1 for logging. Default: 0
TypeError – Incorrect datatype of input parameter.
+1#! /usr/bin/env python3
+
A convenience method for
+senzing_abstract.SzProductAbstract.get_license()
A dictionary containing Senzing license metadata.
+Dict[str, Any]
+A convenience method for
+senzing_abstract.SzProductAbstract.get_version()
A dictionary containing metadata about the Senzing Engine version being used.
+Dict[str, Any]
+Bases: SzRetryableError
Retry timeout exceeded time limit
+Bases: SzError
The program can provide a remedy and continue.
+Bases: SzUnrecoverableError
Could not handle exception
+Bases: SzBadInputError
Unknown DataSource
+