Metadata-Version: 2.5
Name: cutover
Version: 0.1.0
Summary: Prove that nothing changed: compare two tables before a migration's consumers are repointed.
Project-URL: Homepage, https://github.com/sandovabarbora/cutover
Author: Barbora Šandová
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: data,dbt,diff,duckdb,migration,parity
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Database
Requires-Python: >=3.10
Requires-Dist: duckdb>=1.0
Requires-Dist: pyarrow>=15
Provides-Extra: bigquery
Requires-Dist: google-cloud-bigquery>=3; extra == 'bigquery'
Description-Content-Type: text/markdown

# cutover

Prove that nothing changed. Compare two tables before a migration's consumers
are repointed, and get the two numbers that end the argument: *0/0 mismatches
across N columns* and *K/K partitions with an identical fingerprint*.

```bash
pip install cutover
cutover old.parquet new.parquet --key id --partition date --tol amount=0.01 --html report.html
```

```python
import cutover

report = cutover.compare(old, new, key=["id"], partition="date", tolerance={"amount": 0.01})
report.passed  # True / False
report.reasons  # [] or ["rows_only_in_old", "column_mismatch:amount", ...]
open("report.html", "w").write(report.to_html())
```

Sources: `.parquet`, `.csv`, `duckdb:///file.db?table=t`, `sqlite:///file.db?table=t`,
`postgres://…?table=t` (via the DuckDB postgres extension), or a `pyarrow.Table` /
`pandas.DataFrame` / `polars.DataFrame`. `pip install cutover[bigquery]` adds
`cutover.from_bigquery(sql)`.

Exit codes: 0 PASS · 1 FAIL · 2 error. Apache-2.0.
