dbt Editor
The dbt Editor at frontend/data-workbench/src/components/DbtEditor/ provides an IDE-like experience for dbt model development with a model tree, SQL editor, and results panel.
Components
| Component | File | Purpose |
|---|---|---|
DbtEditor | DbtEditor.tsx | Main IDE layout |
DbtModelTree | DbtModelTree.tsx | File tree for dbt project |
DbtResultsPanel | DbtResultsPanel.tsx | Compilation and run results |
Types
// frontend/data-workbench/src/components/DbtEditor/types.ts
interface DbtModel {
name: string;
path: string;
type: 'model' | 'source' | 'seed' | 'snapshot' | 'test' | 'macro';
content: string;
compiledSql?: string;
lastRun?: DbtRunResult;
}DbtEditor
IDE-style layout with:
- Left panel: dbt project file tree (models, sources, seeds, snapshots)
- Center: Monaco SQL editor with Jinja2 highlighting
- Bottom: Compilation results, run output, test results
- Toolbar: Compile, Run, Test, Generate docs
- Integration with
DbtApiClientfor compilation and execution