Skip to content
Download

Result checks ​

A result check is a rule for the data a step returns: enough rows, no empty emails, unique ids and so on. Checks catch bad data before later steps load or send it. Every step type except Chart can have checks.

Add a check ​

  1. Open the job in the editor and select the step.
  2. Under Result checks, click Add check.
  3. Choose the rule in Check and fill in its fields.
  4. In When it fails, choose Stop the job or Warn.
  5. Save the job.

Run the step once before adding checks: the field inputs then suggest column names from its last result. A field that was not in that result is marked Not in the last run of the step.

Check kinds ​

CheckSettingsFails when
Minimum rowsRowsthe result has fewer rows
Maximum rowsRowsthe result has more rows
Fields presentFieldsa field is missing in every row
Not emptyFieldsa row has a field that is null, missing or blank text
UniqueFieldstwo rows share the same combination of values
Allowed valuesField, Allowed valuesa value is not in the list
Matches patternField, Regular expressiona text value does not match the pattern

A few details:

  • Allowed values compares values as text, so 1 and "1" are equal.
  • Matches pattern uses JavaScript regular expressions, for example ^[A-Z0-9-]+$.
  • Unique, Allowed values and Matches pattern skip empty values. Combine them with Not empty when a value is required.
  • A dotted field name such as address.city reads a nested value.

Which rows are checked ​

Checks read the step result as rows. An array is checked as it is; any other value counts as one row.

When the rows sit inside a larger object, such as an API response { "items": [...] }, enter the path in Rows from: items, data.results or items[0].rows. If the path is not in the result, every check of the step fails with Path ... is not in the result.

Stop or warn ​

Stop the job fails the step. The job stops after it, and the steps that depend on it do not run. The step result still stays in the run, so you can look at the data that failed.

Warn lets the job continue. The run is recorded as successful, with the warnings attached.

Checks run whenever the step runs: in a full run, a scheduled run, and when you run part of the job or a debug run.

Where results appear ​

Results appear in Execution history on the job page:

  • A run with warnings shows Warnings: N next to its status.
  • In the run, each step with a failed check lists the check, the number of failing rows and up to five sample rows.
  • A run stopped by a check shows the failed checks under Failed checks in its error details.

Notifications for scheduled runs ​

For scheduled runs QueryLane sends a macOS notification when:

  • a check with Stop the job stops the run (Scheduled run stopped by a result check);
  • the run finishes with check warnings (Scheduled run finished with check warnings: N);
  • the run fails for any other reason (Scheduled run failed).

Click the notification to open the job. Turn these notifications on or off with Scheduled runs in Settings > Notifications. Runs you start yourself do not send macOS notifications.