A failed dbt job at 3am is rarely the problem. The problem is 9am, when someone in finance opens a dashboard with yesterday's numbers and nobody has told them. In a Monte Carlo survey, a vendor study from 2023, 74% of the data professionals surveyed said business stakeholders find data issues first all or most of the time.
A failed job is three questions: why did it fail, what did it break downstream, and who needs to know. An AI connected to dbt can read the error, trace the lineage, find the owner and draft the notes. Fixing the model, and deciding when to rerun, stays with the data team.
Here are the four kinds of failure, the steps, three prompts, and how a retailer's data team handles a failure before the trading meeting.
Four kinds of failure
Four kinds of failure
The steps
- Read the error. Start with the failed step's error, not the whole log.
- Name the kind. Code, data, infrastructure, or green but stale. Each has a different fix.
- Find what's downstream. A run's results show which models were skipped, but not the dashboards on top of them. Find those in the manifest's exposures.
- Find the owner. Models can carry an owner or group in dbt. If they don't, now is a good time to add them.
- Fix, then rerun from failure. dbt's Retry jobs option reruns from the failed step. Each model that builds successfully counts toward your plan.
Start with dbt's own tools
dbt sends job notifications by email or Slack, and the run page shows each step's logs. Rerun from failure picks up where the job stopped. Source freshness checks warn when data is late, and dbt Wizard, dbt's own AI agent, in preview, can help debug a failed job.
What's left is the part outside dbt: telling the owner, telling the people who use the dashboards, and keeping both in the loop until it's fixed.
Do it in Claude or ChatGPT
Connect dbt with our guide to dbt in Claude, ChatGPT and MCP. All three prompts only read or draft.
Why it failed.
Using dbt, find last night's failed job runs in production. For each, show the error, the failing model or test, and whether it looks like a code, data or infrastructure problem. Don't trigger or retry anything.
Copy promptWhat it broke.
For the failed model, use the run's manifest to list every model downstream of it and any exposures, like dashboards, that depend on them. Include each model's owner or group. Don't run anything.
Copy promptWho to tell.
Draft two short notes. One for the model's owner: the error, the failing test and what changed. One for business users, in plain words: which dashboards may be out of date and when we expect a fix. Don't send them.
Copy promptA few things to know:
- Never change a test just to pass. Find out why it failed first.
- Rerun from failure, not from scratch. It's faster, and you pay for fewer models.
- Tell business users early. "These four dashboards show Monday's numbers until 11:00" beats silence.
- Watch for green but stale. A passing job with a late source is still wrong.
When engineers, the data lead and the business share the morning
On your own, you'd fix the model and move on. In a retailer, the analytics engineer who owns the model fixes it, the data lead decides priorities, and the head of ecommerce has a trading meeting at 11:00 that depends on the numbers.
Wavecrest Apparel, a 140-person online clothing retailer in San Diego, checks its jobs in BlueNexus. dbt is connected. Every weekday at 07:30, the data agent reads last night's production runs, traces any failure through the manifest, and prepares what needs doing for Teodora, the data lead.
Illustration of the BlueNexus app with example data.
Illustration of the BlueNexus app with example data.
One model failed on duplicate orders, so 23 models downstream were skipped and four dashboards show Monday's numbers. The agent prepares the next steps for Teodora.
Teodora approves. Kwame finds the returns sync re-sent 214 orders on Monday, adds a dedupe step to fct_orders, and merges it by 10:15. Kwame reruns from failure, fct_orders and the 23 skipped models build by 10:40, and Rory walks into the trading meeting with Tuesday's numbers.
For Teodora, the data lead. From dbt. Nothing is posted and nothing reruns until Teodora approves it.
- Post the failure for Kwame in the data channelThe error and the failing model, which Kwame's group owns
- Post a plain note for Rory in the ecommerce channel4 dashboards show Monday's numbers until about 11:00
- List which of the 23 skipped models feed the exec weeklyFrom the manifest, so Kwame can check those first after the fix
- Rerun the job from failureLeft unticked: Kwame reruns it after merging the fix
Illustration of the BlueNexus app with example data.
For connecting dbt, see dbt in Claude, ChatGPT and MCP. For the team, see a morning dbt data check for the whole data team. To handle failed jobs with your team, sign up for BlueNexus.