Data

Fix a failed overnight dbt run

Mention Merlin under a failed dbt or Databricks job. It reproduces the failure against a dev schema and opens a fix pull request with the root cause.

@Merlin from now on, when someone asks you about a failed dbt or Databricks job in #data, read the run log, find the failing model and rerun it against the dev schema, never production. Patch the model in the dbt project, rerun it and its downstream tests in dev until they pass, then open a pull request with the root cause and link it in the thread. If the source data itself is wrong, stop and explain what you found instead of patching around it.

#data
Get started for free
  1. Starts whenA dbt or Databricks job failure posts in #data overnight and someone mentions @Merlin under it
  2. Merlin worksClaude Code or Codex reads the run log, reruns the failing model against a dev schema and patches it in the dbt project
  3. You getA fix pull request with the root cause, linked in the thread

Tools

  • Slack
  • GitHub
  • dbt
  • Databricks

Capabilities

  • Integrations
  • Your agent's MCP

How it works

From a failed overnight job to a fix pull request.

When the dbt or Databricks job failure posts in #data, mention @Merlin in its thread and add anything you already know.

Acme

Channels

general

eng

product

support-eng

data

finance

it-help

legal

Direct messages

Merlin

Databricks

Rosa

Ines

data

24

MessagesAdd canvasFiles

Today

Databricks03:12

Job failed: nightly_dbt_build, task dbt_build. 1 test failed: unique_fct_orders_order_id.

Message #data

Before and after

A failed overnight run comes with a fix ready for review.

Without Merlin

Someone on the data team starts the day in job logs instead of the work they planned.

  1. 01See the failure alert
  2. 02Open the job run
  3. 03Scroll the dbt log
  4. 04Find the failing test
  5. 05Pull the dbt project
  6. 06Find yesterday's change
  7. 07Fix the join
  8. 08Run dbt build in dev
  9. 09Run downstream tests
  10. 10Open a pull request
  11. 11Tell #data it is fixed

With Merlin

One mention under the failure gets the cause found and a tested fix up for review.

  1. @Merlin under the failed jobAsked by Rosa in #data
  2. Reruns the model in dev on Rosa's MacBookClaude Code with dbt and Databricks
  3. Fix pull request with the root causeLinked in the Slack thread

Setup

Keep the dbt project on a machine and hand Merlin any failed run.

Set these up once and anyone in #data can hand a failed run to Merlin from its alert thread. The weekday schedule is optional.

  1. 01Connect a machineRuntimeInstall the Merlin desktop app or CLI on a computer running Claude Code or Codex. You can also use a machine a teammate shares with your workspace.
  2. 02Add Merlin to SlackIntegrationsInstall the Slack app and add Merlin to the channel you work in. A private channel needs /invite @Merlin.
  3. 03Install the GitHub appIntegrationsPick the repositories Merlin can access, so it can read and link the pull requests there. Pushes use the machine owner's own Git access.
  4. 04Keep your code on the machineRuntimeMerlin reads the code in a local project on the runtime, so keep the repository checked out there.
  5. 05Add dbt to your agentYour agent's MCPConnect the dbt MCP server to Claude Code or Codex on the machine that runs this. Its credentials stay on that machine.
  6. 06Add Databricks to your agentYour agent's MCPConnect the Databricks MCP server to Claude Code or Codex on the machine that runs this. Its credentials stay on that machine.
  7. 07Give dbt a dev targetRuntime

    Set a dev target in the dbt profile on that machine that writes to its own schema, so reruns land there instead of in production tables.

  8. 08Or check every weekday at 07:00OptionalAutomations

    To have failures looked at before anyone asks, ask Merlin in #data to run this on a schedule every weekday at 07:00. Each run posts a new message in the channel.

  9. 09Paste the setup promptGuidanceAn owner or admin sends the prompt below to @Merlin once, and it becomes workspace guidance for every future run.

Prompt

Tell Merlin how to handle a failed run, once.

@Merlin from now on, when someone asks you about a failed dbt or Databricks job in #data, read the run log, find the failing model and rerun it against the dev schema, never production. Patch the model in the dbt project, rerun it and its downstream tests in dev until they pass, then open a pull request with the root cause and link it in the thread. If the source data itself is wrong, stop and explain what you found instead of patching around it.

#data

Once, when you paste it

  1. PromptYou paste the prompt to @Merlin
  2. GuidanceMerlin saves your rules as workspace guidance

Every time someone mentions Merlin in Slack

  1. IntegrationThe Slack app spots the mention
  2. RuntimeMerlin picks an available machine
  3. ContextThe run gathers context
  4. WorkClaude Code or Codex reruns the model in dev
  5. SteeringYour team steers the work in the thread
  6. ResultMerlin links the fix pull request

Bring your coding agents into the tools your team already uses.

Let your whole team hand work to Claude Code and Codex today. Connect one machine and add Merlin to Slack, Linear or GitHub. 14-day free trial, no API keys, no card.