Snowflake integration
pip install "dataranger[snowflake]"
dataranger patrol --snowflake --table ANALYTICS.GOLD.PAYMENTS --ref-table ANALYTICS.GOLD.CUSTOMERS \
--manifest-table ANALYTICS.OPS.CONTROL_TOTALS --key payment_id --reference customer_id \
--date booking_date --segment channel --amount amount --days 45
DataRanger runs three SELECT statements and nothing else, so a read-only role is enough and the warehouse is never modified. It selects only the mapped columns, and --days limits both the facts and the control totals, so a patrol costs a few seconds of a small warehouse. Use at least 30 days so the checks have a baseline. Queries carry the query tag dataranger, so they are easy to find in query history.
Credentials are read from where you already keep them; DataRanger stores nothing:
--snowflakeusesSNOWFLAKE_ACCOUNTandSNOWFLAKE_USER, withSNOWFLAKE_PASSWORD,SNOWFLAKE_PRIVATE_KEY_PATH(andSNOWFLAKE_PRIVATE_KEY_PASSPHRASE) orSNOWFLAKE_AUTHENTICATOR, plusSNOWFLAKE_ROLE,SNOWFLAKE_WAREHOUSE,SNOWFLAKE_DATABASEandSNOWFLAKE_SCHEMA. With multi-factor login, setSNOWFLAKE_AUTHENTICATOR=username_password_mfaand put the current code from your authenticator app inSNOWFLAKE_PASSCODE. For scheduled jobs, use a key pair.--snowflake produses the connection namedprodin~/.snowflake/connections.toml, the file the Snowflake CLI uses.
Column names are matched without regard to case, so --key payment_id finds PAYMENT_ID. To try it on a trial account with demo data, follow examples/snowflake.