0
0
dbtdata~20 mins

Installing packages with packages.yml in dbt - Practice Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
dbt Package Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
What is the effect of this packages.yml content?
Given the following packages.yml file content, what will happen when you run dbt deps?
dbt
packages:
  - package: dbt-labs/dbt_utils
    version: 0.8.0
  - package: fishtown-analytics/codegen
    version: 0.3.0
Adbt will download and install dbt_utils version 0.8.0 and codegen version 0.3.0 packages into the project.
Bdbt will update all installed packages to their latest versions ignoring the specified versions.
Cdbt will remove all packages and not install anything because the versions are outdated.
Ddbt will only install dbt_utils package and ignore codegen because only one package is supported.
Attempts:
2 left
💡 Hint
Think about what dbt deps does with the packages.yml file.
data_output
intermediate
1:30remaining
How many packages will be installed?
Given this packages.yml content, how many packages will be installed after running dbt deps?
dbt
packages:
  - package: dbt-labs/dbt_utils
    version: 0.7.0
  - package: fishtown-analytics/codegen
    version: 0.3.0
  - package: dbt-labs/snowflake
    version: 0.2.0
A3
B2
C1
D0
Attempts:
2 left
💡 Hint
Count the number of package entries under packages:.
🔧 Debug
advanced
2:00remaining
Identify the error in this packages.yml
What error will occur when running dbt deps with this packages.yml content?
dbt
packages:
  - package dbt-labs/dbt_utils
    version: 0.8.0
AVersion conflict error because version is too low
BFileNotFoundError because packages.yml is missing
CNo error, packages will install correctly
DSyntaxError due to missing colon after 'package'
Attempts:
2 left
💡 Hint
Check YAML syntax carefully for missing punctuation.
🧠 Conceptual
advanced
1:30remaining
Why specify package versions in packages.yml?
Why is it important to specify exact package versions in packages.yml instead of leaving versions out?
ATo allow dbt to always install the newest package versions automatically
BTo enable dbt to skip package installation if versions are missing
CTo ensure consistent and repeatable builds by locking package versions
DTo reduce the size of the packages installed by skipping dependencies
Attempts:
2 left
💡 Hint
Think about what happens if package versions change over time.
🚀 Application
expert
2:30remaining
Predict the installed package versions
Given this packages.yml content and that the latest available versions are dbt_utils 0.9.0 and codegen 0.4.0, what versions will be installed after dbt deps?
dbt
packages:
  - package: dbt-labs/dbt_utils
    version: 0.8.0
  - package: fishtown-analytics/codegen
    version: 0.3.0
Adbt_utils 0.8.0 and codegen 0.4.0
Bdbt_utils 0.8.0 and codegen 0.3.0
Cdbt_utils 0.9.0 and codegen 0.4.0
Ddbt_utils 0.9.0 and codegen 0.3.0
Attempts:
2 left
💡 Hint
Remember how dbt uses the version specified in packages.yml.