Bird
0
0

You want to allow patch updates but prevent minor or major upgrades for the dbt_utils package. Which version pinning strategy in packages.yml achieves this while balancing stability and updates?

hard📝 Application Q15 of 15
dbt - Packages and Reusability
You want to allow patch updates but prevent minor or major upgrades for the dbt_utils package. Which version pinning strategy in packages.yml achieves this while balancing stability and updates?
A- package: dbt-labs/dbt_utils version: ">=1.0.0"
B- package: dbt-labs/dbt_utils version: ">=1.0.0,<2.0.0"
C- package: dbt-labs/dbt_utils version: "1.0.0"
D- package: dbt-labs/dbt_utils version: "~>1.0.0"
Step-by-Step Solution
Solution:
  1. Step 1: Understand version pinning operators

    Exact version ("1.0.0") disallows all updates. Range (">=1.0.0,<2.0.0") allows minor updates (1.x) but blocks major. ">=1.0.0" allows minor and major upgrades with no upper bound.
  2. Step 2: Identify the pessimistic operator usage

    The "~>1.0.0" operator allows patch updates (like 1.0.1, 1.0.2) but prevents minor (1.1.0) or major (2.0.0) upgrades, balancing stability and updates.
  3. Final Answer:

    - package: dbt-labs/dbt_utils version: "~>1.0.0" -> Option D
  4. Quick Check:

    Pessimistic operator (~>) allows patch updates only [OK]
Quick Trick: Use ~> for patch updates only, blocking minor/major [OK]
Common Mistakes:
MISTAKES
  • Using exact version and missing updates
  • Using wide range allowing minor/major updates
  • Confusing range with pessimistic operator

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes