From 81d85b91a3d1bc437d7dbef5c6f5b99f56313cf4 Mon Sep 17 00:00:00 2001 From: Kevin Longe <273747162+kvlonge@users.noreply.github.com> Date: Fri, 23 Oct 2026 08:25:17 +0100 Subject: [PATCH] docs: plainer Recall homepage step and SQL macro constant scope --- .../references/docs/concepts/macros/sql-macros.md | 9 +++++---- website/public/index.html | 8 ++++---- .../src/content/docs/docs/concepts/macros/sql-macros.mdx | 9 +++++---- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/sqlbuild/.agents/skills/sqlbuild/references/docs/concepts/macros/sql-macros.md b/src/sqlbuild/.agents/skills/sqlbuild/references/docs/concepts/macros/sql-macros.md index 9d98c3f32e..3db8c8c4a1 100644 --- a/src/sqlbuild/.agents/skills/sqlbuild/references/docs/concepts/macros/sql-macros.md +++ b/src/sqlbuild/.agents/skills/sqlbuild/references/docs/concepts/macros/sql-macros.md @@ -233,10 +233,11 @@ other (`P020`); compose them in the model by passing results, as in a visible name. A body may not call `__ref()`, `__source()` or `__seed()` (`P016`): pass relations in as `RELATION` -arguments. `@const(...)` and `@enum(...)` in a body resolve from the macro file's own folder, like -audits and unlike Python macros; one that is not visible from there fails with `S026`. Make it a -parameter and pass the value from the caller instead. SQL macros a body calls resolve the same way, -so a macro can call a folder-local macro beside it that its callers cannot see. +arguments. `@const(...)` and `@enum(...)` in a body resolve from the macro file's folder, not from +the calling model, so a macro means the same thing wherever it's called. A constant or enum that +isn't visible from there fails with `S026`; to use a caller's value, make it an argument and pass +`@const(...)` at the call site. SQL macros a body calls resolve the same way, so a macro can call a +folder-local macro beside it that its callers cannot see. ## Checks and tools diff --git a/website/public/index.html b/website/public/index.html index 02b19df034..1b7524dfbb 100644 --- a/website/public/index.html +++ b/website/public/index.html @@ -368,14 +368,14 @@

Archive old tables before deleting them

09 · Investigate -

Find out what happened, then check what's true now

+

Look back at past runs

- SQLBuild records every run: what ran, the SQL it executed, audit results and everything it printed. You or an agent can query that history in SQL, and the same command queries the warehouse to check what's true now. + SQLBuild keeps a record of every run: what ran, the SQL, audit results and the output. Query it in SQL, and query the warehouse with the same command.

- Here an audit started warning on the latest run, but the build still exited 0. The first two commands show when it started and what the run printed. The third finds the cause, still in prod: a refund stored as a negative payment. + Here an audit started warning but the build still passed. Two queries find when it started and what the run printed; a third finds the bad row, still in prod.

-

History lives in a SQLite file in your project, or in ClickHouse for a team. No service to run, no account, no paid tier.

+

The record is a SQLite file in your project, or ClickHouse for a team.

How Recall works →

sqb recall query "SELECT substr(a.invocation_started_at, 1, 16) AS run,
diff --git a/website/src/content/docs/docs/concepts/macros/sql-macros.mdx b/website/src/content/docs/docs/concepts/macros/sql-macros.mdx
index e60304e873..3b0bf46801 100644
--- a/website/src/content/docs/docs/concepts/macros/sql-macros.mdx
+++ b/website/src/content/docs/docs/concepts/macros/sql-macros.mdx
@@ -220,10 +220,11 @@ other (`P020`); compose them in the model by passing results, as in
 a visible name.
 
 A body may not call `__ref()`, `__source()` or `__seed()` (`P016`): pass relations in as `RELATION`
-arguments. `@const(...)` and `@enum(...)` in a body resolve from the macro file's own folder, like
-audits and unlike Python macros; one that is not visible from there fails with `S026`. Make it a
-parameter and pass the value from the caller instead. SQL macros a body calls resolve the same way,
-so a macro can call a folder-local macro beside it that its callers cannot see.
+arguments. `@const(...)` and `@enum(...)` in a body resolve from the macro file's folder, not from
+the calling model, so a macro means the same thing wherever it's called. A constant or enum that
+isn't visible from there fails with `S026`; to use a caller's value, make it an argument and pass
+`@const(...)` at the call site. SQL macros a body calls resolve the same way, so a macro can call a
+folder-local macro beside it that its callers cannot see.
 
 ## Checks and tools