Build a developer tool that evaluates whether the results of a database query are trustworthy for their intended business use.
Users provide a SQL query, a declared output schema, sample results, expected invariants, and optional reference datasets.
The application should test:
Whether expected columns and data types are present.
Whether supposedly unique identifiers contain duplicates.
Whether totals, counts, and grouped results satisfy declared business rules.
Whether joins appear to multiply records unexpectedly.
Whether null values, missing categories, or unusual outliers could affect interpretation.
Whether date filters or aggregation boundaries omit relevant records.
Whether output results contradict supplied reference totals or known constraints.
Whether the same query produces inconsistent results across supplied snapshots.
Generate a test suite, validation report, and explanation of every failed assertion.
Provide a query editor, sample-data preview, result comparison panel, and exportable test definitions.
Do not execute destructive SQL. Any live database connection must use read-only credentials by default and require explicit configuration. Distinguish verified query failures from potential risks inferred from limited samples, and never assume a dataset is correct merely because all configured tests pass.
0 Comments