debugging-dbt-errors
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "debugging-dbt-errors":https://skillpi.com/zh/skills/deepskill-9c9daac8ba2a7dff4cfd8a46016b0d513099169ca8611aa98c99bf1307d8a7d1。安装前核对上游来源和版本:https://github.com/AltimateAI/data-engineering-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
用于系统性调试与修复 dbt 错误。适用于提到“修复/错误/损坏/失败/调试/无法工作”的任务、出现编译错误、数据库错误或测试失败、模型产出不正确或出现意外结果,以及需要排查 dbt 命令失败原因的场景。阅读完整错误信息、先检查上游依赖,并运行 dbt build 验证修复。
介绍来源: third_party · AltimateAI · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 输入和输出
- 翻译待完成,请参阅来源文档。
- 软件、账号及付费要求
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: debugging-dbt-errors
description: |
Debugs and fixes dbt errors systematically. Use when working with dbt errors for:
(1) Task mentions "fix", "error", "broken", "failing", "debug", "wrong", or "not working"
(2) Compilation Error, Database Error, or test failures occur
(3) Model produces incorrect output or unexpected results
(4) Need to troubleshoot why a dbt command failed
Reads full error, checks upstream first, runs dbt build (not just compile) to verify fix.dbt Troubleshooting
Read the full error. Check upstream first. ALWAYS run dbt build after fixing.
Critical Rules
- ALWAYS run
dbt buildafter fixing - compile is NOT enough to verify the fix - If fix fails 3+ times, stop and reassess your entire approach
- Verify data after build - build passing doesn't mean output is correct
Workflow
1. Get the Full Error
dbt compile --select <model_name>
# or
dbt build --select <model_name>
Read the COMPLETE error message. Note the file, line number, and specific error.
2. Inspect Actual Data (For Data Issues)
Before fixing "wrong output" or "incorrect results", query the actual data:
# Preview current output
dbt show --select <model_name> --limit 20
# Check specific values with inline query
dbt show --inline "select * from {{ ref('model_name') }} where <condition>" --limit 10
# Compare with expected - look for patterns
dbt show --inline "select column, count(*) from {{ ref('model_name') }} group by 1 order by 2 desc" --limit 10
Understand what's wrong before attempting to fix it.
3. Read Compiled SQL
cat target/compiled/<project>/<path>/<model_name>.sql
See the actual SQL that will run.
4. Analyze Error Type
| Error Type | Look For |
|---|---|
| Compilation Error | Jinja syntax, missing refs, YAML issues |
| Database Error | Column not found, type mismatch, SQL syntax |
| Dependency Error | Missing model, circular reference |
5. Check Upstream Models
# Find what this model references
grep -E "ref\(|source\(" models/<path>/<model_name>.sql
# Read upstream model to verify columns
cat models/<path>/<upstream_model>.sql
Many errors come from upstream changes, not the current model.
6. Apply Fix
Common fixes:
| Error | Fix |
|---|---|
| Column not found | Check upstream model's output columns |
| Ambiguous column | Add table alias: table.column |
| Type mismatch | Add explicit CAST() |
| Division by zero | Use NULLIF(divisor, 0) |
| Jinja error | Check matching {{ }} and {% %} |
7. Rebuild (MANDATORY)
dbt build --select <model_name>
3-Failure Rule: If build fails 3+ times, STOP. Step back and:
- Re-read the original error
- Check if your entire approach is wrong
- Consider alternative solutions
8. Verify Fix
# Preview the data
dbt show --select <model_name> --limit 10
# Run tests
dbt test --select <model_name>
9. Re-review Logic Against Requirements
After fixing, re-read the original request and verify:
- Does the output match what the user asked for?
- Are the column names exactly as requested?
- Is the calculation logic correct per the requirements?
- Did you solve the actual problem, not just make the error go away?
10. Check Downstream Impact
# Find downstream models
grep -r "ref('<model_name>')" models/ --include="*.sql"
# Rebuild downstream
dbt build --select <model_name>+
Error Categories
Compilation Errors
- Check Jinja syntax: matching
{{ }}and{% %} - Verify macro arguments
- Check YAML indentation
Database Errors
- Read compiled SQL in
target/compiled/ - Check column names against upstream
- Verify data types
Test Failures
- Read the test SQL to understand what it checks
- Compare your model output to expected behavior
- Check column names, data types, NULL handling
Anti-Patterns
- Making random changes without understanding the error
- Assuming the current model is wrong before checking upstream
- Not reading the FULL error message
- Declaring "fixed" without running build
- Getting stuck making small tweaks instead of reassessing
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 解决数据工程中高频刚需问题:dbt错误系统调试
- 提供具体可执行的故障排除工作流和最佳实践
- 涵盖编译错误、数据库错误、测试失败等完整错误类型
亮点
- 触发词覆盖全面:修复、错误、调试、编译失败等常见dbt问题场景
- 边界清晰,避免与其他技能重叠
亮点
- 结构完整:包含关键规则、分步工作流、错误分类、反模式
- 提供具体命令示例和验证机制
- frontmatter完整规范
亮点
- 所有命令均为标准dbt CLI工具,参数正确
- 包含强制验证步骤(dbt build)和失败处理规则(3次失败停止)
- 提供数据检查方法避免盲目修复
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
翻译待完成,请参阅来源文档。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。