lakehouse_engine.terminators.notifiers.notification_templates

Email notification templates.

 1"""Email notification templates."""
 2
 3
 4class NotificationsTemplates(object):
 5    """Templates for notifications."""
 6
 7    EMAIL_NOTIFICATIONS_TEMPLATES = {
 8        "failure_notification_email": {
 9            "subject": "Service Failure",
10            "mimetype": "plain",
11            "message": """
12            Job {{ databricks_job_name }} in workspace {{ databricks_workspace_id }} has
13            failed with the exception: {{ exception }}""",
14            "args": [
15                "exception",
16            ],
17            "on_failure": True,
18        },
19        "opsgenie_notification": {
20            "subject": "{{ data_product }} - Failure Notification",
21            "mimetype": "plain",
22            "message": """
23                Opsgenie notification:
24                    - Data Product: {{ data_product }}
25                    - Job name: {{ databricks_job_name }}
26                    - Alias: {{ alias }}
27                    - Priority: {{ priority }}
28                    - Entity: {{ entity }}
29                    - Tags: {{ tags }}
30                    - Action: {{ action }}
31                    - Description: {{ description }}
32                    - Exception: {{ exception }}""",
33            "args": [
34                "data_product",
35                "alias",
36                "priority",
37                "entity",
38                "tags",
39                "action",
40                "description",
41                "exception",
42            ],
43            "on_failure": True,
44        },
45    }
class NotificationsTemplates:
 5class NotificationsTemplates(object):
 6    """Templates for notifications."""
 7
 8    EMAIL_NOTIFICATIONS_TEMPLATES = {
 9        "failure_notification_email": {
10            "subject": "Service Failure",
11            "mimetype": "plain",
12            "message": """
13            Job {{ databricks_job_name }} in workspace {{ databricks_workspace_id }} has
14            failed with the exception: {{ exception }}""",
15            "args": [
16                "exception",
17            ],
18            "on_failure": True,
19        },
20        "opsgenie_notification": {
21            "subject": "{{ data_product }} - Failure Notification",
22            "mimetype": "plain",
23            "message": """
24                Opsgenie notification:
25                    - Data Product: {{ data_product }}
26                    - Job name: {{ databricks_job_name }}
27                    - Alias: {{ alias }}
28                    - Priority: {{ priority }}
29                    - Entity: {{ entity }}
30                    - Tags: {{ tags }}
31                    - Action: {{ action }}
32                    - Description: {{ description }}
33                    - Exception: {{ exception }}""",
34            "args": [
35                "data_product",
36                "alias",
37                "priority",
38                "entity",
39                "tags",
40                "action",
41                "description",
42                "exception",
43            ],
44            "on_failure": True,
45        },
46    }

Templates for notifications.

EMAIL_NOTIFICATIONS_TEMPLATES = {'failure_notification_email': {'subject': 'Service Failure', 'mimetype': 'plain', 'message': '\n Job {{ databricks_job_name }} in workspace {{ databricks_workspace_id }} has\n failed with the exception: {{ exception }}', 'args': ['exception'], 'on_failure': True}, 'opsgenie_notification': {'subject': '{{ data_product }} - Failure Notification', 'mimetype': 'plain', 'message': '\n Opsgenie notification:\n - Data Product: {{ data_product }}\n - Job name: {{ databricks_job_name }}\n - Alias: {{ alias }}\n - Priority: {{ priority }}\n - Entity: {{ entity }}\n - Tags: {{ tags }}\n - Action: {{ action }}\n - Description: {{ description }}\n - Exception: {{ exception }}', 'args': ['data_product', 'alias', 'priority', 'entity', 'tags', 'action', 'description', 'exception'], 'on_failure': True}}