Platform Guide for Azure Databricks
End-to-end guide to running Zingg on Azure Databricks from cluster setup to your first match result. Covers Community (open source) and Enterprise
Databricks is a fully managed Spark environment that integrates seamlessly with Zingg. Both Community and Enterprise run on the same Databricks cluster. The difference is the libraries, class names, and the additional phases available in Enterprise.
Uses Arguments, FieldDefinition, CsvPipe, and ZinggWithSpark. The workflow runs across three notebooks.
Notebook 01: Set up Zingg
Step 1: Create a cluster and install the Zingg JAR
Go to Compute → Create Cluster. Name it
Zingg-Community.Set the runtime to a current LTS version for compatibility.
Download the latest Zingg JAR from
github.com/zinggAI/zingg/releases.Open the cluster → Libraries → Install New → Upload JAR → upload the file.

Databricks Install library dialog with the Zingg jar selected from the workspace file path.
Step 2: Install the Zingg Python package
Open a notebook attached to the cluster and run:
Verify the installation
Step 3: Set the model ID and storage path
zinggDir is where Zingg writes model files and training data. modelId is a unique name for this model run - Zingg uses it as the folder name under zinggDir. Use the same values across all notebooks in this workflow.
Update zinggDir to an abfss:// or s3a:// path if you want model files stored in cloud storage. dbfs:/ paths are deprecated in Databricks—use Unity Catalog storage paths or external cloud storage instead.
MARKED_DIR and UNMARKED_DIR are derived from your zinggDir and modelId. Zingg writes labeled training pairs to these paths during the label phase and reads them back during train.
Step 4: Import libraries and set up helper functions
Step 5: Build the arguments object
Arguments is the central configuration object. Every subsequent phase reads from the same args instance.
Step 6: Configure performance settings
numPartitions controls how data is distributed across Spark workers. Set it to approximately 20–30× your worker vCPU count. labelDataSampleSize controls what fraction of the data is scanned when finding candidate pairs - reduce it if findTrainingData is slow.
Step 7: Connect your data
The OS notebook uses UCPipe to connect to a Unity Catalog table. Replace table with your own catalog.schema.tablename. If your data is in a CSV file, use CsvPipe instead — see the hint below.
Preview the Data

If your data is in a CSV file, use CsvPipe instead of UCPipe:
Sample data to test with: github.com/zinggAI/zingg/blob/main/examples/febrl120k/test.csv
Step 8: Configure output
Output can also be a CSV or Parquet file. For all supported output formats → Connect Azure Databricks.
Step 9: Define fields and match types
The order in which you list fields matters—put the most important fields first. Every field in your input schema must appear in fieldDefinition, either with a match type or as DONT_USE.
Notebook 02: Find training data and label pairs
Step 10: Find candidate pairs
Zingg scans your data and selects the most informative pairs for labeling—edge cases where the model has the most to learn. Run this before labeling.
Step 11: Load pairs for labeling
Step 12: Label pairs in the widget
A widget displays each candidate pair side by side. For each pair, select:
Match—these records represent the same real-world entity
No Match—these records are different entities
Uncertain—you cannot decide
The widget code handles the display and state management. Run the cell to render it.
IMAGE TO BE ADDED — Zingg labeling widget in a Databricks notebook showing two candidate records side by side with Match / No Match / Uncertain toggle buttons. Tanwi to check with team for a screenshot from a live notebook run.
Step 13: Save labeled pairs
After labeling pairs in the widget, run this cell to save your labels to the training data folder.
Notebook 03: Train, match, and view output
Step 14: Review labeled pairs before training
Before training, review the pairs you have labeled to verify quality. This uses the updateLabel phase to surface your marked records for inspection.
Step 15: Train the model
Zingg builds the blocking and similarity models from your labeled pairs and persists them to zinggDir/modelId. Once trained, this model can be reused on new data without retraining.
Step 16: Run the match
Applies the trained model to your full dataset and writes resolved clusters to the output location configured in Step 8.
Step 17: View output

