BLUENEXUS INTEGRATIONSHOW-TO

dbt job failed? Find the cause, what it broke, and who to tell

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

CodeA model's SQL broke, often after yesterday's merge. Check what changed.
DataA test failed because the data changed: duplicates, nulls or values out of range.
InfrastructureA warehouse timeout, an expired credential or missing permissions.
Green but staleThe job passed, but a source didn't load. The numbers are old.

The steps

  1. Read the error. Start with the failed step's error, not the whole log.
  2. Name the kind. Code, data, infrastructure, or green but stale. Each has a different fix.
  3. 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.
  4. Find the owner. Models can carry an owner or group in dbt. If they don't, now is a good time to add them.
  5. 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.

1Paste this into Claude or ChatGPT

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 prompt

What it broke.

1Paste this into Claude or ChatGPT

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 prompt

Who to tell.

1Paste this into Claude or ChatGPT

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 prompt

A 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.

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.

Questions people ask about dbt and AI

Why did my dbt job fail?

Read the error on the failed step first. Most failures are code (a model's SQL broke), data (a test caught duplicates, nulls or bad values) or infrastructure (a timeout, credentials or permissions). The error usually tells you which.

How do I rerun only the failed models in dbt?

In dbt, use Rerun from failure on a job run with an Error status, or the dbt retry command. It picks up from the failed step instead of rebuilding everything.

What happens to downstream models when a dbt model fails?

They're skipped. The run's results show which models were skipped, and the manifest's exposures show the dashboards that depend on them.

Does rerunning a dbt job cost money?

dbt counts each model that builds successfully in a deployment environment toward your plan, even if the run later fails, and your warehouse bills the compute. Rerun from failure rather than from the start.

Can a dbt job succeed with stale data?

Yes. If source freshness is a checkbox on the job rather than a step, a stale source won't stop the job. Check freshness results, not just the job status.

Subscribe to our blog

Product insights, AI and product thinking delivered to your inbox.