Skip to main content
Use this page for errors in the output of a Bolt run’s dbt™ commands, such as parse errors that don’t happen when you run the same command in the Code IDE.

dbt found two macros named ”…” in the project ”…”

Both paths are the same file, and the macro is defined only once in it. The same commands pass in the Code IDE terminal, and the error comes back on every run of the schedule. This is a partial parsing bug in dbt™ 1.9 and earlier. It happens after you change or remove a macro’s entry under macros: in a YAML file (for example its description or arguments), or delete that YAML file, when the macro’s .sql file defines more than one macro. dbt™ removes only the documented macro from its saved parse, then parses the whole file again, so the other macros in the file are added twice. dbt™ 1.10 fixes it. Each Bolt schedule starts from the saved parse (target/partial_parse.msgpack) of its own previous run, so dbt™ doesn’t parse the whole project every time. A run that fails to parse doesn’t save a new one, so every later run of that schedule fails the same way. The Code IDE keeps its own saved parse, which is why the error doesn’t appear there.
SolutionTo unblock your schedules, make them parse the project from scratch. Do one of these:
  • In Workspace Settings > Environments, open the settings of the Bolt environment the schedules run in and switch off dbt™ partial parsing. Every run in that environment then parses the full project.
  • Add --no-partial-parse to the schedule’s dbt™ commands for one run. That run saves a fresh parse, so later runs work with partial parsing again.
To stop the error from coming back, do one of these before you use partial parsing again:
  • Give each macro that has an entry under macros: a .sql file of its own.
  • Move the environment to dbt™ 1.10 or later. See Manage dbt™ version.
See Create and manage environments for the partial parsing toggle.