You’ve been asked to set up an automated alerting system for a critical data table. Whenever new rows appear, an email must be sent to notify the team immediately.
No dashboards. No polling. Just pure Snowflake magic.
Your Task:
Create an alert that sends an email when new data lands in a table named alert_input_data in your schema (week_135 or equivalent). Your alert should trigger automatically — not on a fixed schedule.
Constraints:
- Do not use the ACCOUNTADMIN role.
- The email must be sent using Snowflake’s built-in notification system.
- The alert must fire only when new rows are present. (So no timed checks)
- You must use a warehouse you have access to.
Expected Outcome:
When a new row is inserted into the table, you receive an email with a message confirming that new data has landed.
Bonus Challenges:
- Include useful metadata (like a row count or timestamp) in the email.
- Allow the alert to be reused for different tables or emails with minimal changes.
- Log when the alert was triggered and what it detected.
Hints (if you need them):
You’ll probably want to look into:
- Creating a table that supports data change detection
- Using Snowflake’s email notification integrations
- Writing alerts that are event-based, not scheduled
- Making sure your role has permission to execute the alert