Skip to main content

 

Namidiff is a fork of Reladiff, a high-performance tool and library designed for diffing large datasets across databases. By executing the diff calculation within the database itself, Namidiff minimizes data transfer and achieves optimal performance.

Lineage: namidiff (NamiLink Kft.) is a fork of reladiff by Erez Shinan, which is a fork of the archived data-diff by DataFold Inc. The PyPI distribution, Python package and CLI command are all named namidiff. The database layer, namidiff.sqeleton, is a vendored fork of sqeleton by Erez Shinan. See LICENSE for the full copyright chain.

This tool is specifically tailored for data professionals, DevOps engineers, and system administrators.

Namidiff is free, open-source, user-friendly, extensively tested, and delivers fast results, even at massive scale.

Key Features:

  1. Cross-Database Diff: Namidiff employs a divide-and-conquer algorithm, based on matching hashes, to efficiently identify modified segments and download only the necessary data for comparison. This approach ensures exceptional performance when differences are minimal.

    • ⇄ Diffs across over a dozen different databases (e.g. PostgreSQL -> Snowflake) !

    • 🧠 Gracefully handles reduced precision (e.g., timestamp(9) -> timestamp(3)) by rounding according to the database specification.

    • 🔥 Benchmarked to diff over 25M rows in under 10 seconds and over 1B rows in approximately 5 minutes, given no differences.

    • ♾️ Capable of handling tables with tens of billions of rows.

  2. Intra-Database Diff: When both tables reside in the same database, Namidiff compares them using a join operation, with additional optimizations for enhanced speed.

    • Supports materializing the diff into a local table.
    • Can collect various extra statistics about the tables.
  3. Threaded: Utilizes multiple threads to significantly boost performance during diffing operations.

  4. Configurable: Offers numerous options for power-users to customize and optimize their usage.

  5. Automation-Friendly: Outputs both JSON and git-like diffs (with + and -), facilitating easy integration into CI/CD pipelines.

  6. Over a dozen databases supported. MySQL, Postgres, Snowflake, Bigquery, Oracle, Clickhouse, and more. See full list

Reladiff is a fork of an archived project called data-diff. Namidiff continues that lineage, with NamiLink-specific fixes for cross-database normalization (e.g. empty-string / NULL handling, timestamp precision).

Get Started

🗎 Read the Documentation - everything you need to start diffing. (Upstream reladiff docs are also hosted at reladiff.readthedocs.io.)

Quickstart

For the impatient ;)

Install

Namidiff is available on PyPI as namidiff (the NamiLink Kft. fork). You may install it by running:

pip install namidiff

Requires Python 3.11+ with pip.

We advise to install it within a virtual-env.

How to Use

Once you've installed Namidiff, you can run it from the command-line:

# Cross-DB diff, using hashes
namidiff  DB1_URI  TABLE1_NAME  DB2_URI  TABLE2_NAME  [OPTIONS]

When both tables belong to the same database, a shorter syntax is available:

# Same-DB diff, using outer join
namidiff  DB1_URI  TABLE1_NAME  TABLE2_NAME  [OPTIONS]

Or, you can import and run it from Python:

from namidiff import connect_to_table, diff_tables

table1 = connect_to_table("postgresql:///", "table_name", "id")
table2 = connect_to_table("mysql:///", "table_name", "id")

sign: Literal['+' | '-']
row: tuple[str, ...]
for sign, row in diff_tables(table1, table2):
    print(sign, row)

Read our detailed instructions:

"Real-world" example: Diff "events" table between Postgres and Snowflake

namidiff \
  postgresql:/// \
  events \
  "snowflake://<username>:<password>@<host>/<DATABASE>/<SCHEMA>?warehouse=<WAREHOUSE>&role=<ROLE>" \
  events \
  -k event_id \         # Identifier of event
  -c event_data \       # Extra column to compare
  -w "event_time < '2024-10-10'"    # Filter the rows on both dbs

"Real-world" example: Diff "events" and "old_events" tables in the same Postgres DB

Materializes the results into a new table, containing the current timestamp in its name.

namidiff \
  postgresql:///  events  old_events \
  -k org_id \
  -c created_at -c is_internal \
  -w "org_id != 1 and org_id < 2000" \
  -m test_results_%t \
  --materialize-all-rows \
  --table-write-limit 10000

Technical Explanation

This technical explanation provides a quick overview of how our cross-database diffing works.

For an in-depth explanation, this blog post details all the major technical choices we made in our implementation.

We're here to help!

How to Contribute

  • Please read the contributing guidelines to get started.
  • Feel free to open a new issue or work on an existing one.

Big thanks to everyone who contributed so far:

And to the upstream reladiff and data-diff contributors, whose work this fork builds on.

License

This project is licensed under the terms of the MIT License.

Copyright 2026 NamiLink Kft. Contains code copyright Erez Shinan (reladiff, sqeleton) and DataFold Inc. (data-diff), also under MIT. The LICENSE file retains all original notices.

Metadata

Release files for namidiff 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for namidiff 0.7.1
File Size Uploaded
namidiff-0.7.1.tar.gz 89.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for namidiff 0.7.1
File Interpreter ABI Platform
namidiff-0.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 213.9 kB

Release files / namidiff-0.7.1.tar.gz

Download URL namidiff-0.7.1.tar.gz
Size 89.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1b92563172dee62a1a6fc96fa410383cff93b9bfd21644b7e8004ad135a6de07
BLAKE2b-256 checksum
How to use checksums
d0dce654faa6cdbabcc26125c9c0e1ba304e0cf9dc8dab3c3a765f1aa5a33e86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / namidiff-0.7.1-py3-none-any.whl

Download URL namidiff-0.7.1-py3-none-any.whl
Size 124.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7135b1947ffe8a3119803469414c9f6011ad42cd3b355e7c93e41c71b92b65c
BLAKE2b-256 checksum
How to use checksums
e6202539c3cf111f25eca830880b52f44848b01921d391aa2694b5253d8114b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.7.1 This release

2 release files

0.7.0

2 release files

0.6.9

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page