Configure Zingg
Set up your field definitions, pipes, and arguments - the foundation every subsequent Zingg phase depends on.
Configuring Zingg is the first step in every Zingg workflow. This page follows notebook 01 step by step: defining your fields, configuring your pipes, and creating the arguments object that all subsequent phases inherit.
Complete this page before running any other phase. Every phase reads the configuration set here:
findTrainingData→ [Create Training Data]label→ [Label Training Pairs]train→ [Build and Save the Model]match→ [Run the Match Phase]link→ [Link Across Datasets]runIncremental→ [Run Incremental Matching]
Step 1: Verify installation
from zingg.client import *
from zingg.pipes import *Verify in your notebook
!pip show zinggStep 2: Build the arguments object
Python
args = Arguments()
args.setModelId("100")
args.setZinggDir("models")
args.setNumPartitions(4)
args.setLabelDataSampleSize(0.5)JSON
{
"modelId" : "100",
"zinggDir" : "models",
"numPartitions" : 4,
"labelDataSampleSize" : 0.5
}Understanding numPartitions and labelDataSampleSize
numPartitions - The number of Spark partitions over which input data is distributed. Set this to approximately 20–30 times the number of worker cores. This is the most important configuration for performance.
labelDataSampleSize - Fraction of the data scanned to find candidate pairs. Adjust between 0.0001 and 0.1. If findTrainingData is slow, reduce to 0.05 or lower. If it is too small, Zingg may not find the right edge cases.
Step 3: Define fields and match types
Python
JSON
Step 4: Configure input and output pipes
Python
JSON
Step 1: Verify installation and imports
Verify the zinggEC package is installed by running !pip show zinggEC in a separate cell.
Step 2: Build the Enterprise arguments object
Set the blocking strategy if needed. If not set, the model follows DEFAULT. See Blocking Strategies: DEFAULT vs WIDER for how each strategy orders fields.
Python
JSON
Step 3: Define fields with EFieldDefinition
Python
Step 4: Configure input and output pipes
Python
JSON
Step 5: Deterministic matching (optional)
Python
JSON
Step 6: Output stats (optional)
Configures where Zingg writes statistics for the match and runIncremental phases. The $ZINGG_DYNAMIC_STAT_NAME placeholder is substituted at runtime with SUMMARY, CLUSTER, or RECORD, so each run writes the three statistics files separately. If outputStats is not configured, Zingg skips stats writing and the run proceeds normally.
Python
JSON
Read more: For the fields in each statistics table → Output Statistics.
Step 7: Pass Through (optional)
Pass Through excludes specific records from matching while still including them in output with their own Zingg ID. Records matching the passthrough expression appear in the identity graph but never influence cluster formation.
Note: Zingg internally applies the negation of passthroughExpr to filter matching records. If the passthrough condition applies to nullable fields, ensure the negative of the expression yields the records that are NOT passthrough.
Python
JSON
Example with null-safe expression
Step 1: Build the Enterprise arguments object
JSON
Step 2: Define fields and match types
JSON
Step 3: Configure input and output pipes
JSON
Step 4: Deterministic matching (optional)
JSON
Step 5: Output stats (optional)
Configures where Zingg writes statistics for the match and runIncremental phases. The $ZINGG_DYNAMIC_STAT_NAME placeholder is substituted at runtime with SUMMARY, CLUSTER, or RECORD, so each run writes the three statistics tables separately. If outputStats is not configured, Zingg skips stats writing and the run proceeds normally.
JSON
Read more: For the fields in each statistics table → Output Statistics.
Step 6: Pass Through (optional)
Pass Through excludes specific records from matching while still including them in output with their own Zingg ID. Records matching the passthrough expression appear in the identity graph but never influence cluster formation.
Note: Zingg internally applies the negation of passthroughExpr to filter matching records. If the passthrough condition applies to nullable fields, ensure the negative of the expression yields the records that are NOT passthrough.
JSON
Example with null-safe expression
Last updated
Was this helpful?