
dbt DAG Optimization Architect
Architect and optimize dbt DAGs for peak performance
What You Can Do
You analyze your dbt project's DAG structure to identify performance bottlenecks, circular dependencies, and architectural anti-patterns. Claude provides concrete materialization recommendations, dependency optimization strategies, and refactoring guidance to reduce build times and improve maintainability while preserving data lineage.
Features
identify which models constrain overall build performance
find and break problematic dependency loops that prevent incremental refreshes
decide between table, incremental, view, and ephemeral based on refresh cadence and downstream usage
pinpoint slow-running models and suggest optimization approaches (incremental loads, dbt+python, database-level optimization)
evaluate test distribution across DAG and identify untested critical nodes
auto-generate markdown or Mermaid diagrams showing data flows with business context
review custom macros for redundancy, performance, and compliance with dbt best practices
compare build metrics before and after changes to validate improvements
Example Output
Critical Path Analysis Report:
- Identified
fct_transactions(22 min) as critical path bottleneck - Recommended converting to incremental + partition by date (est. 3 min)
- Dependency map shows 8 downstream fact tables blocked by this single model
Materialization Recommendations:
model_name | current | recommended | reasoning
fct_daily_agg | table | incremental | 2GB daily volume, business needs fresh data hourly
dim_customer | table | snapshot | Slow-changing dimension, captures SCD Type 2 updates
stg_orders | view | ephemeral | Only consumed by 1 downstream model, ephemeral avoids materialization
Refactoring Workflow:
- Add
incremental+unique_keyto critical models - Extract shared logic into staging models (reduce redundancy)
- Move complex transformations to database views (push computation down)
- Add freshness SLAs to staging layer
What's Included
- SKILL.md: DAG audit workflows, optimization decision trees, and performance tuning playbooks
- DAG Analysis Template: structured checklist for parsing dependencies and identifying patterns
- Materialization Decision Matrix: table comparing refresh cadence, volume, and downstream usage patterns
- Performance Benchmarking Checklist: before/after metrics, profiling queries, and measurement framework
- Dependency Refactoring Guide: step-by-step workflow for breaking circular dependencies and reorganizing layers
Who It's For
- Analytics Engineering Leads — audit team dbt projects and enforce architectural standards
- dbt Architects — design scalable DAG structures for enterprise data platforms
- Data Platform Teams — optimize shared dbt projects used by multiple business units
- Senior Analytics Engineers — refactor complex projects to reduce technical debt
- Data Engineering Managers — benchmark build performance and identify team workflow improvements
Best For
- Auditing inherited or legacy dbt projects — quick assessment of architectural health and performance risks
- Redesigning DAG structure — breaking monolithic projects into modular layers (raw → staging → intermediate → mart)
- Optimizing slow builds — profiling and refactoring models that dominate CI/CD runtime
- Incremental model strategy — deciding which models should use incremental loads vs. full refreshes
- Documenting lineage and business context — generating lineage diagrams and data dictionaries







