Bird
0
0

Given the following profiles.yml snippet, what database will dbt connect to when running with --target prod?

medium📝 Predict Output Q13 of 15
dbt - Production Deployment
Given the following profiles.yml snippet, what database will dbt connect to when running with --target prod?
my_project:
  outputs:
    dev:
      type: postgres
      host: dev-db.example.com
      dbname: dev_db
    prod:
      type: postgres
      host: prod-db.example.com
      dbname: prod_db
  target: dev
Aprod_db on prod-db.example.com
Bdev_db on dev-db.example.com
Cdev_db on prod-db.example.com
Dprod_db on dev-db.example.com
Step-by-Step Solution
Solution:
  1. Step 1: Understand the --target flag effect

    Running with --target prod tells dbt to use the prod output configuration.
  2. Step 2: Identify prod output details

    The prod output connects to prod-db.example.com and database prod_db.
  3. Final Answer:

    prod_db on prod-db.example.com -> Option A
  4. Quick Check:

    --target prod uses prod output config [OK]
Quick Trick: Match --target value to profiles.yml output key [OK]
Common Mistakes:
MISTAKES
  • Ignoring --target and using default target
  • Mixing host and dbname from different environments
  • Assuming target in profiles.yml overrides command line

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes