0
0
dbtdata~10 mins

dbt project structure - Interactive Code Practice

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

Complete the code to specify the main directory where dbt models are stored.

dbt
models_dir = "[1]"
Drag options to blanks, or click blank then click option'
Aconfigs
Bdata
Cscripts
Dmodels
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'data' or 'scripts' instead of 'models' for model files.
2fill in blank
medium

Complete the code to define the file that contains project metadata in dbt.

dbt
project_file = "[1]"
Drag options to blanks, or click blank then click option'
Adbt_project.yml
Bmanifest.json
Cprofiles.yml
Dschema.yml
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing profiles.yml with dbt_project.yml.
3fill in blank
hard

Fix the error in the code to correctly specify the directory for tests in a dbt project.

dbt
tests_path = "[1]"
Drag options to blanks, or click blank then click option'
Atest
Btests
Ctesting
Dmodel_tests
Attempts:
3 left
💡 Hint
Common Mistakes
Using singular 'test' instead of 'tests'.
4fill in blank
hard

Fill both blanks to create a dictionary that maps dbt project folders to their purpose.

dbt
folders = {"models": "[1]", "tests": "[2]"}
Drag options to blanks, or click blank then click option'
ASQL transformations
BYAML configurations
CTest definitions
DRaw data files
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up tests with configurations or raw data.
5fill in blank
hard

Fill all three blanks to complete the dictionary comprehension that lists model names with their file extensions if they are SQL files.

dbt
model_files = {file_name: file_name[1] for file_name in files if file_name.[2]('.sql') and 'test' [3] file_name}
Drag options to blanks, or click blank then click option'
A[-4:]
Bendswith
Cnot in
Dstartswith
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'startswith' instead of 'endswith' for file extensions.
Incorrect slicing for file extension.
Wrong operator for excluding test files.