Skip to content
Swap Meet

Free

No. 021Free

dataguard: data-quality checks for PostgreSQL and SQLite

Configurable checks for orphaned records, dates out of order, totals that do not match, empty fields and business rules. Every check only reads.

by Lucas Cooper-Bey

About it

dataguard checks your tables on PostgreSQL, including Neon, or an existing SQLite file. It came from a CRM the README calls AcmeCRM, a stand-in name. It looks for orphaned records, dates out of order, totals that do not match, empty fields and business rules, then scores them from 0 to 100. Copy example-config.json and change the example names. A check runs only when it is switched on. Limits: Every check only reads. Statements are SELECT, and the only file written is the report named with --output. On PostgreSQL and Neon, nothing in dataguard stops a write, so connect with a role that can only read. SQLite must already exist and opens read-only. A WAL database in a folder dataguard cannot write to cannot be read. The CLI cannot open MySQL or Drizzle. pg and better-sqlite3 are optional. Referential checks expect the parent key column to be named id. Door 3 of 100 Doors.