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.
- Starts whenA dbt or Databricks job failure posts in
#dataovernight and someone mentions@Merlinunder it Merlin worksClaude Code or Codex reads the run log, reruns the failing model against a dev schema and patches it in the dbt project
- 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@Merlinin its thread and add anything you already know.Claude Code or Codex reads the run log, reruns the failing model against a dev schema on a teammate's machine and patches it in the dbt project.
A pull request with the root cause and the passing dev run is linked in the thread, ready for review.
When the dbt or Databricks job failure posts in #data, mention @Merlin in its thread and add anything you already know.
Claude Code or Codex reads the run log, reruns the failing model against a dev schema on a teammate's machine and patches it in the dbt project.
A pull request with the root cause and the passing dev run is linked in the thread, ready for review.
Acme
Channels
general
eng
product
support-eng
data
finance
it-help
legal
Direct messages
Merlin
Databricks
Rosa
Ines
data
24
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.
- 01See the failure alert
- 02Open the job run
- 03Scroll the dbt log
- 04Find the failing test
- 05Pull the dbt project
- 06Find yesterday's change
- 07Fix the join
- 08Run dbt build in dev
- 09Run downstream tests
- 10Open a pull request
- 11Tell #data it is fixed
With Merlin
One mention under the failure gets the cause found and a tested fix up for review.
@Merlinunder the failed jobAsked by Rosa in #dataReruns the model in dev on Rosa's MacBookClaude Code with dbt and Databricks
- 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.
- 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.
- 02Add Merlin to SlackIntegrationsInstall the Slack app and add Merlin to the channel you work in. A private channel needs
/invite @Merlin. - 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.
- 04Keep your code on the machineRuntimeMerlin reads the code in a local project on the runtime, so keep the repository checked out there.
- 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.
- 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.
- 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.
- 08Or check every weekday at 07:00OptionalAutomations
To have failures looked at before anyone asks, ask Merlin in
#datato run this on a schedule every weekday at 07:00. Each run posts a new message in the channel. - 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.
Once, when you paste it
- PromptYou paste the prompt to @Merlin
- GuidanceMerlin saves your rules as workspace guidance
Every time someone mentions Merlin in Slack
- IntegrationThe Slack app spots the mention
- RuntimeMerlin picks an available machine
- ContextThe run gathers context
- WorkClaude Code or Codex reruns the model in dev
- SteeringYour team steers the work in the thread
- ResultMerlin links the fix pull request
Related use cases
More data tasks you can hand to Merlin.
- IntegrationsYour agent's MCP
Data
Check what a dbt change does to the data
Mention Merlin on a dbt pull request to see its effect before it merges. It builds the changed models in dev and comments the row counts and changed values against production.
@usemerlin-aiin a pull request commentA data diff comment on the pull request - IntegrationsMemoryYour agent's MCP
Data
Investigate a metric alert
Mention Merlin under a PostHog alert to learn whether a drop is real or broken tracking. It checks the breakdowns, flag changes and recent code before it answers.
@Merlinunder a PostHog alert in#dataThe likely cause in the alert thread - AutomationsIntegrationsYour agent's MCP
Data
Find the most expensive queries every month
Once a month, Merlin lists your costliest warehouse queries and dbt models in #data. Each one comes with a way to make it cheaper.
Day 1 of every month at09:00The costliest queries in#data
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.