0
0
dbtdata~20 mins

Generating documentation site in dbt - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
dbt Documentation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What does the command `dbt docs generate` do?

In dbt, what is the main purpose of running the command dbt docs generate?

AIt creates a static website with documentation about your dbt models and their relationships.
BIt runs all your dbt models and loads data into the warehouse.
CIt deletes all existing documentation files from your project.
DIt installs dbt packages required for your project.
Attempts:
2 left
💡 Hint

Think about what kind of output you want to see after running dbt docs generate.

Predict Output
intermediate
1:30remaining
Output of `dbt docs serve` after generating docs

After running dbt docs generate, you run dbt docs serve. What happens next?

AIt uploads the documentation to a remote server automatically.
Bdbt runs all models and shows their run status in the terminal.
CA local web server starts and opens a browser showing the documentation site.
DThe command fails because docs were not generated yet.
Attempts:
2 left
💡 Hint

Consider what serve usually means for documentation tools.

data_output
advanced
2:00remaining
What data is included in the generated documentation site?

Which of the following data is included in the documentation site generated by dbt docs generate?

AUser credentials and connection details.
BRaw data from your warehouse tables.
COnly the SQL code of your models without any metadata.
DModel names, descriptions, columns, tests, and lineage graph.
Attempts:
2 left
💡 Hint

Think about what information helps you understand your models and their relationships.

🔧 Debug
advanced
2:00remaining
Why does `dbt docs serve` fail after `dbt docs generate`?

You ran dbt docs generate but when you run dbt docs serve, it fails with an error saying documentation files are missing. What is the most likely cause?

AYou ran <code>dbt docs generate</code> in a different project directory than where you ran <code>dbt docs serve</code>.
BYou forgot to install dbt before running the commands.
CYour dbt version is too new and does not support docs commands.
DYou need to run <code>dbt run</code> before generating docs.
Attempts:
2 left
💡 Hint

Think about where the documentation files are saved and where you run commands.

🚀 Application
expert
2:30remaining
How to customize documentation descriptions for models and columns?

You want to add clear descriptions to your dbt models and columns so they appear in the generated documentation site. Which file do you edit to add these descriptions?

AThe SQL model files by adding comments inside the SELECT statements.
BThe <code>schema.yml</code> file where you define models and columns with descriptions.
CThe <code>dbt_project.yml</code> file to add descriptions globally.
DThe <code>profiles.yml</code> file to configure descriptions.
Attempts:
2 left
💡 Hint

Think about where dbt stores metadata about models and columns.