Bird
0
0

What will happen if you run this Airflow task?

medium📝 Predict Output Q5 of 15
dbt - Production Deployment
What will happen if you run this Airflow task?
dbt_run = BashOperator(task_id='dbt_run', bash_command='dbt run --models non_existing_model')
AThe task fails because the model does not exist
BThe task runs successfully but skips the model
CThe task runs all models ignoring the flag
DThe task runs but logs a warning only
Step-by-Step Solution
Solution:
  1. Step 1: Understand dbt run with --models flag

    dbt tries to run only specified models; if model missing, it errors.
  2. Step 2: Predict Airflow task behavior on dbt error

    Airflow task fails if bash command returns non-zero exit code.
  3. Final Answer:

    The task fails because the model does not exist -> Option A
  4. Quick Check:

    Missing model causes dbt run failure [OK]
Quick Trick: dbt run fails if specified model is missing [OK]
Common Mistakes:
MISTAKES
  • Assuming dbt skips missing models silently
  • Thinking Airflow ignores bash command errors
  • Believing dbt runs all models ignoring flags

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes