sqlmesh
sqlmesh copied to clipboard
Document standalone audits
As part of this issue I raised #3665 I discovered this functionality within sqlmesh isn't covered in the documentation.
So far I plan to add this to docs/concepts/audits.md but could someone perhaps clarify for me if they are run as part of sqlmesh run/plan? Or are they only run with sqlmesh audit?
Also how are they scheduled? Do they end up with a default cron of @daily as it's not configurable?
Standalone Audits
It is also possible to configure audits to be standalone, these audits are not run after any model specifically.
AUDIT (
name assert_item_price_is_not_null,
dialect spark,
standalone TRUE,
depends_on (
sushi.items
)
);
SELECT * from sushi.items
WHERE
ds BETWEEN @start_ds AND @end_ds
AND price IS NULL;
Standalone audits cannot be blocking, only non-blocking as sqlmesh will not know which model should be blocked.