Bird
0
0

Which command will run only the modified model and also run its dependent models?

hard🚀 Application Q15 of 15
dbt - Production Deployment
You want to optimize your CI pipeline using Slim CI. Your previous run artifacts are stored in ./target/previous. You have models 'A', 'B', and 'C'. Only 'B' was modified. Which command will run only the modified model and also run its dependent models?
Adbt run --state ./target/previous --select state:modified
Bdbt run --state ./target/previous --select state:modified --full-refresh
Cdbt run --state ./target/previous --select state:modified+
Ddbt run --select state:modified --state ./target/previous --exclude B
Step-by-Step Solution
Solution:
  1. Step 1: Understand the '+' operator in selection

    The '+' after state:modified selects modified models plus their dependents.
  2. Step 2: Match command to requirement

    dbt run --state ./target/previous --select state:modified+ uses state:modified+ with correct --state path, running 'B' and its dependents.
  3. Step 3: Evaluate other options

    dbt run --state ./target/previous --select state:modified runs only modified models without dependents; C adds unnecessary full-refresh; D excludes 'B' incorrectly.
  4. Final Answer:

    dbt run --state ./target/previous --select state:modified+ -> Option C
  5. Quick Check:

    Modified plus dependents run [OK]
Quick Trick: Add '+' to include dependents of modified models [OK]
Common Mistakes:
MISTAKES
  • Not including dependents with '+'
  • Using --full-refresh unnecessarily
  • Excluding modified models by mistake

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes