# pavan19047/dbt-core architecture

> Architecture diagram of the GitHub repository pavan19047/dbt-core, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pavan19047/dbt-core
- Repository: https://github.com/pavan19047/dbt-core

## Overview

1. This is a Rust monorepo for dbt Core v2 / Fusion. The architecture is centered around shared libraries plus a small set of binaries: `dbt-main` is the main CLI/runtime entrypoint, with specialized tools like `dbt-docs-server`, `dbt-metricflow`, `dbt-sa-cli`, `dbt-login`, `dbt-ci`, and `dbt-adbc`.

2. The first major subsystem is project loading and validation. `dbt-loader`, `dbt-parser`, `dbt-profile`, `dbt-cloud-config`, `dbt-schemas`, and `dbt-selector-parser` read dbt projects from the filesystem (`dbt_project.yml`, `profiles.yml`, SQL/YAML resources, packages, selectors) and resolve them into typed internal structures. This is the boundary where user-authored project files become normalized dbt metadata.

3. Jinja rendering is a distinct layer, not embedded in the parser itself. The `dbt-jinja-*` crates provide context building, variables, filters, template evaluation, and phase-specific environments for parse/compile/run. They also implement the language surface that dbt exposes to model SQL and macros.

4. Compilation and planning are handled by `dbt-compilation`, `dbt-dag`, `dbt-scheduler`, `dbt-defer`, `dbt-metadata`, `dbt-metadata-parquet`, `dbt-schema-store`, and `dbt-index-core`. Together these crates build the DAG, hydrate schemas, determine dependencies, compute scheduling, and produce the artifact graph used downstream by execution, docs, and lineage features.

5. The execution/runtime layer is split from compilation. `dbt-tasks-sa` and `dbt-tasks-core` model runnable work units such as models, seeds, snapshots, tests, and operations. They convert compiled nodes into task execution, manage task context, and bridge into warehouse execution and run-cache behavior.

6. Database connectivity is abstracted through the adapter/engine stack in `dbt-adapter` and `dbt-adbc`. This is where dbt crosses the boundary to external warehouses and engines such as Snowflake, BigQuery, Databricks, Redshift, Postgres, DuckDB, Spark, ClickHouse, Fabric, Salesforce, Athena, and Exasol. The adapter layer also handles SQL generation, relation naming, metadata queries, retries, query comments, sidecar communication, and ADBC driver management.

7. Authentication and connection setup are separate concerns. `dbt-auth` and `dbt-platform-auth` provide credential resolution for warehouse/cloud integrations, including env-based config, cloud YAML, browser/OAuth flows, session caching, and service-specific auth helpers. `dbt-cloud-api` is the typed HTTP client for dbt Cloud.

8. Artifact and state management is a major architectural boundary. `dbt-state`, `dbt-common`, `dbt-error`, `dbt-base`, and `dbt-metadata-parquet` handle cancellation, state comparison, run caches, metadata persistence, error modeling, and serialization. The repo leans heavily on Parquet for scalable artifacts while still maintaining JSON compatibility for older consumers.

9. Local documentation is served by `dbt-docs-server`. It is not just a static site server; it exposes handlers for lineage, models, seeds, snapshots, tests, metrics, searches, exposures, macros, files, identities, and project data, all backed by the parsed/compiled artifacts and state stores.

10. Observability is another cross-cutting subsystem. `dbt-tracing`, `dbt-telemetry`, `dbt-tui-progress`, and tracing support inside `dbt-common` emit structured logs, spans, metrics, JSONL/Parquet/OTLP telemetry, and terminal progress. This instrumentation spans parsing, compilation, execution, and cloud interactions.

11. The repo also contains support libraries for domain-specific concerns: `dbt-agate` and `dbt-csv` for table/CSV handling, `dbt-classification-types` for taxonomy and tagging, `dbt-features` and `dbt-clap-core` for feature gating and CLI plumbing, `dbt-env` and `dbt-ident` for environment and identifier handling, and `dbt-frontend-common` for shared SQL/expression/type utilities.

12. Testing and reproducibility are built into the architecture. `dbt-test-utils`, `dbt-test-containers`, and many crate-local snapshot/integration tests provide deterministic harnesses, including containerized Postgres and warehouse-adjacent fixtures. Record/replay support appears in `adbc-record-replay` and the time-machine/trace subsystems to make warehouse interactions testable without always hitting live services.

