vscode-dbt-power-user is a comprehensive VSCode extension that makes VSCode seamlessly work with dbt (data build tool). It's an open-source project published by Altimate AI that extends VSCode with advanced dbt features including auto-completion, query preview, lineage visualization, documentation generation, and AI-powered features.
- Version: 0.57.3
- Project Type: VSCode Extension (TypeScript/React)
- License: MIT
- Architecture: Multi-layered with webview panels, Python integrations, and MCP server
The extension follows a dependency injection pattern using Inversify container:
- Entry Point:
src/extension.ts→DBTPowerUserExtension - DI Container:
src/inversify.config.tsmanages all service dependencies - Main Extension Class:
DBTPowerUserExtensionorchestrates all components
The extension operates across multiple processes:
-
Main Extension Process (Node.js/TypeScript)
- VSCode API integration
- File system operations
- dbt CLI interactions
-
Webview Panels (React/TypeScript)
- Modern React-based UI components
- Located in
webview_panels/directory - Built with Vite, uses Antd for UI components
-
Python Bridge Integration
- dbt core/cloud integration via Python scripts
- Key files:
dbt_core_integration.py,dbt_cloud_integration.py - Jupyter kernel for notebook functionality
-
MCP Server (Model Context Protocol)
- AI integration and tool calling functionality
- Located in
src/mcp/
src/
├── manifest/ # dbt project parsing and management
├── dbt_client/ # dbt integration (core, cloud, fusion)
├── webview_provider/ # Webview panel management
├── autocompletion_provider/ # Language server features
├── services/ # Business logic services
├── commands/ # VSCode command implementations
├── mcp/ # Model Context Protocol server
└── telemetry/ # Analytics and tracking
Multiple Integration Types:
- dbt Core: Direct Python integration via Python bridge
- dbt Cloud: API-based integration with dbt Cloud services
- dbt Fusion: Command-line integration with dbt-fusion CLI
- Core Command: CLI wrapper integration for dbt core
Key Integration Files:
src/dbt_client/dbtCoreIntegration.ts- dbt Core Python integrationsrc/dbt_client/dbtCloudIntegration.ts- dbt Cloud API integrationsrc/dbt_client/dbtFusionCommandIntegration.ts- dbt Fusion CLI integrationdbt_core_integration.py- Python bridge for Core integration
Provider Architecture: Each feature implemented as a separate provider:
autocompletion_provider/- IntelliSense for dbt models, macros, sourcesdefinition_provider/- Go-to-definition functionalityhover_provider/- Hover informationcode_lens_provider/- Inline actionsvalidation_provider/- SQL validation
Modern React Architecture (webview_panels/):
- Build System: Vite + TypeScript + React 18
- State Management: Redux Toolkit
- UI Framework: Antd + custom components
- Data Visualization: Perspective.js, Plotly.js
Key Panels:
modules/dataPilot/- AI chat interfacemodules/queryPanel/- Query results and analysismodules/lineage/- Data lineage visualizationmodules/documentationEditor/- Documentation managementmodules/insights/- Project insights and actions
DataPilot AI Integration:
- Chat-based interface for dbt assistance
- Query explanation and optimization
- Documentation generation
- Test suggestions
MCP Server Integration:
- Tool calling for dbt operations
- Integration with Claude and other AI models
- Located in
src/mcp/server.ts
Main Extension Build (Webpack):
npm run webpack # Development build
npm run vscode:prepublish # Production buildWebview Panels Build (Vite):
npm run panel:webviews # Build React componentsKey Scripts:
npm run compile- Compile the codenpm run watch- Development with hot reloadnpm run test- Jest-based testingnpm run lint- ESLint + Prettiernpm run build-vsix- Package extension
Development Environment:
- Uses VSCode's built-in debugger ("Launch Extension")
- Hot reload for webview panels
- Python environment auto-detection
Test Configuration (jest.config.js):
- Unit Tests: Jest + ts-jest
- Mock System: Custom VSCode API mocks
- Coverage: Istanbul-based coverage reporting
- Test Location:
src/test/with mock infrastructure
Required Extensions:
samuelcolvin.jinjahtml- Jinja templating supportms-python.python- Python environment integrationaltimateai.vscode-altimate-mcp-server- MCP server
Backend (Node.js):
inversify- Dependency injectionpython-bridge- Python process communicationzeromq- Jupyter kernel communication@modelcontextprotocol/sdk- MCP protocol
Frontend (React):
react18 +react-dom@reduxjs/toolkit- State managementantd- UI component library@finos/perspective- Data grid and visualization
Python Scripts:
dbt_core_integration.py- Core dbt operationsdbt_cloud_integration.py- Cloud API operationsdbt_healthcheck.py- Project health analysisaltimate_notebook_kernel.py- Jupyter integration
Comprehensive Settings (190+ configuration options):
- dbt integration mode selection
- Query limits and templates
- AI features and endpoints
- Lineage visualization options
- Defer-to-production configuration
File Type Associations:
jinja-sql- Primary dbt model filesjinja-yaml- dbt configuration filesjinja-md- Documentation files- Custom notebook format (
.notebook)
80+ Commands Available:
- Model execution (
dbtPowerUser.runCurrentModel) - Documentation generation (
dbtPowerUser.generateSchemaYML) - Query analysis (
dbtPowerUser.sqlLineage) - AI assistance (
dbtPowerUser.openDatapilotWithQuery)
CI/CD Pipeline (.github/workflows/ci.yml):
- Build Matrix: macOS, Ubuntu, Windows
- Visual Studio Marketplace: Primary distribution
- OpenVSX Registry: Open-source alternative
- Platform-specific builds: Architecture-aware packaging
Automated Release:
- Git tag triggers release pipeline
- Pre-release and stable channel support
- Slack notifications for release status
- VSIX package generation
- Dependency Injection: All services use Inversify DI
- Provider Pattern: Language features as modular providers
- Event-Driven: Manifest changes trigger updates across components
- Separation of Concerns: Clear boundaries between UI, business logic, and dbt integration
For Language Features:
- Create provider in appropriate
*_provider/directory - Register in
inversify.config.ts - Wire up in
DBTPowerUserExtension
For UI Features:
- Add React component in
webview_panels/src/modules/ - Update routing in
AppRoutes.tsx - Add state management slice if needed
For dbt Integration:
- Extend appropriate dbt client (
dbtCoreIntegration.tsetc.) - Add Python bridge function if needed
- Update MCP server tools if AI-accessible
- Unit Tests: Mock VSCode APIs and dependencies
- Integration Tests: Test with real dbt projects
- Manual Testing: Use "Launch Extension" debug configuration
- Webview Testing: Storybook for component development
The extension heavily relies on dbt's manifest.json for understanding project structure. Most features key off manifest parsing events.
Always consider how features work across dbt core, cloud, and other integration types. Use strategy pattern for integration-specific behavior.
Uses VSCode's webview messaging system with typed message contracts. State is synchronized between extension and webview contexts.
For dbt operations requiring Python, use the established bridge pattern with JSON serialization and error handling.
This architecture enables the extension to provide comprehensive dbt development support while maintaining modularity and extensibility for future enhancements.
The dbt Power User extension accelerates dbt and SQL development by 3x through three key phases:
- SQL Visualizer: Visual query builder and analyzer
- Query Explanation: AI-powered SQL query explanation
- Auto-generation: Generate dbt models from sources or raw SQL
- Auto-completion: IntelliSense for dbt models, macros, sources, and doc blocks
- Click to Run: Execute models directly from editor
- Query Translation: Translate SQL between different dialects
- Compiled SQL Preview: View compiled dbt code before execution
- Query Results Preview: Execute and analyze query results with export capabilities
- Test Generation: AI-powered test generation for dbt models
- Column Lineage: Detailed data lineage with code visibility
- Defer to Production: Run models without rebuilding dependencies
- SQL Validation: Validate SQL without execution
- Model Lineage: Visual representation of model dependencies
- Documentation Generation: AI-powered documentation creation
- Code Collaboration: Discussion threads on code and documentation
- Project Governance: Automated checks for code quality and standards
- SaaS UI Integration: Web-based interface for dbt docs and lineage
- Query History & Bookmarks: Track and share query executions
- Export Workflows: Share lineage and documentation externally
The extension includes AI Teammates through the DataMates Platform:
- Coaching: Personalize AI teammates for specific requirements
- Query Assistance: AI-powered query explanation and optimization
- Documentation: Automated documentation generation
- Test Suggestions: Smart test recommendations
- SQL Translation: Cross-dialect SQL conversion
Free Extension Features:
- SQL Visualizer, Model-level lineage, Auto-generation from sources
- Auto-completion, Click to Run, Compiled SQL preview
- Query results preview, Defer to production, SQL validation
With Altimate AI Key (free signup at app.myaltimate.com):
- Column-level lineage, Query explanation AI, Query translation AI
- Auto-generation from SQL, Test generation AI, Documentation generation AI
- Code/documentation collaboration, Lineage export, SaaS UI
- Project governance, Query history & bookmarks
Install directly from VS Code Marketplace or via VS Code:
- Open VS Code Extensions panel (
Ctrl+Shift+X) - Search for "dbt Power User"
- Click Install
- Reload VS Code if prompted
Add to your .devcontainer/devcontainer.json:
{
"customizations": {
"vscode": {
"files.associations": {
"*.yaml": "jinja-yaml",
"*.yml": "jinja-yaml",
"*.sql": "jinja-sql",
"*.md": "jinja-md"
},
"extensions": ["innoverio.vscode-dbt-power-user"]
}
}
}The extension is also available for Cursor IDE. Install the same way as VS Code.
Configure how the extension connects to dbt:
- dbt Core: For local dbt installations with Python bridge (default)
- dbt Cloud: For dbt Cloud API integration
- dbt Fusion: For dbt-fusion CLI integration
- dbt Core Command: For CLI-based dbt core integration
Set via dbt.dbtIntegration setting.
dbt Fusion is a command-line interface that provides enhanced dbt functionality. When using fusion integration:
- Requires dbt-fusion CLI to be installed in your environment
- Extension automatically detects fusion installation via
dbt --versionoutput - Provides full feature support including query execution, compilation, and catalog operations
- Uses JSON log format for structured command output parsing
Ensure Python and dbt are properly installed and accessible. The extension will auto-detect your Python environment through the VS Code Python extension.
For advanced AI features, get a free API key:
- Sign up at app.myaltimate.com/register
- Add API key to
dbt.altimateAiKeysetting - Set instance name in
dbt.altimateInstanceNamesetting
- Open your dbt project folder in VS Code
- Run the setup wizard: Select "dbt" in bottom status bar → "Setup Extension"
- The extension will auto-install dbt dependencies if enabled
- Verify setup via Command Palette → "dbt Power User: Diagnostics"
Use the built-in setup wizard for automated issue detection:
- Click "dbt" or "dbt is not installed" in bottom status bar
- Select "Setup Extension"
- Follow guided setup process
Run comprehensive system diagnostics:
- Open Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) - Type "diagnostics" → Select "dbt Power User: Diagnostics"
- Review output for environment issues, Python/dbt installation status, and connection problems
Check VS Code Problems panel for dbt project issues:
- View → Problems (or
Ctrl+Shift+M) - Look for dbt-related validation errors
Enable detailed logging for troubleshooting:
- Command Palette → "Set Log Level" → "Debug"
- View logs: Output panel → "Log" dropdown → "dbt"
- Reproduce the issue to capture debug information
For advanced debugging:
- Help → Toggle Developer Tools
- Check console for JavaScript errors and detailed logs
Extension not recognizing dbt project:
- Verify
dbt_project.ymlexists in workspace root - Check Python environment has dbt installed
- Run diagnostics command for detailed analysis
Python/dbt not found:
- Configure Python interpreter via VS Code Python extension
- Verify dbt is installed in selected Python environment
- Set
dbt.dbtPythonPathOverrideif using custom Python path
Connection issues:
- Verify database connection in dbt profiles
- Check firewall/network settings
- Review connection details in diagnostics output
- Join #tools-dbt-power-user in dbt Community Slack
- Contact support at altimate.ai/support
- Use in-extension feedback widgets for feature-specific issues
- Smart IntelliSense: Auto-complete model names with
ref()function - Go-to-Definition: Navigate directly to model files
- Hover Information: View model details on hover
- Macro Auto-completion: IntelliSense for custom and built-in macros
- Parameter Hints: Auto-complete macro parameters
- Definition Navigation: Jump to macro definitions
- Source Auto-completion: IntelliSense for configured sources
- Column Awareness: Auto-complete source column names
- Schema Navigation: Navigate to source definitions
- Doc Block Auto-completion: IntelliSense for documentation references
- Definition Linking: Navigate to doc block definitions
- Compiled Code View: See final SQL before execution
- Template Resolution: Preview Jinja templating results
- Syntax Highlighting: Enhanced SQL syntax highlighting for dbt files
- Preview Results: Execute queries with
Cmd+Enter/Ctrl+Enter - Result Analysis: Export results as CSV, copy as JSON
- Query History: Track executed queries
- Configurable Limits: Set row limits for query previews (default: 500 rows)
- Auto-formatting: Integration with sqlfmt
- Custom Parameters: Configure formatting rules
- Batch Processing: Format multiple files
- Natural Language: Get plain English explanations of complex SQL
- Step-by-step Analysis: Breakdown of query logic
- Performance Insights: Query optimization suggestions
- Model from Source: Generate base models from source tables
- Model from SQL: Convert raw SQL to dbt models
- Test Generation: AI-powered test suggestions
- Documentation Generation: Auto-generate model documentation
- Cross-dialect Support: Translate SQL between database dialects
- Syntax Adaptation: Handle dialect-specific functions and syntax
This is a MkDocs-based documentation site for the dbt Power User VSCode Extension by Altimate AI. The site uses the Material theme and is organized around user workflows: Develop, Test, and Collaborate.
- Install dependencies:
pip install --requirement documentation/requirements.txt - Start development server:
cd documentation; mkdocs serve(serves at http://127.0.0.1:8000) - Build site:
cd documentation; mkdocs build - Deploy to GitHub Pages:
cd documentation; mkdocs gh-deploy
documentation/docs/contains all documentation content in Markdown format- Content is organized by feature areas:
setup/,develop/,test/,document/,govern/,discover/,teammates/,datamates/,arch/ - Images and assets are stored within feature-specific directories
documentation/mkdocs.ymlcontains all site configuration
documentation/mkdocs.yml: Main site configuration including navigation, theme settings, and pluginsdocumentation/requirements.txt: Python dependencies for MkDocs and pluginsdocumentation/docs/overrides/: Custom theme overrides (currently empty)documentation/docs/javascripts/: Custom JavaScript for enhanced functionality
The site uses Material theme with:
- Custom Altimate AI branding and colors
- Google Analytics integration (G-LXRSS3VK5N)
- Git revision date tracking via plugin
- Built-in feedback system
- Dark/light mode support
Navigation follows a three-phase user journey:
- Setup: Installation and configuration
- Develop: Core development features
- Test: Testing and validation tools
- Additional: Documentation, collaboration, discovery, and AI features
- Create
.mdfiles in the appropriatedocs/subdirectory - Update the
navsection inmkdocs.ymlto include the new page - Follow existing naming conventions for consistency
- Store images in the same directory as the referencing markdown file
- Use relative paths for image references
- Common assets go in
docs/assets/
Use relative markdown links to reference other pages. The site has extensive cross-referencing between related features.
Always test locally with mkdocs serve before deploying. The development server provides live reload for content changes.