liveBook · Manning

Email notification

As explained in Snowflake Data Engineering

An email notification is an electronically delivered message containing information or an alert for one or more recipients.

An email notification is an electronically delivered message used to report pipeline activity, such as a start event, completion timestamp, processed rows, or other operational information. Snowflake sends it through a notification integration and the SYSTEM$SEND_EMAIL stored procedure. section 13.2 section 13.3.2

Configure and use an email notification in Snowflake by following this sequence:

  • Create an enabled email notification integration with a sufficiently privileged role, then grant usage on it to the role that sends messages. section 13.2
  • Send the message with SYSTEM$SEND_EMAIL, providing the integration name, one or more comma-separated recipients, subject, and body. section 13.2
  • Use verified email addresses belonging to users in the same Snowflake account; a free trial account can be tested by emailing its verified user. section 13.2
  • Place the procedure call in a task to notify operators when an orchestrated pipeline starts or finishes. section 13.3.2 section 13.4.2

Summarizing a pipeline run

A finalizer task reads task names and processed-row counts from PIPELINE_LOG for the current task-graph run group, appends them to a return message, and sends the summary with SYSTEM$SEND_EMAIL. A resulting notification can report the completion timestamp and rows processed by each task. section 13.4.2

use role ACCOUNTADMIN;
create notification integration PIPELINE_EMAIL_INT
  type = email
  enabled = true;

Use the runnable SQL to create the enabled email notification integration before granting usage and calling SYSTEM$SEND_EMAIL. section 13.2

How Snowflake Data Engineering covers it

How deep it goes
Explains integration setup, privileges, recipient verification, procedure parameters, and task-based implementation with logging summaries.
Examples
Demonstrates test messages, pipeline start alerts, and completion emails listing task names and processed-row counts.
What it assumes
Assumes a Snowflake account with verified user email addresses, notification-integration privileges, and an orchestrated task pipeline.
What you can do after
Operate/configure Snowflake email delivery for pipeline status messages and execution summaries.
How it connects
Connects email notifications with notification integrations, stored procedures, Snowflake tasks, task graphs, and pipeline logging.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Snowflake Data Engineering. The section links point to the parts of the book it draws on.