User Community Service Desk Downloads
If you can't find the product or version you're looking for, visit support.ataccama.com/downloads

Notification Templates

When email notifications are enabled for monitoring projects, emails are sent to the recipients (as defined on the Notifications tab of the project) in the case of an event. The template for these emails is configurable, as described in this article.

Templates are created on application level, not per project.

Only power users can create new email templates. This means you can edit existing templates but not create new ones.

Notification templates are found in Global Settings > Application Settings > Email Templates / MS Teams / Slack.

200

Template upgrade

If you upgraded to version 14.5.0 from a previous version, follow these instructions to upgrade your notification templates.

Upgrade default templates

All default templates have been replaced in version 14.5.0 and the new templates use Mustache template language instead of Thymeleaf.

When you migrate to version 14.5.0, the upgrade process replaces the default templates.

This applies for email, Slack, and MS Teams notifications.

Upgrade custom templates

For custom templates, or in the case that the default templates were previously edited, no automatic replacement is available. You are notified if a template is outdated.

All new templates and template edits can be saved only if they use new engine template syntax.

These templates can still be used, but they can’t be modified unless rewritten into the new template syntax.

When you select Edit on an outdated template, you see two sections: Current content and New content. Copy the template from current to new and edit accordingly.

500

Changes required are different for every custom template, so it is not possible to outline all required changes. The syntax of your template needs to be replaced with Mustache template language syntax.

