Rules live in config/rules.yaml. Start from:
Copy-Item config\rules.example.yaml config\rules.yamlSupported rule sections include:
required_columnsnot_null_columnsunique_columnsformat_checksrange_checkscategorical_checksfreshnessreferential_integritycustom_rules.email_domainsglobal_rulesquality_thresholds
The Streamlit dashboard includes a read-only Rules Catalog page under Governance. It flattens config/rules.yaml into searchable rows with dataset, rule type, column, rule configuration, severity, and enabled status.
Use the page to:
- inspect active YAML rules without opening files
- filter by dataset, rule type, and column
- search rule configuration text
- export the current catalog view as CSV
- view the raw YAML in a safe read-only expander
Rule editing and approval workflow is intentionally disabled for now and listed as a Pro/Enterprise roadmap feature.
Schema drift detection compares the current source table schema with the latest saved schema snapshot in PostgreSQL.
global_rules:
schema_drift_detection:
enabled: true
severity: HIGHOn the first run, the system saves a baseline snapshot and returns a skipped baseline result. Later runs detect:
- added columns
- removed columns
- changed data types
- changed nullability
- changed column order
Schema drift results are saved as schema_drift_check rows and appear in the dashboard Check Results page.
Row volume anomaly detection compares each dataset's current row count with recent historical row counts saved in PostgreSQL.
global_rules:
volume_anomaly_detection:
enabled: true
baseline_runs: 5
change_threshold_percent: 40
severity: HIGHOn the first run, the system saves the current row count as a baseline and returns a skipped baseline result. Later runs detect both drops and spikes by comparing the signed percent change against the absolute threshold. Results are saved as row_volume_anomaly_check rows and history is stored in data_volume_history.
Run validation after editing:
python cli.py validate-config