Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Configure alerts for a job

A worked example

Put in order

The Lakeflow job telemetry_ingest has two independent tasks that run in parallel:

  • load_devices usually finishes in about 10 minutes and already has a retry policy of 3 retries.
  • rebuild_aggregates usually runs for about 3 hours.

The job already has a job-level Failure email notification to the operations team. That job-level notification must stay exactly as it is.

New requirements for the on-call team (oncall@contoso.com):

  • Receive an email as soon as load_devices fails on its final retry, without waiting for rebuild_aggregates to finish.
  • Do not send an email for each retry attempt. Send one only when load_devices still fails after its last retry.
  • Do not send this on-call email when an operator cancels a run.

In what order should you complete the configuration stages?

Your order

You didn't answer this one.

Correct order
1Edit the telemetry_ingest job and select the load_devices task in the task graph.
2In the task panel, under Notifications, select Add.
3Configure the task notification with these settings: Email address oncall@contoso.com, event type Failure, and both Mute notifications until the last retry and Mute notifications for canceled runs enabled.
4Select Save task.
Why

Task-level notifications fire for each task run, so a Failure notification on load_devices alerts the on-call team when that task fails instead of when the whole job ends. Task notifications would otherwise fire on each retry, so Mute notifications until the last retry limits the email to the final failure. The skipped and canceled mute filters at job level do not cover task notifications, so the canceled-run filter must be set on the task itself. The job-level notification stays unchanged.

  • Step 1: Edit the telemetry_ingest job and select the load_devices task in the task graph. Task notifications are configured in a specific task's panel, so you must open the job and select the task first.
  • Step 2. In the task panel, under Notifications, select Add. The Notifications section is in the panel of the selected task.
  • Step 3. Configure the task notification with these settings: Email address oncall@contoso.com, event type Failure, and both Mute notifications until the last retry and Mute notifications for canceled runs enabled. The destination, event and filters can only be set on a task notification that has been added. Muting until the last retry stops an email for each retry, and the canceled-run filter must be set on the task itself.
  • Step 4. Select Save task. The task notification takes effect only when the task configuration is saved after it is configured.
  • Not needed. In the Job notifications section, select Edit notifications and select Mute notifications for canceled runs. Job-level mute options do not apply to task-level notifications, so the on-call email would still fire for canceled runs. This change also breaks the requirement to leave the job-level notification as it is.
  • Not needed. Add oncall@contoso.com to the existing job-level Failure email notification. Job-level notifications apply to the overall job run, so the on-call team would wait for the long rebuild_aggregates task. This also changes the job-level notification, which must stay as it is.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free