Run history and snapshots

funktional

Every run recorded with its parameters and outcomes, pinned snapshots kept encrypted, and run comparisons that say what changed and why.

What scheduled runs leave behind: the History rail lists each run with its tests, a hand-started run joins the same list, and two scheduled runs compared say the SQL stayed the same but the data changed and a check broke.

Real recording · typing sped up · Northwind demo data

Open the walkthrough on its own page

Every time a notebook runs in the app, SQLly records the run: when it ran, what was asked for, which cells ran or failed, test results and the parameter values used. The left rail's Verlauf tab lists those runs, lets you open a past run's results, pin a result as a named snapshot, and compare two runs to find out why a number moved.

The History tab

Each run is one row, newest first:

  • The time and what ran: This cell, Cell and its inputs, Alles ausführen, Out-of-date cells, Dependents, Cells above, Cells below, Selected cells. Runs from sqlly-cli and schedules show up the same way: a full run as Alles ausführen, --mode stale als Out-of-date cells, and a run of chosen cells (--cells) as Befehlszeile.
  • "12 cells ran · 1 failed", and "2 of 9 tests failing" when the notebook has tests.
  • The parameter values used. Sensitive values are never written: they show as hidden.
SQLly
Notebook History tab listing recorded runsNotebook History tab listing recorded runs
The History tab with two recorded runs: times, what ran, cells, failing tests and parameters.

Select a run and press Open run to see the results it produced, under the cells, titled "Results of run …". Results are kept encrypted for seven days; an older result shows "This result was not kept (it is too old, or results could not be stored)." The run records themselves don't expire. A past result opens only for the same connection, database and login it was fetched with; switch the cell's sign-in and it isn't shown.

Snapshots

To keep a result for comparison, select its cell, type a name in the Snapshot-Name box and press Pin snapshot ("Keep the selected cell's current result, encrypted on this computer, to compare with later."). A pinned snapshot doesn't age out with the seven-day results or the cache's space limit; it is removed only when saved results are cleared. Tests cells can use a snapshot as the baseline for drift checks, and Diff cells can compare against it ("Snapshot: golden").

Compare two runs

  1. Click two runs in the History tab (a third click drops the oldest pick).
  2. Drücke Compare runs. The panel "Compare runs: 10:02 → 11:47" lists every cell that differs.

For each cell it gives the cause, worked out from what each run recorded:

What it saysBedeutung
The cell's SQL changed.The query text differs (beyond whitespace and comments).
The cell's settings changed.A non-SQL cell's settings, such as a chart's or a check's.
Parameters changed: region.A parameter the cell uses had a different value.
It ran on a different connection, database or sign-in.Same SQL, different place or login.
Its safety settings (read-only, limits, cache) changed.The cell's policy changed.
Cells it reads from changed: orders.An input cell changed, for one of the reasons above.
Same SQL, parameters and connection, but the data changed.Nothing about the notebook changed; the database returned different rows. Said only when both results were complete and checksummed.
Unchanged: same inputs and identical result.Nothing moved.

It also shows row-count and test-result differences per cell. That is usually enough to tell "someone edited the query" from "the data really changed" without re-running anything.

SQLly
Run comparison panel in the History tabRun comparison panel in the History tab
Comparing two runs: the panel explains, per cell, whether the SQL, the parameters or the data changed.

The CLI does the same with sqlly-cli notebook runs compare; see Ausführungshistorie.

Where history is kept

Run records are JSON lines under SQLLY/notebooks/runs/ in your user data folder, shared by the app, the CLI and schedules, so CLI and scheduled runs appear in the History tab, and runs from all three can be chosen as Saved run in the export dialog. Results of runs and snapshots, from the app and the CLI alike, are stored encrypted with a key from your system keychain; if the keychain can't be reached, runs are still recorded but their results aren't kept, and the History tab says why ("Results of runs cannot be kept: …"). Nothing about runs is written into the notebook file.

History belongs to the notebook you trusted, not just to its id. A file that copies another notebook's id (a copied file, or the original left behind by Save As) doesn't see that notebook's runs; it gets its own id the first time you save it, and SQLly says so once: "This file is a copy of another notebook, so it now has its own identity: its trust, run history and local data are kept apart from the original's." The file this computer already knew keeps the history. An untrusted notebook shows no saved results.

Grenzen

  • The History tab lists the newest 200 runs.
  • Runs from the CLI record no query plans.
  • Runs recorded by an older version, before causes were recorded, can only say "Something changed, but the older run does not record what."
  • In the browser build, results of runs and snapshots aren't kept ("Saved results are not available in this build.").