Account Management and Data Governance · Topic 7 of 8
Logging, Tracing, Alerts, Notifications and Lineage
Capture logs and traces in event tables, run alerts on a schedule, send email, webhook and queue notifications, and follow data lineage in Snowsight.
- 5 min
- Logs, traces and metrics go to an event table; SNOWFLAKE.TELEMETRY.EVENTS is the default.
- LOG_LEVEL and TRACE_LEVEL default to OFF; METRIC_LEVEL defaults to NONE. Lower objects override higher ones.
- Alerts: schedule, condition, action; warehouse or serverless; created suspended.
What it is
These features tell you what is happening in the account and where data comes from. Logging and tracing record what your code does, alerts watch for a condition, notifications deliver messages to people or systems, and lineage shows how data flows between objects.
They answer different questions, so the exam often lists them side by side as options.
| Feature | Question it answers |
|---|---|
| Logging and tracing | What did my UDF, procedure or app do, and how long did each step take? |
| Alerts | Has a condition I care about become true? |
| Notifications | How do I tell a person or another system? |
| Data lineage | Where did this table or column come from, and what depends on it? |
How it works
Logging and tracing
Handler code in stored procedures, UDFs, Streamlit apps, Snowpark Container Services and native apps can emit log messages, trace events (spans showing timing) and metrics. Snowflake stores them in an event table, a special table with a predefined set of columns.
Accounts include a default event table, SNOWFLAKE.TELEMETRY.EVENTS. You can create your own with CREATE EVENT TABLE and make it active with ALTER ACCOUNT SET EVENT_TABLE = ....
How much is captured depends on three parameters, set on the account, database, schema or object.
| Parameter | Controls | Default |
|---|---|---|
| LOG_LEVEL | Minimum severity of log messages kept, such as ERROR, WARN, INFO, DEBUG | OFF |
| TRACE_LEVEL | Whether trace events are captured, such as ALWAYS or ON_EVENT | OFF |
| METRIC_LEVEL | Whether CPU and memory metrics are captured | NONE |
A setting on a lower object overrides a higher one, so an INFO level on one function beats a FATAL level on the account. You query the event table with ordinary SQL, or browse it in Snowsight.
If code logs messages but nothing appears, check that an event table is active and that LOG_LEVEL is not OFF for that object.
Alerts
An alert is a schema-level object with three parts: a schedule, a condition and an action.
CREATE ALERT high_error_rate
WAREHOUSE = admin_wh
SCHEDULE = '60 MINUTE'
IF (EXISTS (SELECT 1 FROM load_errors WHERE error_time > DATEADD(hour, -1, CURRENT_TIMESTAMP())))
THEN CALL SYSTEM$SEND_EMAIL('ops_email_int', '[email protected]', 'Load errors', 'Check load_errors');
If the condition query returns rows, the action runs. The schedule can be an interval or a cron expression.
Omit WAREHOUSE to run the alert on serverless compute. A new alert is suspended; run ALTER ALERT ... RESUME to start it.
Creating alerts needs the EXECUTE ALERT account privilege (granted by ACCOUNTADMIN), or EXECUTE MANAGED ALERT for serverless alerts, plus CREATE ALERT on the schema. Review runs with the ALERT_HISTORY table function or ACCOUNT_USAGE view.
Alerts on new data have no schedule; they evaluate only rows inserted since the last check, which suits watching an event table or log table.
Notifications
Snowflake sends notifications through a notification integration, created by an administrator.
| Integration type | Destination |
|---|---|
| Verified email addresses of users in the account | |
| WEBHOOK | Services such as Slack, Microsoft Teams or PagerDuty |
| QUEUE | Amazon SNS, Google Cloud Pub/Sub or Azure Event Grid |
SYSTEM$SEND_EMAIL sends an email through an email integration. SYSTEM$SEND_SNOWFLAKE_NOTIFICATION sends a message to email, webhook or queue integrations.
Notifications are also built into other features: tasks and Snowpipe can send error notifications, resource monitors and budgets email administrators, and the Trust Center emails findings.
Data lineage
Data lineage shows how data moves from source objects to target objects. In Snowsight, open Catalog, select a table or view in the Explorer, then the Lineage tab.
The graph shows upstream sources and downstream targets, at object and column level. It is built from operations such as COPY INTO, CREATE TABLE AS SELECT, INSERT SELECT, MERGE, UPDATE, cloning and view definitions.
Lineage requires Enterprise Edition or higher. The SNOWFLAKE.CORE.GET_LINEAGE function returns lineage in SQL, and the ACCOUNT_USAGE ACCESS_HISTORY view records which objects and columns each query read and wrote.
Lineage is a governance tool, not a backup. It tells you which tables feed a broken report; Time Travel or replication is what restores the data.
Common mistakes
Expecting logs without an event table. Log and trace data goes to the active event table; without one, nothing is stored.
Forgetting to resume an alert. Alerts start suspended and never run until resumed.
Sending email to anyone. Email notifications go only to verified email addresses of users in the account.
Treating an alert as a notification. The alert checks the condition; the notification integration delivers the message.
What to remember for the exam
- Logs, traces and metrics go to an event table; SNOWFLAKE.TELEMETRY.EVENTS is the default.
- LOG_LEVEL and TRACE_LEVEL default to OFF; METRIC_LEVEL defaults to NONE. Lower objects override higher ones.
- Alerts: schedule, condition, action; warehouse or serverless; created suspended.
- Notification integrations: EMAIL, WEBHOOK, QUEUE. Send with SYSTEM$SEND_EMAIL or SYSTEM$SEND_SNOWFLAKE_NOTIFICATION.
- Lineage: Snowsight Catalog, upstream and downstream, column level, Enterprise Edition.
Check yourself
Where do log messages from a Python UDF handler end up?
In the account's active event table, if LOG_LEVEL allows that severity for the function.
An alert was created but has never fired, even though the condition is true. What is the likely cause?
Alerts are created suspended, so it must be started with ALTER ALERT ... RESUME.
Which Snowsight feature shows every view and table built from a raw table?
Data lineage, on the Lineage tab of the object in Catalog, showing downstream objects.
Topic 7 of 8 in Account Management and Data Governance
Test yourself on Account Management and Data Governance
The full Snowflake SnowPro Core COF-C03 question bank has 845 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Snowflake. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.