0
0
dbtdata~20 mins

Installing and initializing a dbt project - Practice Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
dbt Project Setup Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
What is the output of the dbt command?
You run the command dbt init my_project in your terminal. What is the expected outcome?
dbt
dbt init my_project
AA new directory named 'my_project' is created with sample dbt project files inside.
Bdbt installs all dependencies but does not create any project files.
CAn error occurs because 'my_project' is not a valid dbt command argument.
Ddbt connects to the database and runs all models immediately.
Attempts:
2 left
💡 Hint
Think about what the 'init' command does in dbt.
🧠 Conceptual
intermediate
1:30remaining
What is the purpose of the profiles.yml file in dbt?
After initializing a dbt project, you see a file named profiles.yml. What is its main role?
AIt stores database connection details and credentials for your dbt project.
BIt contains the SQL code for your data models.
CIt lists all installed dbt packages and plugins.
DIt defines the visualizations and dashboards for your data.
Attempts:
2 left
💡 Hint
Think about where dbt needs to connect to run your models.
🔧 Debug
advanced
2:00remaining
Why does this dbt command fail?
You run dbt run immediately after dbt init without any changes. Why might it fail?
dbt
dbt run
ABecause 'dbt run' needs a specific model name as an argument.
BBecause 'dbt run' only works after you have installed dbt packages.
CBecause the default sample model is missing or not configured properly.
DBecause dbt requires a database connection set up in profiles.yml before running models.
Attempts:
2 left
💡 Hint
Check if dbt knows where to connect to run your models.
🚀 Application
advanced
1:30remaining
How to initialize a dbt project with a specific adapter?
You want to create a new dbt project that uses the Snowflake adapter. Which command correctly initializes this?
Adbt new my_snowflake_project --adapter snowflake
Bdbt init my_snowflake_project
Cdbt init my_snowflake_project --adapter snowflake
Ddbt init my_snowflake_project --profile snowflake
Attempts:
2 left
💡 Hint
The adapter is set in profiles.yml, not during init.
data_output
expert
2:00remaining
What files are created after running 'dbt init'?
After running dbt init example_project, which of the following files will you find inside the new project folder?
Asetup.py, models/example_project.sql, dbt.lock
Bprofiles.yml, requirements.txt, Dockerfile
Cdbt_project.yml, models/example_project.sql, README.md
Dconfig.json, main.py, models/example_project.sql
Attempts:
2 left
💡 Hint
Look for typical dbt project files created by default.