Notification Procedures
The Data Virtuality Server can send you notifications by email or via Slack. In this page, we describe the procedures and the syntax; for more general information on how the notifications work, please refer to the dedicated page.
SYSADMIN.enableJobEmailNotification
This procedure enables email notifications for the given job(s).
SYSADMIN.enableJobEmailNotification(IN jobIds string NOT NULL, IN jobStatuses string NOT NULL, IN recipients string NOT NULL, IN subjectTemplate string, IN messageTemplate string, IN maxRetries integer, IN responseTimeout integer, OUT id biginteger NOT NULL RESULT)
It takes the following parameters:
Parameter | Description |
|---|---|
| IDs of the jobs for which the notification is being enabled. Can also be set to |
| Job statuses that trigger the notification (e.g., FAILED,SUCCESS) |
| Email addresses to which the notification will be sent |
| Custom subject template for the notification. If |
| Custom message template for the notification body. If |
| Maximum number of retry attempts for sending the email. If |
| Timeout (in seconds) for the SMTP server response. If |
Example
SELECT * FROM (CALL SYSADMIN.enableJobEmailNotification(jobIds => '*', jobStatuses => 'FAILED, success', recipients => 'myemail@datavirtuality.de', subjectTemplate => 'DV Report - local subject', messageTemplate => 'DV Report - Local message - description: %description%', maxRetries => 2, responseTimeout => 30)) a;;
maxRetries and responseTimeout parameters are available since v25.3
SYSADMIN.disableJobEmailNotification
This procedure, correspondingly, disables email notifications for the given job(s).
SYSADMIN.disableJobEmailNotification(IN jobIds string NOT NULL, OUT id biginteger NOT NULL RESULT)
SYSADMIN.enableJobSlackNotification
This procedure enables Slack notifications for the given job(s).
SYSADMIN.enableJobSlackNotification(IN jobIds string NOT NULL, IN jobStatuses string NOT NULL, IN webHookURL string, IN message string, IN excludedJobs string, IN isFormattedSlackMessage boolean, OUT id biginteger NOT NULL RESULT)
It takes the following parameters:
Parameter | Description |
|---|---|
| IDs of the jobs for which the notification is being enabled. Can also be set to |
| Job statuses that trigger the notification (e.g., FAILED,SUCCESS) |
| Slack Incoming Webhook URL used to deliver the notification |
| Message content for the notification |
| List of job IDs to be excluded when the notification is configured globally |
| Indicates whether the message is plain text or a Slack-formatted JSON payload |
Example
SELECT * FROM (CALL SYSADMIN.enableJobSlackNotification(jobIds => '*', jobStatuses => 'FAILED, SUCCESS', webHookURL => 'https://hooks.slack.com/services/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', message => ':heavy_check_mark: Job %id% with description %description% is finished', excludedJobs => '10,11', isFormattedSlackMessage => false)) a;;
SYSADMIN.deleteSlackNotification
This procedure deletes Slack notifications for the given job(s).
SYSADMIN.deleteSlackNotification(IN jobIds string NOT NULL, OUT id biginteger NOT NULL RESULT)
SYSADMIN.disableJobSlackNotification
This procedure disables Slack notifications for the given job(s).
SYSADMIN.disableJobSlackNotification(IN jobIds string NOT NULL, OUT id biginteger NOT NULL RESULT)
SYSADMIN.sendSlackNotification
This procedure sends a Slack notification for the given job(s).
SYSADMIN.sendSlackNotification(IN message string NOT NULL, IN webHookURL string, IN isFormattedSlackMessage boolean)