Skip to the content
Gridkiln
Menu
Guide contents

Guide Guide

Checks

A check is a rule a table must satisfy, written in plain words and attached to a step. Every run evaluates its checks before it writes anything. A check that warns lets the run continue and flags it in the report; a check that stops the run stops it before any output is written, and says why.

Adding a check#

  • Under Checks in the recipe, choose Add check (or Add a check in the command palette) and pick a kind.
  • Right-click a column header and choose Add a check on this column, then the kind.
  • Take a proposed check: under Checks the app proposes rules it has seen hold in the data, such as “Order ID has no duplicates in 18,734,112 rows. Add a check that it stays unique?”. Add check adds it; Propose checks for this step asks again. With AI on, Suggest checks (AI) proposes more.

Kinds#

Kind Reads like
Never empty Order ID is never empty
Every day has rows Every day from the first to the last Order date has rows
Unique Order ID is unique
Between two values Amount is between 0 and 100,000
One of a list Status is one of Open, Paid, Void
Matches a pattern Email matches the email pattern
Length Code is between 3 and 10 characters long
A condition holds End date is not before Start date
Exists in another table Every Customer ID exists in Customers
Every row finds a match No rows of the left table are unmatched
Row count At least 1 row
Row count compared with the last run Row count is within 20% of the last run
A total Sum of Amount equals the control total in the source file
The source file is fresh The source file is newer than the last run
The latest date is recent The latest Order date is yesterday or later
Rows rejected No rows were rejected
The columns are as expected The table has the columns Order ID (text) and Amount (decimal)
No two input files are identical No two input files are identical
A column compared with the last run The share of empty Region values is within 50% of the last run
Custom SQL The custom SQL returns no rows
From a plugin A check an installed plugin provides

Options#

  • When it fails: Stop the run or Warn.
  • Allow: failing rows the check lets through before it trips, as a number of rows or a share of rows. Empty means none.
  • Only check some rows…: the check reads only the rows where a condition holds.
  • Hold back the failing rows and deliver the rest (row-level checks): “The run carries on without these rows and ends with warnings; they wait in the run’s quarantine to be released.” Show rows held in quarantine and Decide on rows waiting in quarantine in the command palette find them.
  • Name replaces the generated sentence if you prefer your own words; Note says why the check matters and who to ask when it fails.
  • Checks that compare with the last run say what they do before there is one: “This pipeline has not run yet, so there is no earlier run to compare with. Until there is one, this check passes.”

The editor shows the Result on the current data as you change it, and the check’s SQL (Copy SQL).

Reading check results#

A check is one line wherever it appears (the recipe, the run record, the review): its state, the rule, its severity (“stops the run” or “warns”) and the result.

State Means Result shows
Passed The rule held The measured value, such as “0 duplicates”
Warned The rule did not hold; the run went on The count, with show rows
Failed The rule did not hold; the run stopped The count in red, with show rows
Not run An earlier check stopped the run first Why it did not run

show rows opens the grid at that step, filtered to the offending rows. On a step card, the checks are summarised as badges (“3 checks”, “1 warning”, “1 failed”).

To evaluate every check now without writing anything, use Check the data now in the command palette, or gridkiln check on the command line.

Comparing with earlier runs#

Each run stores its row counts per step, its check results, and profiles of its outputs. The run record’s Compared with earlier runs puts this run beside the last one: rows read and written, and, when the output has a key, the rows added, removed and changed since the last run. The Rows tab (⇧⌥W / Shift+Alt+W) is the row accounting: a waterfall from the rows read to the rows written, with why rows left at each step (filtered, de-duplicated, unmatched, rejected). Choose a measure such as Amount to follow a total through the steps.

Validate steps#

The Validate family adds steps that act on failing rows rather than stopping the run: Route failing rows (sends rows that break a rule to rejects or quarantine; offered from a column’s menu) and Require columns (asserts the expected columns and types). See Steps by family.

See also#