What problem does it solve?
Validate congressional trading data integrity in SQLite database. Use when checking data quality, verifying pipeline output, or debugging data issues in senate_trades, house_trades, or ai_intelligence_signals tables.
Core Features & Use Cases
- Table existence — Verify senate_trades, house_trades, institutional_holdings, ocr_queue, ai_intelligence_signals tables exist
- Record counts — Report row counts per table
- Recency — Show the most recent filing_date or timestamp per table to confirm freshness
- Required fields — Check for NULL values in NOT NULL columns (politician_name, filing_date, ptr_link, data_hash)
- Ticker format — Flag any ticker values that don't match ^[A-Z]{1,5}$
- Duplicate hashes — Check for duplicate data_hash values in senate_trades and house_trades
- Date sanity — Flag any transaction_date in the future or before 2020
- AI signals — Check ai_intelligence_signals for NULL impact_score or missing source_name
Quick Start
Run the validator against data/data.db to perform all integrity checks.