This can look as follows:

  • Variables and placeholders: ${context.schema} changes to {{context.schema}}.

  • Null check in HTML (email templates):

    // Old format
    <p class="systemInfo" th:if="${context.changeDescription != null}" th:text="${context.changeDescription}">Attribute changed</p>
    
    // New format
    {{#context.changeDescription}}<p class="systemInfo">{{context.changeDescription}}</p>{{/context.changeDescription}}
  • Null check in JSON (Slack and Teams templates):

    // Old format
    [(${context.changeDescription != null} ? '\n' + ${context.changeDescription} : '')]
    
    // New format
    {{#context.changeDescription}}\n{{context.changeDescription}}{{/context.changeDescription}}

Examples of upgraded template

To get an idea of the changes which are required, see the following examples:

Project error notification (email)

800
Old format
Click to expand
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml">
<head><title>Monitoring project results</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="viewport" content="device-width, initial-scale=1.0"/>
    <link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'/> <!-- use the font -->
    <style> body {
        font-family: 'Roboto', sans-serif;
        font-size: 14px;
    } </style>
</head>
<body><p> Dear colleague,<br/> Error occurred during the processing of Monitoring project. </p> <br/>
<p><b>When: </b><span th:text="${context.finishedAt}"></span></p>
<p><b>Link: </b> <a th:href="@{{baseUrl}/dq/projects/monitoringProject/{projectId}(projectId=${context.projectId}, baseUrl=${baseUrl})}"> <span th:text="${context.projectName}"></span> </a></p>

<p>You can examine the following jobs to see what went wrong:
    <tr th:each="jobId: ${context.failedJobIds}">
        <td><a th:href="@{{baseUrl}/baseJob/{jobId}(jobId=${jobId}, baseUrl=${baseUrl})}"> <span th:text="${jobId}"/> </a></td>
    </tr>
</p>
</body>
</html>
New format
Click to expand
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Monitoring project results</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="device-width, initial-scale=1.0"/>
    <link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'/>
    <!-- use the font -->
    <style>
        body {
            font-family: 'Roboto', sans-serif;
            font-size: 14px;
        }
    </style>
</head>
<body>
    <p>
        Dear colleague,<br />
        Error occurred during the processing of Monitoring project.
    </p>
    <br />
    <p>
        <b>When: </b><span>{{context.finishedAt}}</span>
    </p>
    <p>
        <b>Link: </b>
        <a href="{{baseUrl}}/dq/monitoringProject/{{context.projectId}}">
            <span>{{context.projectName}}</span>
        </a>
    </p>

    <p>You can examine the following jobs to see what went wrong:
        {{#context.failedJobIds}}
        <tr>
            <td>
                <a href="{{baseUrl}}/processing-center/baseJob/{{.}}">
                    <span>{{.}}</span>
                </a>
            </td>
        </tr>
        {{/context.failedJobIds}}
    </p>
</body>
</html>

Anomaly observability issue (Slack)

800
Old format
Click to expand
[
  {
    "type": "section",
    "text": {
      "type": "mrkdwn",
      "text": ":warning: *<[(${baseUrl})]/catalog/data/source/[(${context.sourceId})]/data-observability?issueId=[(${context.issueId})]|Anomalies detected>*"
    }
  },
  {
    "type": "section",
    "text": {
      "type": "mrkdwn",
      "text": "Found anomalies in [(${context.anomalousAttributeCount})] [(${context.anomalousAttributeCount > 1} ? 'attributes' : 'attribute')]."
    }
  },
  {
    "type": "section",
    "text": {
      "type": "mrkdwn",
      "text": "System: [(${context.sourceName})]\nSchema: [(${context.schema})]\nCatalog Item: [(${context.catalogItemName})]"
    }
  }
]
New format
Click to expand
[
  {
    "type": "section",
    "text": {
      "type": "mrkdwn",
      "text": ":warning: *<{{baseUrl}}/catalog/data/source/{{context.sourceId}}/data-observability?issueId={{context.issueId}}|Anomalies detected>*"
    }
  },
  {
    "type": "section",
    "text": {
      "type": "mrkdwn",
      "text": "Found anomalies in {{context.anomalousAttributeCount}} {{#context.moreThanOneAnomalousAttributes}}attributes{{/context.moreThanOneAnomalousAttributes}}{{^context.moreThanOneAnomalousAttributes}}attribute{{/context.moreThanOneAnomalousAttributes}}."
    }
  },
  {
    "type": "section",
    "text": {
      "type": "mrkdwn",
      "text": "System: {{context.sourceName}}\nSchema: {{context.schema}}\nCatalog Item: {{context.catalogItemName}}"
    }
  }
]

Edit templates

Email

To edit an existing email template, select the template name to open the Overview tab, then select Edit.

We advise against changing the following:

  • The name of the email template. If the template with the required name is not found on the list, the application sends the default message from a hardcoded file.

Or deleting:

  • The content lines context. You can format templates and add new information, however, we recommend not removing any properties.

    In each of the templates, do not delete the following content:

    • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">

    • The ID {{context.projectId}}.

      It can be moved to a different line, but making a mistake while editing the content between the brackets might create an invalid reference and break the template.

Email templates are written in HTML according to Mustache template language syntax.

Useful fields when editing the email templates include:

  • Project name: {{context.projectName}}.

  • Status of a project run (failed, finished, finished with error): {{context.overallResult}}.

  • Structure check results: {{context.structureResult}}.

  • Anomaly detection results: {{context.anomalyResult}}.

  • DQ check results: {{context.dqResult}.

  • Date of processing, error: {{context.finishedAt}}.

  • Link to the project: "{{baseUrl}}/dq/monitoringProject/{{context.projectId}}".

  • Error message (link to the error): "{{baseUrl}}/processing-center/baseJob/{{.}}".

Slack and Teams

Slack and Teams templates are written using JSON according to Mustache template language syntax.

Useful fields for template edits include:

All the fields listed (except baseUrl) can be found via the context object, for example, context.sourceName.

Common fields for all templates:

  • sourceName: Name of the source the issue was detected in.

  • issueId: ID of the issue.

  • sourceId: Source ID.

  • detectedAt: The time the issue was created.

  • baseUrl: Can be used for creating links back to Ataccama ONE, for example, to a specific monitoring project. This field is available only as baseUrl, not under the context object.

anomaly-observability-issue.json

  • schema: The schema in which the anomaly issue was detected.

  • catalogItemName: Name of the catalog item the anomaly issue was detected on.

  • anomalousAttributeCount: Number of the anomalous attributes the catalog item has.

dq-anomaly-observability-issue.json

  • qualityDrop: The detected drop in data quality (percentage).

  • schema: The schema in which the DQ anomaly issue was detected.

  • catalogItemName: Name of the catalog item the anomaly issue was detected on.

  • score: Anomaly score.

  • explanation: Explanation of why this is considered an anomaly.

dq-observability-issue.json

  • qualityDrop: The detected drop in data quality (percentage).

  • schema: The schema in which the DQ issue was detected.

  • catalogItemName: Name of the catalog item the DQ issue was detected on.

schema-check-observability-issue.json

  • location: Location of the detected schema change (typically a schema).

  • catalogItemName: Name of the catalog item the schema issue was detected on.

  • changeDescription: Description of the detected schema change.

  • changeType: The type of schema change (catalog item created, catalog item removed, attribute created, attribute removed, attribute data type changed).

volume-anomaly-observability-issue.json

  • schema: The schema in which the volume anomaly issue was detected.

  • catalogItemName: Name of the catalog item the volume anomaly issue was detected on.

Delete templates

Currently, we do not recommend using this action. If the template with the required name is not found, the application sends the default message from a hardcoded file.

To delete unnecessary email templates from the list, follow one of these options. The email is removed from the list immediately.

  • To delete a single email, click the email name to open the Overview tab, select the three dots menu and then Delete.

    150
  • To delete multiple emails, select the emails to be deleted from the list and select Delete.

    600

Was this page useful?