Notebook 04: Generate model documentation (optional)
Run generateDocs after labeling to produce readable HTML documentation of your training data—both matched and non-matched pairs. Run it before training to inspect data quality, or share the output with subject matter experts to validate labels before committing to train.
IMAGE TO BE ADDED — generateDocs HTML output rendered inside a Databricks notebook showing labeled pair examples. Tanwi to check with team for screenshot from a live notebook run. Even a small portion of the rendered HTML is sufficient — it tells the reader what to expect before they run it. Place: below the displayHTML**************************** ****line.
Uses EArguments, EFieldDefinition, ECsvPipe, EZinggWithSpark. Seven notebooks, each covering one phase.
Enterprise adds blocking model configuration, a primary key for incremental matching, stats output, deterministic matching rules, pass-through expressions, the runIncremental phase, and the explain phase.
Notebook 01: Set up Zingg
Step 1: Create a cluster and install Enterprise JARs
Go to Compute → Create Cluster. Name it
Zingg-Enterprise.Set the runtime to a current LTS version.
Create a managed Volume inside your catalog schema.
Upload
zingg-enterprise-spark-0.6.0.jarandzingg_license.jarto the Volume.Open the cluster → Libraries → Install New → Volumes → navigate to:
/Volumes/catalog_name/schema_name/volume_name/zingg-enterprise-spark-0.6.0.jarRepeat for
zingg_license.jar.
Step 2: Verify all three packages are installed
Step 3: Set the checkpoint directory
Step 4: Import libraries
Step 5: Set the model ID and storage path
files_dir is the root path for all input, output, and model storage. zingg_dir is where Zingg writes model files. model_id is the unique name for this run.
Replace files_dir with your actual Databricks external storage path (abfss:// for ADLS or s3a:// for S3). dbfs:/ paths are deprecated—use external storage.
Step 6: Build the Enterprise arguments object
EArguments is the Enterprise equivalent of Arguments. setBlockingModel sets the blocking strategy. DEFAULT suits most datasets—use WIDER if you know matching pairs are being missed.
Step 7: Configure performance settings
Step 8: Connect your data
Enterprise uses ECsvPipe for CSV and Parquet, or UCPipe for Unity Catalog tables.
Preview your data
Step 9: Configure output
Step 10: Configure stats output
Stats output is an Enterprise feature. Zingg replaces $ZINGG_DYNAMIC_STAT_NAME at runtime with SUMMARY, CLUSTER, or RECORD, writing three separate stats files per run.
Step 11: Define fields with EFieldDefinition
EFieldDefinition is the Enterprise equivalent of FieldDefinition. Mark your primary key field with setPrimaryKey(True) — this is required for runIncremental to identify records across runs. Put the most important fields first.
Step 12: Deterministic matching and pass-through (optional)
Deterministic matching short-circuits probabilistic scoring — records matching all fields in a condition are always matched regardless of similarity scores. Pass-through excludes specific records from matching while still including them in output with their own Zingg ID.
Deterministic conditions
Pass-through expression
Notebook 02: Remove stopwords (Optional)
Stopwords are high-frequency words that appear across many records but carry no matching signal — words like pvt, ltd, st, ave. Removing them improves blocking and similarity accuracy on address and company name fields.
Step 13: Generate stopword recommendations
Zingg analyses the specified column and returns a list of high-frequency words it recommends treating as stopwords. Run this once per column you want to clean.
Step 14: Review recommendations
Step 15: Apply stopwords to the field definition
Review the recommendations. You can use them as-is or edit the list — add or remove words that matter for your specific dataset.
Notebook 03: Find training data and label pairs
Step 16: Set labelDataSampleSize
labelDataSampleSize controls how much of your data is scanned when finding candidate pairs.
Step 17: Find candidate pairs
Step 18: Load pairs for labeling
Step 19: Label pairs in the widget
The Enterprise widget shows one pair at a time with Prev and Next navigation. For each pair select Match, No Match, or Uncertain. Labels are saved directly to the DataFrame as you click.
Step 20: Save labeled pairs
Notebook 04: Generate model documentation
Run generateDocs after labeling and before training to inspect training data quality. Produces readable HTML documentation of your labeled pairs—both matches and non-matches.
Notebook 05: Train and match
Step 21: Train the model
Step 22: Run the match
Step 23: View output
Notebook 06: Run incremental matching
After the initial match, use runIncremental to update the identity graph with new or changed records without retraining the model. New records that match an existing cluster inherit its ZINGG_ID. Records that do not match any existing cluster receive a new ZINGG_ID.
Step 24: Configure incremental input
IncrementalArguments wraps your base args and adds the incremental data source and a temporary output path.
Step 25: Run incremental
Step 26: View updated output
Notebook 07: Explain output
The explain phase shows how a specific cluster was formed, which record pairs contributed, their similarity scores, and how transitive matching connected records through intermediate pairs. Use this for governance, model validation, and sharing evidence with domain experts.
Step 27: Import explain libraries
Step 28: Set the cluster to explain
Find a ZINGG_ID from your match output that you want to investigate. Copy it into zingg_id below.
Step 29: Run the explain phase
Step 30: View explain output
Last updated
Was this helpful?