Prompt file imported from Reguram/snowflake-dbt-starter-kit (
.github/prompts/validate-and-build.prompt.md). Copyright stays with the author.
Validate and Build
Compile and build the currently open dbt model (or the model I specify).
What to do:
- Run
dbt compile --select <model>to check for compilation errors - If compilation fails, diagnose and fix the issue
- Run
dbt build --select <model> --quietto materialize + run tests - If build fails:
- Read the error message
- Check
target/run_results.jsonfor details - Diagnose the root cause (SQL error, test failure, permission issue)
- Suggest a fix
- If build succeeds:
- Report pass/fail counts for tests
- Show execution time for slowest steps
- Run
dbt show --select <model> --limit 5to preview results
Use the run_dbt_command MCP tool if available, otherwise run CLI commands directly.