Bird
0
0

You want to optimize your CI pipeline to run only changed models and their dependents, but also run tests on all models. Which command achieves this?

hard🚀 Application Q8 of 15
dbt - Production Deployment
You want to optimize your CI pipeline to run only changed models and their dependents, but also run tests on all models. Which command achieves this?
Adbt run --full-refresh && dbt test --state ./target
Bdbt run --state ./target --select state:modified --test
Cdbt run --select state:modified --test
Ddbt run --state ./target --select state:modified && dbt test
Step-by-Step Solution
Solution:
  1. Step 1: Run only changed models and dependents

    Use dbt run --state ./target --select state:modified to run changed models.
  2. Step 2: Run tests on all models

    Run dbt test separately to test all models.
  3. Final Answer:

    dbt run --state ./target --select state:modified && dbt test -> Option D
  4. Quick Check:

    Separate run and test commands for desired behavior [OK]
Quick Trick: Run changed models then run tests separately [OK]
Common Mistakes:
MISTAKES
  • Trying to combine run and test in one command incorrectly
  • Using --test flag with run command
  • Running full-refresh unnecessarily

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes