Bird
0
0

Given these models and dependencies:

medium📝 Predict Output Q13 of 15
dbt - Performance Optimization
Given these models and dependencies:
model_a.sql (no dependencies)
model_b.sql (depends on model_a)
model_c.sql (depends on model_a)
model_d.sql (depends on model_b and model_c)

If you run dbt run --threads 2, which models can run in parallel first?
Amodel_a only
Bmodel_b and model_c
Cmodel_a and model_b
Dmodel_c and model_d
Step-by-Step Solution
Solution:
  1. Step 1: Identify models without dependencies

    Only model_a has no dependencies, so it must run first.
  2. Step 2: Understand parallelism with threads=2

    Since only model_a is ready, it runs alone first. After it finishes, model_b and model_c can run in parallel.
  3. Final Answer:

    model_a only -> Option A
  4. Quick Check:

    First run models without dependencies = model_a [OK]
Quick Trick: Run models without dependencies first, then parallelize [OK]
Common Mistakes:
MISTAKES
  • Running dependent models before their dependencies
  • Assuming multiple models run before dependencies finish
  • Ignoring dependency order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes