You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4ad15cd
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/concepts/audits.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,7 +164,9 @@ Standalone audits are defined independently rather than being attached to a spec
164
164
165
165
Unlike model-level audits, standalone audits can be used to validate data across one or more models without being associated with a single model.
166
166
167
-
```sql
167
+
Standalone audits run as scheduled nodes during both `sqlmesh plan` and `sqlmesh run`.
168
+
169
+
```sql linenums="1"
168
170
AUDIT (
169
171
name assert_item_price_is_not_null,
170
172
dialect spark,
@@ -183,7 +185,7 @@ WHERE
183
185
184
186
In this example, the audit checks that the `price` column in `sushi.items` does not contain `NULL` values for the selected date range.
185
187
186
-
Standalone audits must declare the models they depend on using `depends_on`, since they are not attached to a model definition.
188
+
Standalone audits can declare dependencies using the `depends_on` property. SQLMesh can often infer dependencies directly from the audit query, but using `depends_on` is recommended when inference isn't sufficient.
0 commit comments