07 · Tables A→ZE · Govern with column domains
Dry-run validation before load
Scan a table for constraint and domain violations - with typo suggestions - before trusting the data.
Two tools scan existing data for violations without changing anything. Run them as a pair after every bulk mutation, and to vet data before you rely on it.
The two validators
eddytor validate table eddytor sales orders # checks for constraint violations via SQLThe CLI exposes a single validate table; the two MCP tools below split
constraint vs domain checks.
validate_constraints(table) # PK, NOT NULL, CHECK expressions
validate_domain_values(table, columns=["status"]) # domain mismatches + typo suggestionsvalidate_constraints- checks primary keys, NOT NULL, and CHECK expressions. Returns violations with sample rows.validate_domain_values- scans constrained columns for values outside their domain, and returns similarity suggestions (e.g."actve" → "active","Electroncis" → "Electronics").
The fix loop
Good to know
Validation reports but doesn't auto-fix. Apply
corrections with
merge_rows, then re-validate
until clean.validate_constraints+validate_domain_values.- Fix flagged rows with
merge_rows(use the typo suggestions). - Re-run both.
profile_tablefor a final sanity check.
Catch orphans from reference domains
Reference domains validate live against the source table - if someone deletes
a source value, dependent rows are orphaned. validate_domain_values finds them.