Daily
Get a morning email of failed Databricks jobs
Each morning one email lists every job run that failed overnight, with links to each.
- Runs
- Daily
- Apps
- Databricks
- AI
- Not needed
- Access
- read jobs
Send this to your assistant
Create a ClickRuntime automation: every day at 7am, list the Databricks job runs from the last 24 hours that failed and email me the job names, error states and links.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Scheduled data jobs fail at night, when nobody is watching. An ingestion job times out, a notebook hits a schema change, a cluster fails to start, and by the time analysts arrive in the morning the dashboards are stale and nobody knows why. The first sign of trouble is a stakeholder asking about wrong numbers.
Each morning, this lists the Databricks job runs from the past day, keeps those whose result state is FAILED, and emails you a list of what failed. You can start fixing problems before downstream users notice them.
Data engineers and analytics leads who run overnight pipelines use it to start the day with the right priorities. The list comes from the job runs that Databricks reports, filtered to a failed result state, so it shows only genuine failures and not cancelled or skipped runs.
What you get out of it
Fix pipelines before dashboards go stale
A failed overnight job means stale reports at 9 a.m. Seeing it at 7 a.m. gives engineers the time to rerun and fix before executives open their dashboards. An overnight failure means stale reports at nine, and learning about it at seven gives engineers time to rerun and fix.
Learn about silent failures
Some failures send no alert because nobody configured one. The morning list covers every job, including ones nobody remembered to monitor. Some failures send no alert because nobody configured one, and the morning list covers every job anyway.
Prioritise by what broke
A concise list helps you decide what to fix first. Critical ingestion jobs go before nice-to-have reports. A concise list helps you decide what to fix first, so critical ingestion jobs come before nice-to-have reports.
Reduce stakeholder surprises
When you can tell users that a job failed and is being fixed, trust holds. Silence followed by correction later does far more harm. Telling users that a job failed and is being fixed keeps their trust, and silence followed by a correction does more harm.
Spot recurring failures
If the same job appears day after day, it needs a real fix, not another rerun. The repeated entries make the pattern impossible to ignore. If the same job appears day after day it needs a real fix, and repetition in the email makes that pattern hard to ignore.
How it works
What happens, step by step
Every morning, ClickRuntime lists the Databricks job runs that finished overnight.
It keeps only the runs that failed.
You get one email with each failed job's name, the error message and a link straight to the run.
Before it runs live
- Connect Databricks
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Databricks steps into one automation
Under the hood
The code that runs this automation
import time
from clickruntime import on_trigger, credentials, http, notify
HOST = "https://dbc-a1b2c3d4-e5f6.cloud.databricks.com"
@on_trigger
def run(event):
since = int((time.time() - 86400) * 1000)
data = http.get(f"{HOST}/api/2.1/jobs/runs/list",
headers={"Authorization": f"Bearer {credentials.secret('DATABRICKS_TOKEN')}"},
params={"start_time_from": since, "completed_only": "true", "limit": 25}).json()
failed = [r for r in data.get("runs", [])
if r["state"].get("result_state") in ("FAILED", "TIMEDOUT", "INTERNAL_ERROR")]
if failed:
lines = [f"{r['run_name']}: {r['state']['result_state']} - {r['state'].get('state_message', '')[:120]}\n"
f"{r['run_page_url']}" for r in failed]
notify.email_me(f"{len(failed)} Databricks runs failed", "\n\n".join(lines))
return {"failed": len(failed)}FAQ
Common questions
What counts as a failed run?
Which time window does it cover?
Does it show the error message?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get an alert when daily DBU spend goes over budget
If yesterday's DBU usage passed your budget, you know first thing in the morning.
See how it worksGet a Slack alert when a job runs too long
Any run still going after two hours is flagged in Slack once, so stuck jobs don't burn compute all night.
See how it worksKnow the moment your website goes down
Your team hears in Slack when the site stops responding or slows down, and again when it's back.
See how it worksKeep exploring
Set up “Get a morning email of failed Databricks jobs” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.