From 451959675a44e0795f98690e844d1a54d6edf0fe Mon Sep 17 00:00:00 2001 From: jonhopper-dataengineers Date: Wed, 31 May 2023 15:03:42 +1200 Subject: [PATCH] fixed email linkages --- ...lake_create_or_replace_monitorial_alert_email_statement.sql | 3 ++- ...flake_create_or_replace_monitorial_task_email_statement.sql | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/macros/monitorial/snowflake_create_or_replace_monitorial_alert_email_statement.sql b/macros/monitorial/snowflake_create_or_replace_monitorial_alert_email_statement.sql index 5c374ae..ecd89ad 100644 --- a/macros/monitorial/snowflake_create_or_replace_monitorial_alert_email_statement.sql +++ b/macros/monitorial/snowflake_create_or_replace_monitorial_alert_email_statement.sql @@ -36,7 +36,8 @@ CREATE OR REPLACE ALERT {{ target_relation.include(database=(not temporary), sch 'timestamp', :alert_timestamp, 'accountName', :alert_account_name, 'environment', :alert_environment, - 'alertName', :alert_name, + 'objectName', :alert_name, + 'listener', 'snowflake_email', 'severity', :alert_severity, 'description', :alert_display_message, 'messages', ARRAY_AGG(OBJECT_CONSTRUCT(*))) AS alert_body diff --git a/macros/monitorial/snowflake_create_or_replace_monitorial_task_email_statement.sql b/macros/monitorial/snowflake_create_or_replace_monitorial_task_email_statement.sql index f4846a8..fb6b507 100644 --- a/macros/monitorial/snowflake_create_or_replace_monitorial_task_email_statement.sql +++ b/macros/monitorial/snowflake_create_or_replace_monitorial_task_email_statement.sql @@ -32,10 +32,11 @@ CREATE OR REPLACE TASK {{ target_relation.include(database=(not temporary), sche SELECT OBJECT_CONSTRUCT('version', :alert_version, 'messageId', :alert_message_id, 'messageType', :alert_message_type, + 'listener', 'snowflake_email', 'timestamp', :alert_timestamp, 'accountName', :alert_account_name, 'environment', :alert_environment, - 'alertName', :alert_name, + 'objectName', :alert_name, 'severity', :alert_severity, 'description', :alert_display_message, 'messages', ARRAY_AGG(OBJECT_CONSTRUCT(*))) AS alert_body