dbt-commands
БесплатноБез исполняемых скриптовНе проверенdbt command-line operations, model selection syntax, Jinja patterns, troubleshooting, and debugging. Use this skill when running dbt commands, selecting…
Об этом скилле
dbt Commands & Operations
Purpose
Transform AI agents into experts on dbt command-line operations, model selection patterns, Jinja templating, and troubleshooting techniques for efficient dbt development and debugging.
When to Use This Skill
Activate this skill when users ask about:
- Running dbt commands (build, run, test, compile)
- Model selection syntax and patterns
- Debugging compilation or execution errors
- Using Jinja macros and templates
- Troubleshooting dbt issues
- Command-line flags and options
- Generating and serving documentation
- Understanding dbt command output
Official dbt Documentation: dbt Command Reference
Essential Commands
Setup & Installation
# Install dbt packages
dbt deps
# Test connection and configuration
dbt debug
# Clean compiled files and logs
dbt clean
Building Models
# Build everything (run + test) - RECOMMENDED
dbt build
# Build with full refresh of incremental models
dbt build --full-refresh
# Run all models (no tests)
dbt run
# Run and test separately
dbt run
dbt test
Best Practice: Use dbt build instead of separate run + test commands.
Model Selection Syntax
Basic Selection
# Specific model
dbt run --select model_name
dbt run --select dim_customers
# Multiple models
dbt run --select dim_customers fct_orders dim_products
Dependency Selection
# Model + upstream dependencies (parents)
dbt run --select +model_name
dbt run --select +dim_customers
# Model + downstream dependencies (children)
dbt run --select model_name+
dbt run --select dim_customers+
# Model + all dependencies (both directions)
dbt run --select +model_name+
dbt run --select +dim_customers+
Visualization:
+model_name = model + all parents
model_name+ = model + all children
+model_name+ = model + all parents + all children
Selection by Tag
# Single tag
dbt run --select tag:bronze
dbt run --select tag:gold
# Multiple tags (AND logic - must have both)
dbt run --select tag:gold tag:critical
# Multiple tags (OR logic - has either)
dbt run --select tag:gold,tag:silver
Common tags:
tag:bronze- All staging modelstag:silver- All intermediate modelstag:gold- All mart models
Selection by Folder
# All models in folder
dbt run --select bronze
dbt run --select gold
# Subfolder
dbt run --select bronze.crawl
dbt run --select gold.run
# Multiple folders
dbt run --select bronze silver
Exclude Models
# Exclude specific models
dbt run --exclude model_name
# Exclude by tag
dbt run --exclude tag:deprecated
# Exclude folder
dbt run --exclude bronze
# Complex: Run gold, but exclude certain models
dbt run --select tag:gold --exclude fct_large_table
Advanced Selection
# Models modified in current git branch
dbt run --select state:modified --state ./prod-manifest/
# Models by package
dbt run --select package:dbt_utils
# Models by resource type
dbt test --select test_type:generic
dbt test --select test_type:singular
# Intersection (models matching multiple criteria)
dbt run --select tag:gold,tag:critical # Has gold OR critical
Official dbt Docs: Node Selection Syntax
Testing Commands
# Run all tests
dbt test
# Test specific model
dbt test --select dim_customers
# Test specific column
dbt test --select dim_customers,column:customer_id
# Test by type
dbt test --select test_type:generic # Generic tests only
dbt test --select test_type:singular # Singular tests only
# Test with dependencies
dbt test --select +dim_customers+
# Store test failures for analysis
dbt test --store-failures
# Test by layer
dbt test --select tag:gold
Documentation Commands
# Generate documentation
dbt docs generate
# Serve documentation locally (default port 8080)
dbt docs serve
# Custom port
dbt docs serve --port 8001
# Generate static HTML (for hosting)
dbt docs generate --static
Accessing docs: Navigate to http://localhost:8080 after running dbt docs serve
Debugging Commands
# Check SQL compilation without running
dbt compile --select model_name
# View compiled SQL
cat target/compiled/your_project/models/path/to/model.sql
# Run with verbose logging
dbt run --select model_name --debug
# Run with detailed log level
dbt run --select model_name --log-level debug
# List all models (useful for understanding project)
dbt list
# List models with selection
dbt list --select tag:gold
# Show dependency graph
dbt list --select +dim_customers+ --output path
Jinja Patterns
Official dbt Documentation: Jinja & Macros
Loops
-- Generate columns for each status
{% for status in ['pending', 'shipped', 'delivered', '
Установить dbt-commands в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dbt-commands?
dbt command-line operations, model selection syntax, Jinja patterns, troubleshooting, and debugging. Use this skill when running dbt commands, selecting specific models, debugging compilation errors, using Jinja macros, or troubleshooting dbt execution issues.
Как установить скилл dbt-commands?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dbt-commands запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic