Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Run the match phase

Run the match phase to find duplicate records within a single dataset using your trained Zingg model.

The match phase runs AFTER train. It applies the trained Zingg model to your full dataset and groups records that represent the same real-world entity into clusters.

Use match when you want to find duplicates within a single dataset. If you need to match records across two separate datasets, use the link phase instead - both are equal operations using the same trained model.

Python

options = ClientOptions([ClientOptions.PHASE, "match"])
zingg = Zingg(args, options)
zingg.initAndExecute()

CLI

./scripts/zingg.sh --phase match --conf config.json

Read and View Output

output = spark.read.csv("path-to-output-directory",header = True)
display(output)

Matching records share the same Z_CLUSTER value.

Python

options = ClientOptions([ClientOptions.PHASE,"match"])
zingg = EZingg(args, options)
zingg.initAndExecute()

CLI

./scripts/zingg.sh --phase match --conf config.json

Read and View Output

# Read match output
output = spark.read.csv("path-to-output-directory",header=True)
display(output)

Enterprise output includes Zingg ID (persistent across runs) instead of Z_CLUSTER, plus deterministic match flag and Match Statistics. Zingg ID is stable across all subsequent incremental runs.

Run match

Zingg on Snowflake can be run either from a local terminal via the CLI, or natively inside Snowflake as a job service.

CLI (local terminal)

Snowflake (job service)

Run the phase as an asynchronous job service inside your Snowflake compute pool.

<zingg-job-spec-file> defines the container and job service configuration Zingg needs to run inside Snowpark Container Services. It is maintained by your administrator and referenced from your @specs stage.

<config-name> is the name of your Zingg configuration json file.

Monitor the job

Retrieve the service logs to monitor execution and debug any failures.

zingg-async-job-container refers to the container name defined in the job specification.

Stop the compute pool

Once the job completes, stop the compute pool to release resources.

Enterprise output includes Zingg ID (persistent across runs) instead of Z_CLUSTER, plus deterministic match flag and Match Statistics. Zingg ID is stable across all subsequent incremental runs.

Last updated

Was this helpful?