Stacks

Review a dbt Pull Request with Atlas in 2026

Updated 7 min read

Atlas helps dbt developers in 2026 review pull requests by going beyond line-by-line diffs, using tools like `dbt test` and `sqlfmt` to provide comprehensive context and catch subtle bugs that a simple diff might miss. It fetches the branch, reads full files, checks references, and runs tests to ensure changes integrate correctly within your dbt project's model DAG, all while maintaining strict safety protocols.

How does Atlas provide full context for dbt pull request reviews?

Atlas provides full context for dbt pull request reviews by first fetching the feature branch and producing a raw diff using `bash`, then reading the complete changed files, not just hunks. This ensures a dbt developer in 2026 sees the entire `dbt_project.yml` or model file, understanding the surrounding logic beyond 1-2 changed lines.

When reviewing a dbt pull request, Atlas begins by leveraging its VCS layer to interact with git. It uses the `bash` tool to fetch the specific branch and generate a `diffRaw` of all changes. Crucially, Atlas then employs its `read` tool to pull the full contents of every changed file, such as a dbt model in `models/` or a `schema.yml` definition. This approach moves beyond the limited view of a standard `git diff` hunk, allowing the dbt developer to see the complete file. For instance, if a `materialization` strategy is altered in a model's config block, Atlas presents the entire model file, providing the necessary context to assess the impact on performance or data lineage within the dbt project.

How does Atlas detect breaking changes in dbt model dependencies?

Atlas detects breaking changes in dbt model dependencies by running the `lsp` tool's `findReferences` operation for every modified `ref()` or `source()` call within your dbt project. This is critical in 2026 for complex dbt DAGs, where a single change in a base model can silently impact dozens of downstream transformations, ensuring no caller is overlooked.

A core challenge in dbt development is understanding the ripple effect of changes across the model DAG. Atlas addresses this by integrating with the Language Server Protocol (LSP). For every changed `ref()` or `source()` call identified in a dbt model, Atlas executes the `lsp` tool's `findReferences` operation. This powerful capability allows Atlas to identify all other dbt models that depend on the modified reference, even if those dependent models are not part of the current pull request's diff. This prevents scenarios where a seemingly isolated change to a `ref()` call in `models/staging/users.sql` could inadvertently break `models/marts/daily_active_users.sql` without appearing in the diff. Additionally, Atlas can use `grep` to search for specific patterns, such as old constant names or feature flags, ensuring that all related code is updated consistently across the dbt codebase.

How does Atlas validate dbt code quality and test coverage?

Atlas validates dbt code quality and test coverage by integrating directly with the dbt toolchain, running `dbt test` to execute schema and data tests, and `sqlfmt` to ensure consistent SQL formatting. In 2026, maintaining high standards for dbt models and `schema.yml` definitions is paramount, and Atlas reports all findings as a `todowrite` list ordered by severity.

Ensuring the quality and correctness of dbt models is a cornerstone of robust data pipelines. Atlas directly incorporates the dbt toolchain into its review workflow. Using its `bash` tool, Atlas executes `dbt test` against the changed dbt project. This command runs all defined schema tests (like `not_null` and `unique` tests in `schema.yml`) and data tests, verifying the integrity of new or modified columns and model outputs. Furthermore, Atlas runs `sqlfmt` via `bash` on all changed SQL files, enforcing consistent formatting across the dbt codebase. This helps maintain readability and adherence to style guides, which is crucial for collaborative development. All identified issues, from failed tests to formatting violations, are then compiled by Atlas into a `todowrite` list, providing a clear, prioritized action plan for the dbt developer.

What safety features does Atlas offer for dbt project reviews?

Atlas offers robust safety features for dbt project reviews, including permission-gated tool calls and a read-only plan agent that drafts a review strategy before execution. Every file edit, such as changes to a `dbt_project.yml` or a model file, is presented as a unified diff for approval, preventing unintended modifications in 2026 and ensuring developer control.

Safety and control are paramount when an AI agent interacts with a dbt project. Atlas is designed with multiple layers of protection. Every Atlas tool call, whether it's `bash` running `dbt build` or `read` accessing sensitive files, is permission-gated against `allow`, `ask`, and `deny` rules. Before any action is taken, Atlas drafts a plan in a read-only plan agent, which is then presented to the developer for review and approval. Only after approval does it switch to a build agent to execute the plan. For any proposed file modifications, such as converting an expensive table model to incremental with an `is_incremental()` filter, Atlas computes a unified diff and surfaces it for explicit approval before writing. This ensures that a dbt developer always has the final say, preventing accidental changes to `dbt_project.yml` or critical model definitions. Atlas also snapshots file changes as git patches, allowing edits to be easily diffed and rolled back if needed.