13. The overall flow is: project files and auth config are loaded from disk and env, Jinja and parsing resolve them into typed resources, compilation turns resources into a DAG and artifacts, tasks execute against warehouse adapters, and the resulting run state/metadata/telemetry feeds docs, lineage, caches, and analytics surfaces.

Main entry points: [`crates/dbt-main`](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-main) (dbt-main), [`crates/dbt-loader`](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-loader) (loader), [`crates/dbt-compilation`](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-compilation) (compilation), [`crates/dbt-adapter`](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-adapter) (adapter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_binaries["Binaries"]
  node_dbt_main["dbt-main<br/>CLI runtime"]
  node_dbt_docs_server["docs server<br/>docs API"]
  node_dbt_metricflow["metricflow<br/>metrics CLI"]
  node_dbt_sa_cli["sa cli<br/>parser CLI"]
end

subgraph group_ingest["Project ingest"]
  node_dbt_loader["loader"]
  node_dbt_parser["parser"]
  node_dbt_profile["profile"]
  node_dbt_schemas["schemas<br/>schema models"]
  node_dbt_selector_parser["selector parser"]
end

subgraph group_render["Jinja layer"]
  node_dbt_jinja_utils["jinja utils<br/>env builder"]
  node_dbt_jinja_ctx["jinja ctx<br/>context model"]
  node_dbt_jinja_filters["jinja filters<br/>filter set"]
  node_dbt_jinja_vars["jinja vars<br/>var resolver"]
end

subgraph group_plan["Planning"]
  node_dbt_compilation["compilation<br/>compile core"]
  node_dbt_dag(("dag<br/>graph planner"))
  node_dbt_scheduler(("scheduler<br/>schedule engine"))
end

subgraph group_runtime["Execution"]
  node_dbt_tasks_core["tasks core<br/>task model"]
  node_dbt_tasks_sa["tasks sa<br/>task executor"]
end

subgraph group_platform["Platform"]
  node_dbt_adapter["adapter"]
  node_dbt_adbc["adbc<br/>driver manager"]
  node_dbt_auth["auth<br/>credential resolver"]
  node_dbt_platform_auth["platform auth<br/>cloud auth"]
  node_dbt_cloud_api["cloud api<br/>http client"]
  node_dbt_cloud_config["cloud config<br/>config resolver"]
end

subgraph group_state["State & docs"]
  node_dbt_metadata[("metadata<br/>parse state")]
  node_dbt_metadata_parquet[("metadata parquet<br/>artifact store")]
  node_dbt_schema_store[("schema store<br/>schema cache")]
  node_dbt_state[("state")]
  node_dbt_docs_core["docs core<br/>docs model"]
end

subgraph group_support["Support"]
  node_dbt_common["common<br/>shared core"]
  node_dbt_error["error"]
  node_dbt_tracing["tracing<br/>telemetry core"]
  node_dbt_telemetry["telemetry<br/>event schema"]
  node_dbt_test_utils["test utils<br/>test harness"]
end

node_dbt_main -->|"loads projects"| node_dbt_loader
node_dbt_main -->|"parses nodes"| node_dbt_parser
node_dbt_main -->|"compiles graph"| node_dbt_compilation
node_dbt_main -->|"runs tasks"| node_dbt_tasks_sa
node_dbt_main -->|"persists state"| node_dbt_state
node_dbt_main -->|"emits telemetry"| node_dbt_tracing
node_dbt_loader -->|"hydrates schemas"| node_dbt_schemas
node_dbt_loader -->|"renders setup"| node_dbt_jinja_utils
node_dbt_loader -->|"resolves cloud config"| node_dbt_cloud_config
node_dbt_loader -->|"resolves creds"| node_dbt_auth
node_dbt_parser -->|"builds contexts"| node_dbt_jinja_ctx
node_dbt_parser -->|"applies selectors"| node_dbt_selector_parser
node_dbt_parser -->|"updates parse state"| node_dbt_metadata
node_dbt_profile -->|"renders profiles"| node_dbt_jinja_utils
node_dbt_jinja_utils -->|"builds envs"| node_dbt_jinja_ctx
node_dbt_jinja_utils -->|"registers filters"| node_dbt_jinja_filters
node_dbt_jinja_utils -->|"resolves vars"| node_dbt_jinja_vars
node_dbt_compilation -->|"builds dag"| node_dbt_dag
node_dbt_compilation -->|"plans schedule"| node_dbt_scheduler
node_dbt_compilation -->|"writes artifacts"| node_dbt_metadata_parquet
node_dbt_compilation -->|"hydrates schema store"| node_dbt_schema_store
node_dbt_dag -->|"orders work"| node_dbt_scheduler
node_dbt_scheduler -->|"creates tasks"| node_dbt_tasks_core
node_dbt_tasks_core -->|"executes task model"| node_dbt_tasks_sa
node_dbt_tasks_sa -->|"uses adapters"| node_dbt_adapter
node_dbt_tasks_sa -->|"uses run cache"| node_dbt_state
node_dbt_adapter -->|"opens drivers"| node_dbt_adbc
node_dbt_adapter -->|"authenticates"| node_dbt_auth
node_dbt_adapter -->|"cloud auth"| node_dbt_platform_auth
node_dbt_adapter -->|"instruments queries"| node_dbt_tracing
node_dbt_state -->|"stores artifacts"| node_dbt_metadata_parquet
node_dbt_state -->|"calls cloud"| node_dbt_cloud_api
node_dbt_docs_server -->|"serves docs"| node_dbt_docs_core
node_dbt_docs_server -->|"reads artifacts"| node_dbt_metadata_parquet
node_dbt_docs_server -->|"reads state"| node_dbt_state
node_dbt_docs_server -->|"shows lineage"| node_dbt_dag
node_dbt_metricflow -.->|"shares runtime"| node_dbt_main
node_dbt_sa_cli -->|"static parse"| node_dbt_parser
node_dbt_test_utils -->|"fixtures projects"| node_dbt_loader
node_dbt_test_utils -->|"runs task tests"| node_dbt_tasks_sa
node_dbt_test_utils -->|"captures traces"| node_dbt_tracing

click node_dbt_main "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-main"
click node_dbt_docs_server "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-docs-server"
click node_dbt_metricflow "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-metricflow"
click node_dbt_sa_cli "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-sa-cli"
click node_dbt_loader "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-loader"
click node_dbt_parser "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-parser"
click node_dbt_profile "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-profile"
click node_dbt_schemas "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-schemas"
click node_dbt_selector_parser "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-selector-parser"
click node_dbt_jinja_utils "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-jinja-utils"
click node_dbt_jinja_ctx "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-jinja-ctx"
click node_dbt_jinja_filters "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-jinja-filters"
click node_dbt_jinja_vars "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-jinja-vars"
click node_dbt_compilation "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-compilation"
click node_dbt_dag "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-dag"
click node_dbt_scheduler "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-scheduler"
click node_dbt_metadata "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-metadata"
click node_dbt_metadata_parquet "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-metadata-parquet"
click node_dbt_schema_store "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-schema-store"
click node_dbt_tasks_core "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-tasks-core"
click node_dbt_tasks_sa "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-tasks-sa"
click node_dbt_adapter "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-adapter"
click node_dbt_adbc "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-adbc"
click node_dbt_auth "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-auth"
click node_dbt_platform_auth "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-platform-auth"
click node_dbt_cloud_api "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-cloud-api"
click node_dbt_cloud_config "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-cloud-config"
click node_dbt_common "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-common"
click node_dbt_error "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-error"
click node_dbt_state "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-state"
click node_dbt_tracing "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-tracing"
click node_dbt_telemetry "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-telemetry"
click node_dbt_docs_core "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-docs-core"
click node_dbt_test_utils "https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-test-utils"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dbt_main,node_dbt_docs_server,node_dbt_metricflow,node_dbt_sa_cli,node_dbt_metadata,node_dbt_metadata_parquet,node_dbt_schema_store,node_dbt_state,node_dbt_docs_core toneBlue
class node_dbt_loader,node_dbt_parser,node_dbt_profile,node_dbt_schemas,node_dbt_selector_parser,node_dbt_common,node_dbt_error,node_dbt_tracing,node_dbt_telemetry,node_dbt_test_utils toneAmber
class node_dbt_jinja_utils,node_dbt_jinja_ctx,node_dbt_jinja_filters,node_dbt_jinja_vars toneMint
class node_dbt_compilation,node_dbt_dag,node_dbt_scheduler toneRose
class node_dbt_tasks_core,node_dbt_tasks_sa toneIndigo
class node_dbt_adapter,node_dbt_adbc,node_dbt_auth,node_dbt_platform_auth,node_dbt_cloud_api,node_dbt_cloud_config toneTeal
```

## Components

### Binaries

CLI entrypoints and user-facing tools.

- [dbt-main](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-main): CLI runtime · Main entrypoint for Fusion/dbt commands and orchestration. · `crates/dbt-main`
- [docs server](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-docs-server): docs API · Serves parsed and compiled project data through docs and lineage handlers. · `crates/dbt-docs-server`
- [metricflow](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-metricflow): metrics CLI · MetricFlow-oriented CLI and compatibility surface. · `crates/dbt-metricflow`
- [sa cli](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-sa-cli): parser CLI · Specialized command-line tool for static analysis and parse flows. · `crates/dbt-sa-cli`

### Project ingest

Filesystem, config, and schema normalization.

- [loader](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-loader): project loader · Loads dbt projects, packages, profiles, and macro assets from disk. · `crates/dbt-loader`
- [parser](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-parser): project parser · Resolves project resources, validates nodes, and builds typed parse state. · `crates/dbt-parser`
- [profile](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-profile): profile resolver · Resolves profiles and Jinja-backed connection configuration. · `crates/dbt-profile`
- [schemas](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-schemas): schema models · Typed schema definitions for manifests, profiles, projects, selectors, and artifacts. · `crates/dbt-schemas`
- [selector parser](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-selector-parser): selector parser · Parses node selection expressions into executable selection rules. · `crates/dbt-selector-parser`

### Jinja layer

Template context, rendering, variables, and filters.

- [jinja utils](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-jinja-utils): env builder · Builds phase-specific Jinja environments and shared templating helpers. · `crates/dbt-jinja-utils`
- [jinja ctx](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-jinja-ctx): context model · Constructs parse, compile, run, and load contexts for Jinja evaluation. · `crates/dbt-jinja-ctx`
- [jinja filters](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-jinja-filters): filter set · dbt-specific filter implementations exposed to templates. · `crates/dbt-jinja-filters`
- [jinja vars](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-jinja-vars): var resolver · Resolves dbt variables and environment variables during rendering. · `crates/dbt-jinja-vars`

### Planning

Compilation, DAG, scheduling, and metadata graph generation.

- [compilation](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-compilation): compile core · Performs compilation, schema hydration, and schedule-oriented planning. · `crates/dbt-compilation`
- [dag](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-dag): graph planner · Maintains dependency graphs and scheduling relations between nodes. · `crates/dbt-dag`
- [scheduler](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-scheduler): schedule engine · Turns node selection and dependencies into runnable schedules. · `crates/dbt-scheduler`

### Execution

Task modeling and warehouse execution.

- [tasks core](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-tasks-core): task model · Defines runnable task abstractions, hooks, and run-cache lifecycle support. · `crates/dbt-tasks-core`
- [tasks sa](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-tasks-sa): task executor · Converts compiled nodes into executable model, seed, snapshot, test, and operation tasks. · `crates/dbt-tasks-sa`

### Platform

Adapters, auth, and cloud connectivity.

- [adapter](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-adapter): warehouse adapter · Adapter and engine stack for SQL generation, metadata queries, retries, sidecars, and query comments. · `crates/dbt-adapter`
- [adbc](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-adbc): driver manager · ADBC driver layer and database/connection management for warehouse engines. · `crates/dbt-adbc`
- [auth](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-auth): credential resolver · Resolves warehouse credentials and service-specific authentication flows. · `crates/dbt-auth`
- [platform auth](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-platform-auth): cloud auth · Credential chaining, OAuth, env-based resolution, and session caching for platform integrations. · `crates/dbt-platform-auth`
- [cloud api](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-cloud-api): http client · Typed client for dbt Cloud APIs and connection metadata endpoints. · `crates/dbt-cloud-api`
- [cloud config](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-cloud-config): config resolver · Resolves dbt Cloud-specific configuration into local runtime settings. · `crates/dbt-cloud-config`

### State & docs

Artifacts, caches, docs, and lineage surfaces.

- [metadata](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-metadata): parse state · Tracks partial parse state, file registry, and index resolution. · `crates/dbt-metadata`
- [metadata parquet](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-metadata-parquet): artifact store · Parquet-backed artifact encoding for parse, compile, runtime, and telemetry data. · `crates/dbt-metadata-parquet`
- [schema store](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-schema-store): schema cache · Persists schema snapshots and cached metadata for downstream consumers. · `crates/dbt-schema-store`
- [state](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-state): run state · Run cache, metadata cache, authentication helpers, and service clients for persistent state. · `crates/dbt-state`
- [docs core](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-docs-core): docs model · Shared docs-domain types used by the docs server and related consumers. · `crates/dbt-docs-core`

### Support

Shared utilities, telemetry, and test scaffolding.

- [common](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-common): shared core · Cross-cutting utilities for cancellation, IO, hashing, serialization, tracing glue, and artifacts. · `crates/dbt-common`
- [error](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-error): error model · Structured error types, code locations, and tracing-friendly diagnostics. · `crates/dbt-error`
- [tracing](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-tracing): telemetry core · Structured logs, spans, OTLP/JSONL/Parquet writers, and trace infrastructure. · `crates/dbt-tracing`
- [telemetry](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-telemetry): event schema · Generated telemetry event schemas plus JSON/Arrow serialization support. · `crates/dbt-telemetry`
- [test utils](https://github.com/pavan19047/dbt-core/tree/main/crates/dbt-test-utils): test harness · Deterministic integration and snapshot harnesses for project, task, and telemetry flows. · `crates/dbt-test-utils`

## Connections

- dbt-main → loader: loads projects · The main CLI starts by loading project files, packages, and profiles.
- dbt-main → parser: parses nodes · CLI workflows delegate resource resolution and validation to the parser.
- dbt-main → compilation: compiles graph · Compiled project state is produced for downstream execution and docs.
- dbt-main → tasks sa: runs tasks · Execution is coordinated through the task layer.
- dbt-main → state: persists state · Run cache, auth, and service state are mediated through persistent state services.
- dbt-main → tracing: emits telemetry · CLI startup and command execution are instrumented.
- loader → schemas: hydrates schemas · Loaded files are normalized into typed project/profile/manifest models.
- loader → jinja utils: renders setup · Loader-time templates and environment setup depend on Jinja utilities.
- loader → cloud config: resolves cloud config · Cloud-specific configuration is loaded alongside local project inputs.
- loader → auth: resolves creds · Loader-side configuration can require warehouse credentials.
- parser → jinja ctx: builds contexts · Parser resolution uses phase-specific Jinja contexts.
- parser → selector parser: applies selectors · Selection expressions are parsed into project traversal rules.
- parser → metadata: updates parse state · Parsed resources feed partial parse and file registry state.
- profile → jinja utils: renders profiles · Profiles are templated through the Jinja layer.
- jinja utils → jinja ctx: builds envs · Context objects are assembled into phase-specific environments.
- jinja utils → jinja filters: registers filters · dbt exposes custom filter functions to templates.
- jinja utils → jinja vars: resolves vars · Environment and dbt variables are injected into rendering.
- compilation → dag: builds dag · Compilation produces dependency graphs and artifact structure.
- compilation → scheduler: plans schedule · Compilation hands scheduling information to execution planning.
- compilation → metadata parquet: writes artifacts · Compiled state can be persisted as Parquet-backed artifacts.
- compilation → schema store: hydrates schema store · Schema information is pushed into shared caches and stores.
- dag → scheduler: orders work · Dependency relations drive execution ordering.
- scheduler → tasks core: creates tasks · Schedules are translated into task abstractions and run units.
- tasks core → tasks sa: executes task model · The core task model is specialized by the static-analysis/runtime implementation.
- tasks sa → adapter: uses adapters · Task execution ultimately crosses into warehouse adapters.
- tasks sa → state: uses run cache · Task execution consults cached run and metadata state.
- adapter → adbc: opens drivers · The adapter layer can route through ADBC-managed connections and drivers.
- adapter → auth: authenticates · Warehouse connections use adapter-specific credential resolution.
- adapter → platform auth: cloud auth · Cloud-integrated warehouses and services use platform auth flows.
- adapter → tracing: instruments queries · Adapter operations are traced for observability.
- state → metadata parquet: stores artifacts · Persistent state is serialized into scalable artifact formats.
- state → cloud api: calls cloud · State services may talk to dbt Cloud endpoints.
- docs server → docs core: serves docs · The server exposes docs-domain data structures and shared models.
- docs server → metadata parquet: reads artifacts · Docs endpoints are backed by persisted parse and runtime artifacts.
- docs server → state: reads state · Docs and lineage queries can consult live or cached state.
- docs server → dag: shows lineage · Graph and lineage handlers render dependency information.
- metricflow → dbt-main: shares runtime · MetricFlow tooling sits beside the main CLI/runtime boundary.
- sa cli → parser: static parse · The specialized CLI exercises the parsing and analysis pipeline.
- test utils → loader: fixtures projects · Test harnesses build project fixtures around the loader boundary.
- test utils → tasks sa: runs task tests · Integration tests exercise the task execution layer.
- test utils → tracing: captures traces · Tests validate structured logs and telemetry output.
