Bird
0
0

Given the command:

medium📝 Predict Output Q4 of 15
dbt - Production Deployment
Given the command:
dbt run --state ./target --select state:modified

If only model 'orders' changed, which models will dbt run?
ANo models will run
BOnly 'orders' and models depending on 'orders'
COnly 'orders' model
DAll models in the project
Step-by-Step Solution
Solution:
  1. Step 1: Understand state:modified selection

    This selects models that changed and their dependents to ensure data consistency.
  2. Step 2: Apply to 'orders' change

    Since 'orders' changed, dbt runs 'orders' plus any models that depend on it.
  3. Final Answer:

    Only 'orders' and models depending on 'orders' -> Option B
  4. Quick Check:

    state:modified runs changed + dependents [OK]
Quick Trick: state:modified runs changed models plus dependents [OK]
Common Mistakes:
MISTAKES
  • Thinking only changed models run without dependents
  • Assuming all models run
  • Believing no models run if only one changed

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes