Repository navigation
Releases
DataRanger v0.8.0
A fix to the hash-total check from 0.7.0, the first two of four steps toward safe apply on Snowflake, and two contributions from @areebaf29: Discord alerts and an Airflow example. If your control totals carry a hash_total, upgrade: 0.7.0 could miss a two-row swap on days with more than about 200 rows.
-
Fix: the hash total now decides the day (#113). In 0.7.0 a
hash_totalin the control totals was compared as a fraction of its own value, so two amounts swapped between rows moved it by about one row's worth and stayed under the gate's threshold on any day with more than about 200 rows; a patrol reported such days as "no action needed". When a day's row count and amount match the control totals exactly, its hash total must now match exactly too. A swap on a day that is also short of late rows still cannot be seen. -
Fix: optional control measures on warehouse sources (#113). Snowflake, BigQuery, Postgres and dbt sources selected only
nandamountfrom the control totals, sohash_total,min_amount,max_amountanddistinct_<column>were ignored there. The control totals are now read whole. Adistinct_<column>measure also follows your own column name (distinct_cust_idwith--reference cust_id) instead of being skipped. -
Check the Snowflake clone before any swap (#98, second part of safe apply, #96).
snowflake_apply.verify_clonereads the fixed days back from the clone and holds them to the control totals with the same gap rule and threshold as the patrol's gate. Given the patrol's fixed table, it also requires each day to hold exactly the rows the gate approved. A failed check drops the clone. Two read-only queries; nothing inpatrolcalls it yet. -
Write a proven fix to a Snowflake clone (#97, first part of safe apply, #96).
dataranger.connectors.snowflake_apply.write_fix_to_cloneclones the patrolled table and replays the fix on the clone as row-level statements, so columns the patrol never read stay as they were. The patrolled table is never written to, and nothing inpatrolcalls this yet: a patrol is still threeSELECTstatements. Fixes that reload rows from the source, and duplicate copies that differ only in a column the patrol did not read, are refused with a clear message. -
--notify-webhooksupports Discord webhooks: the summary is sent as{"content": ...}and cut to Discord's 2,000 character limit. Contributed by @areebaf29. -
Example: a daily patrol as an Airflow DAG, in
examples/airflow. Contributed by @areebaf29.
v0.7.0
Bump version to 0.7.0 and add CHANGELOG entry
DataRanger v0.6.3
Version bump only — recreates the v0.6.3 tag/release against the commit that actually bumped version to 0.6.3, so the release workflow's tag/version gate passes this time and the GHCR Docker image gets published.
v0.6.2
Fixes a version/tag mismatch from v0.6.1 (package still read 0.6.0). No functional changes.
DataRanger 0.6.0
More warehouses for dbt projects, alerts where your team already works, and less to configure. All five changes were contributed by @sarankumar1325.
- dbt on Postgres.
--dbt-modelnow patrols models on a Postgres target, in a read-only session. Install withpip install "dataranger[dbt,postgres]". - dbt on BigQuery (experimental).
--dbt-modelalso patrols models on a BigQuery target and honors the profile'smaximum_bytes_billed. Use--daysto keep the scan small. Please report how it runs on a real project. - Slack and Teams alerts.
patrol --notify-webhook URLposts the summary when an incident needs a person;--notify-alwaysposts after every patrol. - Less configuration for dbt. The key and the reference are read from the model's
uniqueandrelationshipstests whenmetadoes not set them. - Stricter settings.
--threshold,--alphaand--deltaoutside their valid ranges now stop with a short error.
Full details in CHANGELOG.md.
v0.5.4: Windows fix, OpenSSF badge
python -m datarangernow works when thedatarangercommand is not on PATH (common on Windows).- README: how DataRanger compares with tests, observability platforms and AI agents, and what data leaves your machine.
- OpenSSF Best Practices passing badge, a security policy with private reporting, a code of conduct, and issue and pull request templates.
- Linter in CI, and read-only workflow tokens by default.
v0.5.3
Merge pull request #68 from akshaysharma1088/release-0.5.3 Release 0.5.3: version matches the tag
v0.5.2
Merge pull request #67 from akshaysharma1088/real-feed-study Matched no-gate comparison; conformal cleaning with the authors' code
v0.5.1: Snowflake, dbt and a GitHub Action, now on PyPI
This release puts the 0.5 features on PyPI. The v0.5.0 tag works for the GitHub Action, but its PyPI publish did not complete.
Snowflake
pip install "dataranger[snowflake]"
dataranger patrol --snowflake --table ANALYTICS.GOLD.PAYMENTS --ref-table ANALYTICS.GOLD.CUSTOMERS \
--manifest-table ANALYTICS.OPS.CONTROL_TOTALS --days 45
Three read-only queries, so a read-only role is enough. Credentials come from SNOWFLAKE_* environment variables or a named connection, including SNOWFLAKE_PASSCODE for multi-factor logins. A demo you can run on a trial account is in examples/snowflake.
dbt
pip install "dataranger[dbt]"
dbt build
dataranger patrol --dbt-model fct_payments
Patrols the table behind a dbt model on DuckDB or Snowflake targets. The column mapping can live in the model's meta: dataranger: block. A runnable project is in examples/dbt.
GitHub Action
- uses: akshaysharma1088/dataranger@v0.5.1
with:
dbt-model: fct_payments
Runs a patrol in CI, writes the result to the job summary, uploads the report, and fails the job when an incident needs a person.
Also new
--days Npatrols only the most recent days, for every source.--summary-md PATHappends a Markdown summary of the patrol to a file.- Two new MCP tools for AI agents:
patrol_snowflakeandpatrol_dbt.
If DataRanger is useful to you, a ⭐ helps other people find it.
v0.5.0: Snowflake, dbt and a GitHub Action
DataRanger now reads from where the data lives and runs in CI.
Snowflake
pip install "dataranger[snowflake]"
dataranger patrol --snowflake --table ANALYTICS.GOLD.PAYMENTS --ref-table ANALYTICS.GOLD.CUSTOMERS \
--manifest-table ANALYTICS.OPS.CONTROL_TOTALS --days 45
Three read-only queries, so a read-only role is enough. Credentials come from SNOWFLAKE_* environment variables or a named connection. A demo you can run on a trial account is in examples/snowflake.
dbt
pip install "dataranger[dbt]"
dbt build
dataranger patrol --dbt-model fct_payments
Patrols the table behind a dbt model on DuckDB or Snowflake targets. The column mapping can live in the model's meta: dataranger: block. A runnable project is in examples/dbt.
GitHub Action
- uses: akshaysharma1088/dataranger@v0.5.0
with:
dbt-model: fct_payments
Runs a patrol in CI, writes the result to the job summary, uploads the report, and fails the job when an incident needs a person.
Also new
--days Npatrols only the most recent days, for every source.--summary-md PATHappends a Markdown summary of the patrol to a file.- Two new MCP tools for AI agents:
patrol_snowflakeandpatrol_dbt.
If DataRanger is useful to you, a ⭐ helps other people find it.