Skip to main content

File Editor

The File Editor lets you edit dbt project files directly in the workbench — no need to switch to an external editor.

Features​

  • SQL/Jinja editor — Syntax highlighting for SQL and Jinja templates
  • YAML editor — Edit dbt_project.yml, schema files, and other configs
  • File tree browser — Navigate your project structure
  • Auto-save — Changes are saved automatically with debouncing
  • Validation — Real-time YAML validation and SQL linting
  • Git integration — Changes appear in the Version Control panel

Opening the File Editor​

  1. Click File Editor in the sidebar
  2. Browse the file tree on the left
  3. Click any file to open it in the editor

Editing SQL Models​

The SQL editor supports:

  • Syntax highlighting for SQL and Jinja
  • Auto-completion for dbt functions (ref, source, config, etc.)
  • Error highlighting for invalid Jinja
  • Multi-cursor editing
  • Find and replace

Example: Editing a Model​

-- models/staging/stg_orders.sql
with source as (
select * from {{ ref('raw_orders') }}
)

select
order_id,
customer_id,
order_date,
status,
amount
from source
where status != 'cancelled'

Editing YAML Configs​

The YAML editor supports:

  • Syntax highlighting
  • Schema validation for dbt_project.yml
  • Auto-completion for common fields
  • Error detection for invalid YAML

Example: dbt_project.yml​

name: 'my_dbt_project'
version: '1.0.0'
config-version: 2

profile: 'default'

model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]

models:
my_dbt_project:
staging:
+materialized: view
marts:
+materialized: table

Auto-Save and Git Integration​

Changes are auto-saved after a 500ms debounce. Once saved:

  1. The file appears in the Version Control panel
  2. You can review the diff
  3. Stage and commit the change

Role-Based Access​

RoleView FilesEdit SQLEdit YAMLEdit Config
Viewer✓✗✗✗
Developer✓✓✓✗
Admin✓✓✓✓

Keyboard Shortcuts​

ShortcutAction
Ctrl+SSave (manual trigger)
Ctrl+FFind
Ctrl+HFind and replace
Ctrl+ZUndo
Ctrl+Shift+ZRedo
Ctrl+/Toggle comment

See Also​