Skip to content
bricksentry

Live notebook · runs in your browser

Try bricksentry in your browser

The real bricksentry 0.1.33 from PyPI, running on DuckDB in your browser. Nothing you type leaves your device.

Downloads Python, DuckDB and bricksentry once, about 10 s.

// how a check works

production sales.orders v41 · 20,000 rowsnever written to

shallow clone · the write runs here

diff: clone vs v41rows ±duplicate keystotals
policy rulespasswarnneeds_humanblock
block

RESTORE TABLE sales.orders TO VERSION AS OF 41

Same as on Databricks

  • The same bricksentry package from PyPI
  • The same data diff, policy rules and verdicts
  • The same guard that refuses unsafe statements

Different here

  • DuckDB in your browser, not SQL on your warehouse
  • A static example lineage, not Unity Catalog
  • Simple snapshots, not shallow clones and Delta history
Read the docs

not created yet

Setup: the demo table

Creates the 20,000-row sales.orders table from the demo (SEED_SQL) and the static lineage from its CONFIG. Other cells run this first if needed.

[ ]Python · Shift+Enteridle

What depends on it

Before changing a table, an agent asks who reads it. Owners and tags come from the lineage.

[ ]Python · Shift+Enteridle

An agent's DELETE, previewed on a clone

The statement runs on a disposable copy, is diffed against production, and gets a verdict. Production is never touched.

[ ]SQL · Shift+Enteridle
The Python this runs
sql = """…"""
sentry.preview_write(sql, target="sales.orders")

A join bug in a pull request

The agent's rebuild of the table in a PR schema, checked the way bricksentry assess checks it. Its join fans out some orders.

[ ]SQL · Shift+Enteridle
The Python this runs
sql = """…"""
b.execute(sql)
assessment = sentry.assess(["sales.orders"], pr="42")
assessment.to_dict()

The fix

The same change without the bad join. See what bricksentry says now.

[ ]SQL · Shift+Enteridle
The Python this runs
sql = """…"""
b.execute(sql)
assessment = sentry.assess(["sales.orders"], pr="42")
assessment.to_dict()

A pipeline commits a bad MERGE

The change lands on production anyway. check_change reads the table history, checks the latest data change against the version before it, and prepares the undo.

[ ]Python · Shift+Enteridle

Your turn

Preview any INSERT, MERGE, UPDATE or DELETE against sales.orders. Or pick an example:

[ ]SQL · Shift+Enteridle
The Python this runs
sql = """UPDATE {{target}} SET amount = amount * 1.10 WHERE region = 'APAC'"""
sentry.preview_write(sql, target="sales.orders")
  • Raise APAC prices 10%: Changes the amount of every APAC order: watch the total move and the segment point at APAC.
  • Delete 300 orders: Removes the first 300 orders: compare the row loss with the policy's row-loss limit.
  • Move 50 between two orders: The net total doesn't move. bricksentry still shows the 2 changed rows; reporting the absolute amount moved is on the roadmap.
  • DROP TABLE: Not a write bricksentry will preview: see the guard refuse it and say what to do instead.

Run the full CLI demo

The same output as bricksentry demo in a terminal, on its own fresh table.

[ ]Python · Shift+Enteridle

How teams use this

Three scenarios, each one a cell above.

  • An AI agent changes a table

    It previews the write first, gets needs_human, and opens a PR instead.

    See it in cell c
  • A pull request with a join bug

    CI fails on block: the join added duplicate keys.

    See it in cell d
  • A nightly pipeline's bad MERGE

    The job task blocks, downstream tasks don't run, Slack gets the RESTORE.

    See it in cell f
  • Tested on real Databricks

    Live runs on a Databricks workspace with an HR pipeline: a 200,000-row employees table and a certified mart. Every result and bug is recorded.

    See the validation runs