DJ is a VS Code extension that revolutionizes dbt development through a structured, JSON-first approach. Define your dbt models and sources as validated .model.json and .source.json files that automatically generate corresponding SQL and YAML configurations.
Interactive Development Experience
Visual Model Builder - Interactive node-based canvas for creating models visually
Interactive Tutorials - "Assist Me" and "Play Tutorial" modes for guided learning
Real-time Lineage - Model and column-level dependency visualization
Integrated BI Preview - One-click Lightdash preview from your models
Quick demonstration of creating a model using the visual editor
Key Features
IntelliSense: Smart autocomplete for models, sources, columns, and SQL expressions.
Real-time Validation: JSON Schema validation with instant error detection.
Modern Web Interface: React-based UI for scaffolding model and source JSONs.
Auto-Generation: Automatically generates dbt SQL and YAML files from JSON configurations.
Data Catalog Integration: Browse Trino catalogs and execute queries directly in VS Code.
BI Integration: Built-in Lightdash support for creating dashboards from dbt models.
11 Model Types: Complete coverage from staging to marts with pre-built templates.
Supported Stack
DJ integrates seamlessly with your modern data stack - from VS Code to dbt, Trino, and Lightdash.
Prerequisites: DJ builds on top of dbt. If you're new to dbt, we recommend starting with the dbt Introduction Guide.
Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
Type "Extensions: Install from VSIX..."
Select the downloaded .vsix file
Note: Want to build the DJ (Data JSON) Framework extension from source? See the DEVELOPMENT_SETUP.md for development setup.
5. Configure VS Code Settings
The extension can be configured in the VS Code settings or by adding to the .vscode/settings.json file.
To configure the extension via VS Code settings,
Open the VS Code settings (Cmd/Ctrl + ,)
Under "Extensions", select "DJ (Data JSON) Framework".
Configure the extension settings as needed.
To configure the extension via .vscode/settings.json, add the configuration options as needed to the file:
{
"dj.pythonVenvPath": ".venv", // path to the local Python virtual environment relative to the workspace root
"dj.dbtProjectNames": ["your_project_name"] // optional, configure if you have multiple dbt projects
}
Configuration
DJ offers extensive configuration options to customize your workflow. For a complete reference with examples and troubleshooting, see the Settings Reference Guide.
Quick Configuration
Common settings you'll want to configure first:
{
"dj.pythonVenvPath": ".venv", // Python virtual environment
"dj.trinoPath": "/usr/local/bin", // Trino CLI location
"dj.dbtProjectNames": ["analytics"], // Filter which projects to load
"dj.airflowGenerateDags": true // Enable Airflow DAG generation
}
Look for the DJ (Data JSON) Framework extension panel in the sidebar and click on it.
Under "Actions", click on "Create Source".
Fill the form:
Select Project: Choose your dbt project
Select Trino Catalog: Choose your data catalog
Select Trino Schema: Choose your schema
Select Trino Table: Choose your source table
This creates a .source.json file with full IntelliSense support.
Important: Source data should have been ingested into the Trino catalog as this is where the extension will look for the values for the form fields.
7. Choose Your Path
DJ offers multiple ways to build models - choose what works best for you:
Visual Editor: Use the node-based canvas for interactive model creation
JSON-First: Edit .model.json files directly with full IntelliSense
Guided Tutorial: Run "DJ: Play Tutorial" from the command palette
8. Create Your First Model
Look for the DJ (Data JSON) Framework extension panel in the sidebar and click on it.
Under "Actions", click on "Create Model".
Fill the form:
Select Project: Choose your dbt project
Select Model Type: Choose your model type
Select Group: Choose your business domain
Enter Topic: Enter your data topic
Enter Name: Enter your model name
Save to auto-generate SQL and YAML files
This creates a .model.json file with full IntelliSense support and auto-generates corresponding dbt files.
Important: If you don't see any groups in the dropdown, you need to configure the groups in your dbt project and run dbt parse to generate/update the manifest.json file.
9. Optional: Lightdash Integration
For BI integration, install Lightdash CLI and configure the environment variables:
# Install Lightdash CLI
npm install -g @lightdash/cli
# Configure environment variables
export LIGHTDASH_URL=your-lightdash-url
export LIGHTDASH_PREVIEW_NAME=your-preview-name
export LIGHTDASH_PROJECT=your-project-uuid
export LIGHTDASH_TRINO_HOST=your-trino-host # Optional. Uses host from profiles.yml by default. Set this if running Lightdash and Trino together in Docker locally.
Advanced Configuration: For custom dbt project paths and multiple project support, see Lightdash Configuration Guide.
Model Types
As models in dbt are intended to be reusable building blocks, instead of performing many different types of transformation in single SQL statements (e.g. nested joins and aggregations), each model in DJ is assigned a single type key which describes the primary operation it performs. This was, if two different downstream models need the same tranformation (e.g. an hourly aggregation), they can simply select from that aggregation building block.