erezsh/reladiff
erezsh/reladiff has 548 GitHub stars and 29 forks. GitHot measured +1 stars in 24 hours. Last checked 2026-11-11 20:25 UTC. Last push 2025-08-18.
High-performance diffing of large datasets across databases
What you can do
- ⇄ 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.
측정된 스타 증가
- in 24h
- +1
- in 7 days
- 업데이트 지연
- in 15 days
- 업데이트 지연
- in 1 month
- 업데이트 지연
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
Reladiff is a high-performance tool and library designed for diffing large datasets across databases. By executing the diff calculation within the database itself, Reladiff minimizes data transfer and achieves optimal performance.
This tool is specifically tailored for data professionals, DevOps engineers, and system administrators.
Reladiff is free, open-source, user-friendly, extensively tested, and delivers fast results, even at massive scale.
Key Features:
Cross-Database Diff: Reladiff 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.
Intra-Database Diff: When both tables reside in the same database, Reladiff 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.
Threaded: Utilizes multiple threads to significantly boost performance during diffing operations.
Configurable: Offers numerous options for power-users to customize and optimize their usage.
Automation-Friendly: Outputs both JSON and git-like diffs (with + and -), facilitating easy integration into CI/CD pipelines.
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.
Get Started
🗎 Read the Documentation - our detailed documentation has everything you need to start diffing.
Quickstart
For the impatient ;)
Install
Reladiff is available on PyPI. You may install it by running:
pip install reladiff
Requires Python 3.8+ with pip.
We advise to install it within a virtual-env.
How to Use
Once you've installed Reladiff, you can run it from the command-line:
# Cross-DB diff, using hashes
reladiff 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
reladiff DB1_URI TABLE1_NAME TABLE2_NAME [OPTIONS]
Or, you can import and run it from Python:
from reladiff 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
reladiff \
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.
reladiff \
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!
Confused? Got a cool idea? Just want to share your thoughts? Let's discuss it in GitHub Discussions.
Did you encounter a bug? Open an issue.
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:
License
This project is licensed under the terms of the MIT License.
관련 프로젝트 살펴보기
Asabeneh/30-Days-Of-Python
30 Days of Python 프로그래밍 챌린지는 Python 프로그래밍 언어를 30일 동안 배우기 위한 단계별 가이드입니다. 이 챌린지는 100일 이상 걸릴 수 있습니다. 자신의 속도에 맞춰 진행하세요. 다음 동영상도 도움이 될 수 있습니다: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,560 스타grafana/grafana
개방적이고 조합 가능한 옵저버빌리티 및 데이터 시각화 플랫폼입니다. Prometheus, Loki, Elasticsearch, InfluxDB, Postgres 등 여러 소스의 메트릭, 로그, 트레이스를 시각화합니다.
77,830 스타redis/redis
실시간 데이터 기반 애플리케이션을 구축하는 개발자에게 Redis는 가장 선호되고, 가장 빠르며, 기능이 가장 풍부한 캐시, 데이터 구조 서버이자 문서 및 벡터 쿼리 엔진입니다.
77,395 스타apache/superset
Apache Superset는 데이터 시각화 및 데이터 탐색 플랫폼입니다.
75,473 스타