Enterprise ZinggEC Python API
Adds deterministic matching, blocking strategy, primary keys, pass-through, mapping match types, incremental matching, cluster approval, output stats, and additional pipe types.
ZinggEC is the Zingg Enterprise Common Python API. It extends the Community API with features required for production identity resolution - persistent Zingg IDs, deterministic matching, pass-through, output statistics, incremental matching, cluster approval, and additional pipe types for Unity Catalog and in-memory data.
Requirements
Python 3.6+
Spark 3.5.0
Zingg Enterprise licence
Install the package
pip install zinggECModules and classes
zinggEC.enterprise.common package
ApproverArguments
ApproverArguments
Cluster approval workflow - set approval query and destination for human-reviewed clusters
IncrementalArguments
IncrementalArguments
Incremental matching - incremental data, deleted data, delete action, output temp directory, parent args
MappingMatchType
MappingMatchType
User-supplied lookup file for nickname/abbreviation matching
epipes
ECsvPipe, EPipe, InMemoryPipe, UCPipe
Enterprise pipe types including CSV, base pipe, in-memory DataFrame, and Unity Catalog table
EArguments
EArguments, DeterministicMatching
Enterprise arguments object plus deterministic matching rules
EFieldDefinition
EFieldDefinition
Enterprise field definition with primary key support and mapping match type
Imports
Build the Enterprise arguments object
Set the blocking strategy. If not set, the model uses DEFAULT. WIDER is also available for cases where you want to cast a wider blocking net.
Define fields with EFieldDefinition
Using MappingMatchType on a field
For fields where you want to use a mapping file (nicknames, abbreviations, aliases), pass a MappingMatchType to EFieldDefinition:
The second argument to MappingMatchType is the mapping file name (without extension). The mapping file must be present in your working directory.
Pass through
Exclude records matching the expression from matching while still keeping them in the output:
For null-safe expressions:
Deterministic matching
Add hard rules where exact field matches always result in a match, regardless of probabilistic score:
Output statistics
Enterprise writes match quality statistics to three separate files using the $ZINGG_DYNAMIC_STAT_NAME placeholder, replaced at runtime with SUMMARY, CLUSTER, and RECORD:
Pipes - Enterprise edition
ECsvPipe
CSV input/output. Same as CsvPipe but for Enterprise.
EPipe
Base pipe class with pass-through capability. Use for any source where the specialised classes do not fit.
InMemoryPipe
For reading from or writing to an in-memory Spark DataFrame instead of a file:
Use this in notebook environments where you already have data in a DataFrame and do not want to write it to disk first.
UCPipe
For Databricks Unity Catalog tables:
Use this when your data lives in a Unity Catalog table on Databricks.
Execute Zingg Enterprise phases
ZinggEC uses the EZingg client. Pattern is the same as Community — set options with the phase name, call initAndExecute().
Run findTrainingData
Run label
Run findAndLabel
Enterprise convenience — combines findTrainingData and label
Run generateDocs
Run train
Run trainMatch
Enterprise convenience — combines train and match
Run match
Run link
Run updateLabel
Revisit and correct previously marked pairs.
Run diff
Compare two model outputs.
Incremental matching with IncrementalArguments
runIncremental requires IncrementalArguments instead of plain EArguments. It tracks new, changed, and deleted records, applies them to the existing identity graph, and writes the updated graph.
Build incremental
Incremental data (new and changed records)
Optional - deleted data
Optional - deleted action
Optional - temporary output directory
Execute
Cluster approval with ApproverArguments
ApproverArguments is the Enterprise workflow for human-reviewed cluster approval — where domain experts approve or reject specific clusters before they enter the production identity graph.
Build approver arguments
Approval SQL query identifies clusters
Requiring human review.
Destination for approved clusters
Execute approval phase
Full example
Complete working example combining all the above.
Last updated
Was this helpful?