Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to define the package name in the dbt project file.
dbt
name: [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using reserved words like 'project' or 'package_name' as the package name.
Leaving the name field empty.
✗ Incorrect
The 'name' field in the dbt_project.yml file specifies the package name. Here, 'my_dbt_package' is a valid package name.
2fill in blank
mediumComplete the code to add a model file in your dbt package.
dbt
models/[1].sql Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using spaces in file names.
Placing model files outside the models directory.
✗ Incorrect
Model files in dbt are SQL files placed inside the models directory. 'my_model.sql' is a valid model file name.
3fill in blank
hardFix the error in the dbt package dependency declaration.
dbt
packages: - package: [1] version: 0.1.0
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using spaces instead of slashes.
Mixing dashes and underscores incorrectly.
✗ Incorrect
The correct package format is 'namespace/package_name' with a slash and no spaces. 'dbt-labs/dbt-utils' is correct.
4fill in blank
hardFill both blanks to create a simple model SQL that selects all from a source table.
dbt
select * from [1].[2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping schema and table names.
Using non-existent schema or table names.
✗ Incorrect
In dbt, 'raw.customers' refers to the 'customers' table in the 'raw' schema, a common pattern for source data.
5fill in blank
hardFill all three blanks to define a dbt model with a config block and a select statement.
dbt
[1]( materialized='[2]' ) select * from [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'model' instead of 'config' for the first blank.
Using invalid materialization types.
Incorrect table references.
✗ Incorrect
The 'config' function sets model properties like materialization. 'table' is a materialization type. The select statement reads from 'raw.customers'.