0
0
dbtdata~10 mins

Version pinning and updates in dbt - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to pin the package version to 1.4.0 in the packages.yml file.

dbt
packages:
  - package: dbt-labs/dbt_utils
    version: [1]
Drag options to blanks, or click blank then click option'
A"1.4.0"
B"latest"
C"*"
D"1.3.0"
Attempts:
3 left
💡 Hint
Common Mistakes
Using "latest" instead of a fixed version.
Omitting quotes around the version number.
2fill in blank
medium

Complete the command to update dbt packages after changing the version pin.

dbt
dbt [1]
Drag options to blanks, or click blank then click option'
Abuild
Btest
Cdeps
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'dbt run' which runs models but does not update packages.
Using 'dbt test' which runs tests but does not update packages.
3fill in blank
hard

Fix the error in the dbt_project.yml to pin the dbt version correctly.

dbt
name: my_project
dbt_version: [1]
Drag options to blanks, or click blank then click option'
Aversion: 1.4.0
B"1.4.0"
C1.4.0
D'1.4.0'
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the version number causing YAML parsing errors.
Adding 'version:' again inside the value.
4fill in blank
hard

Fill both blanks to create a command that updates dbt and then runs models.

dbt
dbt [1] && dbt [2]
Drag options to blanks, or click blank then click option'
Adeps
Brun
Ctest
Dcompile
Attempts:
3 left
💡 Hint
Common Mistakes
Running models before updating packages.
Using 'test' instead of 'run' to execute models.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that filters packages by version.

dbt
filtered_packages = {pkg: ver for pkg, ver in packages.items() if ver [1] [2] and pkg != [3]
Drag options to blanks, or click blank then click option'
A>=
B"1.4.0"
C"deprecated_package"
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<=' instead of '>=' for filtering newer versions.
Not quoting string values causing syntax errors.