Step by step

  1. 01Fetch the dbt feature branch and generate a raw diff using Atlas's VCS layer and `bash` to identify all changed files.
  2. 02Use Atlas's `read` tool to pull the full contents of changed dbt model files, `schema.yml`, and `dbt_project.yml` for complete context.
  3. 03For every modified `ref()` or `source()` call in dbt models, execute Atlas's `lsp findReferences` to identify all affected downstream models in the DAG.
  4. 04Employ Atlas's `grep` tool to search for outdated constant names, stale copies, or feature flags that the dbt change should have updated.
  5. 05Run `dbt test` via Atlas's `bash` tool to validate all schema tests and data tests defined in `schema.yml` and model files.
  6. 06Execute `sqlfmt` through Atlas's `bash` tool on all changed SQL files to ensure dbt code adheres to formatting standards.
  7. 07Atlas compiles all findings, including test failures and formatting issues, into a `todowrite` list, ordered by severity, for the dbt developer's review.
  8. 08Approve Atlas's proposed changes, presented as a unified diff, before any modifications are written to the dbt project.

Frequently asked questions

How does Atlas ensure dbt model changes don't break downstream dependencies?
Atlas uses the `lsp` tool's `findReferences` operation on `ref()` and `source()` calls to identify all dependent dbt models, even those not directly in the diff, preventing silent breaks in your DAG.
Can Atlas run `dbt test` as part of a pull request review?
Yes, Atlas integrates `dbt test` via its `bash` tool to execute all schema and data tests defined in your `schema.yml` and model files, reporting results directly in the review.
Does Atlas enforce dbt SQL formatting standards like `sqlfmt`?
Absolutely. Atlas can run `sqlfmt` through its `bash` tool on all changed dbt SQL files, ensuring your project maintains consistent formatting and adheres to your team's style guides.
How does Atlas handle sensitive operations in a dbt project, like `dbt build`?
Atlas employs permission-gated tool calls. For operations like `dbt build`, it will prompt for explicit approval, ensuring it never runs against production targets without your consent.
What kind of context does Atlas provide beyond a standard `git diff` for dbt?
Beyond a `git diff`, Atlas uses its `read` tool to pull full dbt model files, `lsp` to trace `ref()` dependencies, and `grep` to find related patterns, offering a holistic view of changes.
How does Atlas report issues found during a dbt PR review?
Atlas compiles all identified issues, from failed `dbt test` runs to unformatted SQL, into a `todowrite` list, which is then ordered by severity for efficient developer action.
Can Atlas help me catch old constant names or feature flags that should have been updated in dbt?
Yes, Atlas uses its `grep` tool to search for specific patterns, such as old constant names or stale feature flags, ensuring all related code in your dbt project is consistently updated.

Try Atlas in your terminal

The terminal-native AI coding agent. Free core, single binary.

Install Atlas

Related guides

Review a Pull Request with Atlas (2026 Workflow)

How to review a pull request with Atlas in 2026: bash produces the raw patch, read pulls whole files, the lsp tool's findReferences checks callers the diff never shows.

Atlas for dbt: Terminal-Native AI Coding in 2026

Atlas is a terminal-native AI coding agent for dbt. Read the ref() DAG, convert a table model to incremental, run dbt build against dev, and add tests in 2026.

Locate where a behavior is implemented in dbt with Atlas in 2026

Discover how Atlas helps dbt developers in 2026 pinpoint exact file and symbol locations for specific behaviors, leveraging semantic search, grep, and LSP tools across your dbt project.

Audit a dbt Repository with Parallel Subagents in Atlas in 2026

Sweep your dbt project for issues without context window limits. Atlas uses parallel subagents to audit `dbt_project.yml` and `schema.yml` files, leveraging `dbt test` and `sqlfmt` for comprehensive review.

Automate GitHub Issue and Pull Request Triage in dbt with Atlas in 2026

Streamline dbt project maintenance in 2026. Atlas automates GitHub issue and pull request triage, integrating with `dbt test`, `sqlfmt`, and `dbt deps (packages.yml)` for safe, trusted, and efficient dbt development

Onboard to an Unfamiliar dbt Codebase with Atlas in 2026

Atlas helps dbt developers in 2026 quickly build a mental model of new repositories. Leverage semantic search, `ref()` analysis, `dbt test`, and `sqlfmt` to understand complex dbt projects without reading every file.

Rename a symbol across the repo in dbt with Atlas in 2026

Effortlessly rename dbt macros, models, or columns across your entire project with Atlas. Leverage semantic understanding and dbt's toolchain for safe, accurate refactoring in 2026.

Plan a multi-file change before editing in dbt with Atlas in 2026

Design complex, multi-file dbt changes with Atlas's plan agent. Get your dbt project modifications reviewed and approved before a single line of code is written, ensuring safety and collaboration.

Browse this resource hub