auto-data-alerts
auto-data-alerts is a Python package that monitors Snowflake views and
sends formatted alert messages to Slack channels. Point it at a view in
your DATA_ALERTS schema, configure a template and channel, and it
handles the rest — querying the data, formatting the message, sending to
Slack, and logging the result.
Features
- Snowflake integration — queries any view in your
DATA_ALERTSschema, no boilerplate required - 5 message templates — from simple row-by-row lists to grouped data, metrics dashboards, and summary cards
- Smart skipping — if a view returns no rows, the alert is skipped and the outcome is still logged
- Alert history logging — every run (success or failure) is written back to Snowflake for auditing
- Debug mode — set
DEBUG=TRUEto redirect all messages to a test channel without changing any code
Installation
Install the latest version directly from GitHub:
pip install git+https://github.com/cooper-richason/auto-data-alerts.git
Or from PyPI:
pip install auto-data-alerts
Setup
The package reads credentials from environment variables. Set the following before running:
| Variable | Description |
|---|---|
SNOWFLAKE_USER |
Snowflake username |
SNOWFLAKE_PASSWORD |
Snowflake password |
SNOWFLAKE_ACCOUNT |
Snowflake account identifier |
SNOWFLAKE_WAREHOUSE |
Warehouse to use for queries |
SNOWFLAKE_DATABASE |
Database containing the DATA_ALERTS schema |
SLACK_BOT_TOKEN |
Slack Bot OAuth token (xoxb-...) |
DEBUG |
Set to TRUE to route all messages to your test channel (optional) |
How to use
The core function is send_alert. Call it with the Snowflake view name,
a group label, a configuration dict, and the Slack channel ID:
from auto_data_alerts.core import send_alert
view_config = {
'format_template': 'F1', # which template to use
'message_text': '@here, new alert:' # optional intro text
}
send_alert(
view='my_alert_view', # name of the Snowflake view in DATA_ALERTS schema
view_group='my_team', # prefix / team label used for titles and logging
view_config=view_config,
slack_channel='C01234ABCDE' # Slack channel ID
)
If the view returns no rows, the call returns early and logs a skipped
result. If DEBUG=TRUE is set in the environment, the message is sent
to your configured test channel instead.
See the full usage guide for complete setup instructions, Snowflake schema requirements, and configuration options.
Message Templates
Choose a template with the format_template key in view_config. All
templates include a header derived from the view name and log the result
to Snowflake.
| Template | Key | Best for |
|---|---|---|
| F1 (default) | 'F1' |
Row-by-row list with a label on the left and detail fields on the right |
| F2 | 'F2' |
Summary count and column stats with a “View Details” button |
| F3 | 'F3' |
Rows grouped by a category column, with optional per-group stats |
| F4 | 'F4' |
Metrics dashboard — configurable KPIs at the top, filtered critical alerts below |
| F5 | 'F5' |
Single-row view where each column becomes its own section block |
Release files for auto-data-alerts 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| auto_data_alerts-0.0.2.tar.gz | 23.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| auto_data_alerts-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.7 kB
Release files / auto_data_alerts-0.0.2.tar.gz
| Download URL | auto_data_alerts-0.0.2.tar.gz |
|---|---|
| Size | 23.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e155abfe69ec5718d7c1edbe01a580c1201f753883d32c9aa3daf872d203cc27
|
|
BLAKE2b-256 checksum How to use checksums |
95581bde3499afd862b068b5a6a6515d2153e1d91f3c3f4ef9146530d499a1c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / auto_data_alerts-0.0.2-py3-none-any.whl
| Download URL | auto_data_alerts-0.0.2-py3-none-any.whl |
|---|---|
| Size | 28.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16bf3fbdc974476dcf26afd85758e7bd7e45fcd86eba5dbe94d63bb6599fa8b5
|
|
BLAKE2b-256 checksum How to use checksums |
4c6b6866413959311d3442fbf33efec743d90c7f4aa0a7de33b5b5f37427a684
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|