Query quality for changing data

Your queries still run.
Do they still mean it?

Graincheck AI keeps SQL and KQL grounded in your evolving schemas, table grain, and metric definitions. Catch the quiet regressions before a dashboard tells the wrong story.

Built for telemetry teams. Designed for the queries everyone depends on.
QUERY REVIEW / TELEMETRY● REVIEW COMPLETE
same question · same data
SELECT COUNT(*) AS failed_requests FROM Requests r JOIN DeviceInventory d ON r.device_id = d.device_id WHERE r.status = 'failed';
⚠ Grain changed after the joinInventory now has multiple rows per device. This query reports 118 failures. Expected result: 100 unique failed requests.
The part syntax checks miss

A query can be valid and still be wrong.

Schema changes, duplicate records, shifting table grain, and overloaded metric names can quietly change what a query counts. Graincheck checks the meaning around the query, too.

01 / SCHEMA

Track what changed

Compare schema snapshots and surface renamed columns, new nulls, changed types, and table relationships that affect generated queries.

02 / SEMANTICS

Keep the grain in view

Document what one row represents, how metrics are defined, and which joins can multiply events or entities.

03 / REGRESSION

Test the answer

Re-run SQL and KQL examples against known-result fixtures when a schema, prompt, or model changes. Flag result drift for review.

Two query languages. One review.

SQL and KQL, checked against the same intent.

Generate and inspect the SQL query behind a warehouse report and the KQL query behind a telemetry investigation. Compare assumptions, filters, joins, and expected results in one review.

Choose the model per task, keep prompts and metric definitions versioned, then rerun the same checks after every change.

See the sample failure
KQL / FAILED REQUESTSREVIEWED
Requests | where status == "failed" | join kind=inner DeviceInventory on device_id | summarize count()
Same regression. Same 118.SQL and KQL agree because both inherited the duplicate-producing join.
Illustrative test case

Both queries agree. Both are wrong.

In this example, the inventory table changed from one row per device to multiple rows per device. The SQL and KQL still execute, but each now counts some failures twice.

GRAINCHECK REGRESSION RESULTExpected: 100 unique failed requests   /   SQL: 118   /   KQL: 118