Skip to content

Fixing and testing a change before it merges

Once a bug in a dbt model is diagnosed, the fix must be developed in a feature branch and validated locally before merging to a protected branch (e.g., main). This involves rerunning the affected model(s), checking dependent models and tests, and confirming the fix resolves the issue without introducing regressions.

Must-know

  • Use dbt run --select model_name+ to rebuild the fixed model and all downstream dependents, ensuring the fix doesn't break anything relying on it.
  • Use dbt build --select model_name+ to run and test the model and its downstream dependents together in dependency order, catching both data and logic regressions.
  • Always develop against a dev/staging target (a separate schema or database) so fixes are validated without impacting production data.
  • Re-run dbt test on the changed model and related models to confirm existing generic and singular tests pass after the fix.
  • Check compiled SQL (in the target/compiled directory) to verify the fix produces the intended logic before executing against the warehouse.
  • Open a pull request only after local dbt build/dbt test runs are green; CI jobs (e.g., via a configured CI pipeline) should also pass before merging.
Check this objectiveFree · always available

The following test on fct_orders starts failing after a source system change: models: - name: fct_orders columns: - name: order_id tests: - unique: config: store_failures: true After rerunning dbt test --select fct_orders, where should you look to find the specific order_id values that are duplicated, so you can diagnose the bug before writing a fix?

Your objective map0 tried · 0 right · 31 untouched

What you have tried across dbt Analytics Engineering's objectives, not a readiness score.

Coverage checked against the published exam guide on Aug 5, 2026.

These are independent practice questions, written against this certification's published exam guide. They are not the certification vendor's own questions, and not the real exam.