Skip to content

(Feature Request) Add "audit pass" as a notification event #5865

Description

@sjdur0

Summary

At present it is possible for audit failure events to be passed to a notification target, but not audit passes.

Motivation

My primary use case for this relates to a previous issue around storing audit logs for use in reporting. It would be good to be able to report on and analyse audits in the same way it is possible to do so for other tools (such as dbt, for example).

The aforementioned issue was closed due to encroachment on Tobiko Cloud features, a reason that shouldn't apply any more. The issue also includes a few workarounds:

  1. Run all audits via the Python API to get the results as an object. This is wasteful, since audits are executed as part of plan/run anyway,
  2. Create a custom notification target class to parse and write the audit errors as desired. This is much better, but doesn't capture all audits, only failing audits.

The addition of an "audit pass" notification event feels like a simple first step towards enabling teams to track audit results without major changes for a format process within SQLMesh.

Proposed Solution

Add a new AUDIT_PASS type of NotificationEvent, and send these in sqlmesh.core.scheduler.Scheduler._audit_snapshot where currently notifications are only sent for failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions