You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-59Lines changed: 13 additions & 59 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ To find the Senzing API V3 version of this repository, visit [code-snippets-v3].
9
9
10
10
## Overview
11
11
12
-
Succinct examples of how you might use the Senzing APIs for operational tasks.
12
+
Succinct examples of how you might use the Senzing SDK for operational tasks.
13
13
14
14
## Contents
15
15
@@ -63,15 +63,15 @@ The JSON configuration string is set via the environment variable `SENZING_ENGIN
63
63
64
64
## Senzing APIs Bare Metal Usage
65
65
66
-
You may already have installed the Senzing APIs and created a Senzing project by following the [Quickstart Guide]. If not, and you would like to install the Senzing APIs directly on a machine, follow the steps in the [Quickstart Guide]. Be sure to review the API[Quickstart Roadmap], especially the [System Requirements].
66
+
You may already have installed the Senzing and created a Senzing project by following the [Quickstart Guide]. If not, and you would like to install Senzing directly on a machine, follow the steps in the [Quickstart Guide]. Be sure to review the [Quickstart Roadmap], especially the [System Requirements].
67
67
68
68
### Configuration
69
69
70
70
When using a bare metal install, the initialization parameters used by the Senzing Python utilities are maintained within `<project_path>/etc/G2Module.ini`.
71
71
72
72
🤔To convert an existing Senzing project G2Module.ini file to a JSON string use one of the following methods:
73
73
74
-
-[G2ModuleIniToJson.py]
74
+
-[g2_module_ini_to_json.py]
75
75
76
76
- Modify the path to your projects G2Module.ini file.
77
77
@@ -87,12 +87,6 @@ When using a bare metal install, the initialization parameters used by the Senzi
✏️You only need to modify the `CONNECTION` string to point to your Senzing database.
121
+
Coming soon...
168
122
169
123
## Items of Note
170
124
171
-
### With Info
125
+
### SZ_WITH_INFO flag
172
126
173
-
A feature of Senzing is the capability to pass changes from data manipulation API calls to downstream systems for analysis, consolidation and replication. Any API that can change the outcome of entity resolution have a "WithInfo" version of the API. For example, addRecord and addRecordWithInfo. The "WithInfo" version of the API returns a response message detailing any entities that were affected by the API. In the following example (from addRecordWithInfo) a single entity with the ID 7903 was affected.
127
+
A feature of Senzing is the capability to pass changes from data manipulation SDK calls to downstream systems for analysis, consolidation and replication. SDK methods `add_record()`, `delete_record()` and `process_redo_record()` accept a `flags=` argument that when set to SzEngineFlags.SZ_WITH_INFO will return a response message detailing any entities affected by the method. In the following example (from `add_record("TEST", "10945", flags=SzEngineFlags.SZ_WITH_INFO)` a single entity with the ID 7903 was affected.
174
128
175
129
```json
176
130
{
@@ -190,7 +144,7 @@ The AFFECTED_ENTITIES object contains a list of all entity IDs affected. Separat
190
144
191
145
### Parallel Processing
192
146
193
-
Many of the example tasks demonstrate concurrent execution with threads. The entity resolution process involves IO operations, the use of concurrent processes and threads when calling the Senzing APIs provides scalability and performance. If using multiple processes, each process should have its own instance of a Senzing engine, for example G2Engine. Each engine object can support multiple threads.
147
+
Many of the example tasks demonstrate concurrent execution with threads. The entity resolution process involves IO operations, the use of concurrent processes and threads when calling the Senzing APIs provides scalability and performance.
194
148
195
149
### Scalability
196
150
@@ -212,19 +166,19 @@ To run the same example again and see representative performance, first [purge]
212
166
213
167
### Input Load File Sizes
214
168
215
-
There are different sized load files within the [Data] path that can be used to decrease or increase the volume of data loaded depending on the specification of your hardware. The files are named loadx.json, where the x specifies the number of records in the file.
169
+
There are different sized load files within the [data] path that can be used to increase the volume of data loaded depending on the specification of your hardware. Note, Senzing V4 comes with a default license that allows up to 500 source records to be loaded, without a larger license you will not be able to load these larger files.
The deletion snippets outline deleting previously added source records. Deleting source records removes the previously added source record from the system, completes the entity resolution process and persists outcomes in the Senzing repository.
3
+
4
+
Deleting a record only requires the data source code and record ID for the record to be deleted.
5
+
6
+
## Snippets
7
+
***DeleteFutures.py**
8
+
* Read and delete source records from a file using multiple threads
9
+
***DeleteLoop.py**
10
+
* Basic read and delete source records from a file
11
+
***DeleteWithInfoFutures.py**
12
+
* Read and delete source records from a file using multiple threads
13
+
* Collect the response from the [with info](../../../README.md#with-info) version of the API and write it to a file
The deletion snippets outline deleting previously added source records. Deleting source records removes the previously added source record from the system, completes the entity resolution process and persists outcomes in the Senzing repository.
4
+
5
+
Deleting a record only requires the data source code and record ID for the record to be deleted.
6
+
7
+
## Snippets
8
+
9
+
-**delete_futures.py**
10
+
- Read and delete source records from a file using multiple threads
11
+
-**delete_loop.py**
12
+
- Basic read and delete source records from a file
13
+
-**delete_with_info_futures.py**
14
+
- Read and delete source records from a file using multiple threads
15
+
- Collect the response using the [SZ_WITH_INFO flag](../../README.md#with-info) on the `delete_record()` method and write it to a file
0 commit comments