Built-in formatters

Formatter classes implement logic to build messages for notifications in various formats based on CheckResult.

Example usage:

snowkill_formatter = SlackFormatter(getenv("SNOWSIGHT_BASE_URL"))

for r in check_results:
    response = send_slack_message(
        slack_token=getenv("SLACK_TOKEN"),
        slack_channel=getenv("SLACK_CHANNEL"),
        message_blocks=snowkill_formatter.format(r),
    )

Common arguments

  • snowsight_base_url (str) - should be copy-pasted from browser window. It usually consists of http://app.snowflake.com/, followed by organisation name and account name. But it might be different for old accounts and accounts with Private Link. Please copy-pate this:

Usage notes

  • Formatters return list of message blocks instead of one large strings. This approach helps you to extend and make minor adjustments to message format without implementing your own custom formatter.

Last updated